summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/prayer/Makefile17
-rw-r--r--mail/prayer/distinfo27
-rw-r--r--mail/prayer/files/prayer.sh13
-rw-r--r--mail/prayer/patches/patch-ac59
-rw-r--r--mail/prayer/patches/patch-ae26
-rw-r--r--mail/prayer/patches/patch-af12
-rw-r--r--mail/prayer/patches/patch-ag18
-rw-r--r--mail/prayer/patches/patch-ah13
-rw-r--r--mail/prayer/patches/patch-ai13
-rw-r--r--mail/prayer/patches/patch-ak13
-rw-r--r--mail/prayer/patches/patch-defaults_Config (renamed from mail/prayer/patches/patch-aa)44
-rw-r--r--mail/prayer/patches/patch-files_Makefile59
-rw-r--r--mail/prayer/patches/patch-files_install.sh (renamed from mail/prayer/patches/patch-ab)22
-rw-r--r--mail/prayer/patches/patch-lib_os.c16
-rw-r--r--mail/prayer/patches/patch-lib_os__bsd.h12
-rw-r--r--mail/prayer/patches/patch-man_Makefile (renamed from mail/prayer/patches/patch-aj)8
-rw-r--r--mail/prayer/patches/patch-servers_Makefile (renamed from mail/prayer/patches/patch-ad)16
-rw-r--r--mail/prayer/patches/patch-utils_Makefile25
18 files changed, 193 insertions, 220 deletions
diff --git a/mail/prayer/Makefile b/mail/prayer/Makefile
index cd420d7f7e9..5713309285d 100644
--- a/mail/prayer/Makefile
+++ b/mail/prayer/Makefile
@@ -1,13 +1,13 @@
-# $NetBSD: Makefile,v 1.40 2010/09/16 08:06:17 adam Exp $
+# $NetBSD: Makefile,v 1.41 2011/06/30 01:17:37 schnoebe Exp $
-DISTNAME= prayer-1.3.2
-PKGREVISION= 1
+DISTNAME= prayer-1.3.4
CATEGORIES= mail www
MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/email/prayer/
-MAINTAINER= abs@NetBSD.org
+MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www-uxsup.csx.cam.ac.uk/~dpc22/prayer/
COMMENT= Small, fast, web mail interface
+LICENSE= gnu-gpl-v2
BDB_ACCEPTED= db4 db5
USE_TOOLS+= gmake perl
@@ -27,18 +27,21 @@ MAKE_ENV+= BASECFLAGS=${CFLAGS:Q}
MAKE_ENV+= BDBBASE="${BDBBASE}"
MAKE_ENV+= BDB_TYPE="${BDB_TYPE}"
MAKE_ENV+= BUILDLINK_PREFIX.imap-uw="${BUILDLINK_PREFIX.imap-uw}"
+MAKE_ENV+= BUILDLINK_PREFIX.tidy="${BUILDLINK_PREFIX.tidy}"
MAKE_ENV+= EGDIR=${EGDIR}
MAKE_ENV+= KRB5BASE="${KRB5BASE}"
MAKE_ENV+= KRB5_TYPE=${KRB5_TYPE:Q}
MAKE_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
MAKE_ENV+= PRAYER_USER=${PRAYER_USER} PRAYER_GROUP=${PRAYER_GROUP}
MAKE_ENV+= ROOT_USER=${ROOT_USER} ROOT_GROUP=${ROOT_GROUP}
+MAKE_ENV+= RO_USER=${ROOT_USER}
MAKE_ENV+= SSLCERTS=${SSLCERTS:Q}
PKG_SYSCONFSUBDIR= prayer
EGDIR= ${PREFIX}/share/examples/prayer
RCD_SCRIPTS= prayer
+PKG_DESTDIR_SUPPORT = user-destdir
CONF_FILES= ${EGDIR}/prayer.cf ${PKG_SYSCONFDIR}/prayer.cf
CONF_FILES+= ${EGDIR}/prayer-accountd.cf ${PKG_SYSCONFDIR}/prayer-accountd.cf
@@ -56,13 +59,13 @@ post-patch:
${XARGS} ${RM} -r
cp ${WRKSRC}/defaults/Config ${WRKSRC}
-pre-install:
- ${INSTALL_DATA_DIR} ${EGDIR}
+INSTALLATION_DIRS+= ${EGDIR}
.include "../../databases/openldap-client/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mail/imap-uw/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/krb5.buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../www/tidy/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/prayer/distinfo b/mail/prayer/distinfo
index e094dba8374..e10375c07d0 100644
--- a/mail/prayer/distinfo
+++ b/mail/prayer/distinfo
@@ -1,16 +1,13 @@
-$NetBSD: distinfo,v 1.14 2010/06/08 12:34:38 adam Exp $
+$NetBSD: distinfo,v 1.15 2011/06/30 01:17:37 schnoebe Exp $
-SHA1 (prayer-1.3.2.tar.gz) = 935923fe8f4c8734d4f61cbe0228bb040f0f8152
-RMD160 (prayer-1.3.2.tar.gz) = 588377d2442e2288f097542055fbc998509e57e0
-Size (prayer-1.3.2.tar.gz) = 748315 bytes
-SHA1 (patch-aa) = db0b7a760e7ffb622e84ace97d81535c4ce0af36
-SHA1 (patch-ab) = a8ea39b18ced1b4037d3de244e4fba70fc92dfc8
-SHA1 (patch-ac) = aa1382214b9f6288c41c545c2f3b8dee04a13672
-SHA1 (patch-ad) = df8f543ecd6dacbed2cb046312c75146a5a9f6bb
-SHA1 (patch-ae) = b049fb2c284280ae9635d3337413fbd8e8904f35
-SHA1 (patch-af) = 3dde54cc6e93085e659adef6ef32bc1a3cd5af3f
-SHA1 (patch-ag) = e24faf585cd1288ba0e866a64737cd7202498dfa
-SHA1 (patch-ah) = 0b4018c703ecb315b71f74f05b4b73b69bac3326
-SHA1 (patch-ai) = a8c881876689b32f09ffec0318934f108849852f
-SHA1 (patch-aj) = 773c813b81c725b00cd5ecae9a276c7dc8b2c9fb
-SHA1 (patch-ak) = dbde773d205837e0ce4d0838f99c51f931b41753
+SHA1 (prayer-1.3.4.tar.gz) = 53399193b13c223422dcb5a546759f3a1ddab4ff
+RMD160 (prayer-1.3.4.tar.gz) = d7fe2de40d29a584f10af6e56ccc9eb7bb6357a4
+Size (prayer-1.3.4.tar.gz) = 749745 bytes
+SHA1 (patch-defaults_Config) = 71c552e34dec46097fd420f6b6720fdb3f739374
+SHA1 (patch-files_Makefile) = 522ac0b3354c4f2cb62db186209aa706fb95b94b
+SHA1 (patch-files_install.sh) = 8590e20625cda6b37e517e24df18ce27eedbbe5d
+SHA1 (patch-lib_os.c) = 7e9646b4aaa2518152f3c338ea22700e71f5c8be
+SHA1 (patch-lib_os__bsd.h) = b64c720e1ddbcf1756c05fed505aca00a7c61b8f
+SHA1 (patch-man_Makefile) = 2d5849da042477ea031292fce2da76e2a4f7452d
+SHA1 (patch-servers_Makefile) = db4f3051d7f22b1bb269b8dcc9977b7aa52dde47
+SHA1 (patch-utils_Makefile) = 12e95f0603fcb8b83fb20ab737fe2943ecba26b3
diff --git a/mail/prayer/files/prayer.sh b/mail/prayer/files/prayer.sh
index f4fa6d54fa3..1aaf9f74e73 100644
--- a/mail/prayer/files/prayer.sh
+++ b/mail/prayer/files/prayer.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: prayer.sh,v 1.2 2010/06/08 12:34:38 adam Exp $
+# $NetBSD: prayer.sh,v 1.3 2011/06/30 01:17:37 schnoebe Exp $
#
# This shell script takes care of starting and stopping prayer,
# a program providing web access to a mail server using IMAP
@@ -33,8 +33,8 @@ OPSYS=@OPSYS@
get_prayer_pid()
{
if [ -f ${pidfile} ]; then
- prayer_pid=`head -1 ${pidfile}`
- if ps -p ${prayer_pid} | fgrep ${name} >/dev/null; then
+ prayer_pid=$(head -1 ${pidfile})
+ if kill -0 ${prayer_pid} >/dev/null; then
:
else
prayer_pid=
@@ -67,14 +67,15 @@ prayer_stop()
fi
echo "Stopping ${name}."
kill -HUP ${prayer_pid}
- prayer_session_pid=`cat @VAR_PREFIX@/pid/prayer-session`
+ prayer_session_pid=$(cat @VAR_PREFIX@/pid/prayer-session.pid)
if [ -n "${prayer_session_pid}" ]; then
- if ps -p ${prayer_session_pid} | fgrep ${name} >/dev/null; then
+ if kill -0 ${prayer_session_pid} >/dev/null; then
kill -HUP ${prayer_session_pid}
fi
fi
- slaves=`ps -U prayer| cut -d' ' -f1`; kill -HUP $slaves
+ slaves=$(ps -U prayer| awk '/PID/ {next}; {print $1}')
+ kill -HUP $slaves
}
prayer_status()
diff --git a/mail/prayer/patches/patch-ac b/mail/prayer/patches/patch-ac
deleted file mode 100644
index 682b4ce04be..00000000000
--- a/mail/prayer/patches/patch-ac
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-ac,v 1.6 2010/06/08 12:34:38 adam Exp $
-
---- files/Makefile.orig 2008-10-30 12:28:59 +0100
-+++ files/Makefile 2010-05-01 20:12:14 +0200
-@@ -14,10 +14,10 @@
- all: ./etc/prayer.cf ./init.d/prayer
-
- ./etc/prayer.cf: ./etc/prayer.cf.SRC
-- perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&;" < ./etc/prayer.cf.SRC > ./etc/prayer.cf
-+ perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&; s&__PKG_SYSCONFDIR__&${PKG_SYSCONFDIR}&;" < ./etc/prayer.cf.SRC > ./etc/prayer.cf
-
- ./init.d/prayer: ./init.d/prayer.SRC
-- perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&; s&__PRAYER_CONFIG_FILE__&${PRAYER_CONFIG_FILE}&;" < ./init.d/prayer.SRC > ./init.d/prayer
-+ perl -pe "s&__PREFIX__&${PREFIX}&; s&__VAR_PREFIX__&${VAR_PREFIX}&; s&__BIN_DIR__&${BIN_DIR}&; s&__PKG_SYSCONFDIR__&${PKG_SYSCONFDIR}&; s&__PRAYER_CONFIG_FILE__&${PRAYER_CONFIG_FILE}&;" < ./init.d/prayer.SRC > ./init.d/prayer
-
-
- ifeq ($(strip $(SSL_ENABLE)), true)
-@@ -53,20 +53,20 @@
- install-cert:
- if [ -f certs/prayer.pem ]; then \
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) \
-- -m $(PRIVATE_FILE) certs/prayer.pem ${BROOT}${PREFIX}/certs; \
-+ -m $(PRIVATE_FILE) certs/prayer.pem ${BROOT}${EGDIR}/prayer.pem; \
- fi
-
- install-config: etc/prayer.cf
-- $(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
-- etc/prayer.cf ${BROOT}${PRAYER_CONFIG_FILE}
-+ $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
-+ etc/prayer.cf ${BROOT}${EGDIR}/prayer.cf
-
- install-aconfig:
-- $(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
-- etc/prayer-accountd.cf ${BROOT}${ACCOUNTD_CONFIG_FILE}
-+ $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
-+ etc/prayer-accountd.cf ${BROOT}${EGDIR}/prayer-accountd.cf
-
- install-motd:
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
-- etc/motd.html ${BROOT}${PREFIX}/etc
-+ etc/motd.html ${BROOT}${EGDIR}/motd.html
-
- install:
- PREFIX=$(BROOT)$(PREFIX) VAR_PREFIX=$(BROOT)$(VAR_PREFIX) \
-@@ -75,12 +75,9 @@
- PUBLIC_DIR=$(PUBLIC_DIR) PRIVATE_DIR=$(PRIVATE_DIR) \
- PUBLIC_FILE=$(PUBLIC_FILE) PRIVATE_FILE=$(PRIVATE_FILE) \
- PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \
-- BIN_DIR=$(BIN_DIR) INSTALL=$(INSTALL) \
-+ BIN_DIR=$(BIN_DIR) INSTALL="$(INSTALL)" \
- ./install.sh
-- if [ ! -f $(BROOT)$(PREFIX)/certs/prayer.pem ]; then $(MAKE) install-cert; fi
-- if [ ! -f $(BROOT)$(PRAYER_CONFIG_FILE) ]; then $(MAKE) install-config; fi
-- if [ ! -f $(BROOT)$(ACCOUNTD_CONFIG_FILE) ]; then $(MAKE) install-aconfig; fi
-- if [ ! -f $(BROOT)$(PREFIX)/etc/motd.html ]; then $(MAKE) install-motd; fi
-+ $(MAKE) install-cert install-config install-aconfig install-motd
-
- redhat-install-init.d:
- install -D -o root -g root -m 755 \
diff --git a/mail/prayer/patches/patch-ae b/mail/prayer/patches/patch-ae
deleted file mode 100644
index 28205a5697b..00000000000
--- a/mail/prayer/patches/patch-ae
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-ae,v 1.5 2010/06/08 12:34:38 adam Exp $
-
---- files/etc/prayer.cf.SRC.orig 2008-10-30 12:28:59 +0100
-+++ files/etc/prayer.cf.SRC 2010-05-01 22:20:02 +0200
-@@ -376,7 +376,7 @@
- ispell_path = /usr/bin/ispell
-
- # Message of the day file
--motd_path = "$prefix/etc/motd.html"
-+motd_path = "__PKG_SYSCONFDIR__/motd.html"
-
- # HTML to insert into login page
- #login_insert1_path = "$prefix/etc/ucsnews.html"
-@@ -401,10 +401,10 @@
- ssl_required = FALSE
-
- # Location of icon files
--icon_dir = "$prefix/icons"
-+icon_dir = "__PREFIX__/share/prayer/icons"
-
- # Location of icon files
--static_dir = "$prefix/static"
-+static_dir = "__PREFIX__/share/prayer/static"
-
- # Location of binary files
- bin_dir = "__BIN_DIR__"
diff --git a/mail/prayer/patches/patch-af b/mail/prayer/patches/patch-af
deleted file mode 100644
index 454c6315993..00000000000
--- a/mail/prayer/patches/patch-af
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-af,v 1.7 2010/06/08 12:34:38 adam Exp $
-
---- lib/os_bsd.c.orig 2010-06-06 14:45:50.000000000 +0000
-+++ lib/os_bsd.c
-@@ -17,7 +17,6 @@
- #include <signal.h>
- #include <netdb.h>
-
--#include <libutil.h>
-
- /* ====================================================================== */
-
diff --git a/mail/prayer/patches/patch-ag b/mail/prayer/patches/patch-ag
deleted file mode 100644
index 81f23310dfa..00000000000
--- a/mail/prayer/patches/patch-ag
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ag,v 1.3 2010/06/08 12:34:38 adam Exp $
-
---- shared/response.c.orig 2008-09-16 11:59:58 +0200
-+++ shared/response.c 2010-05-01 21:21:55 +0200
-@@ -694,7 +694,12 @@
- } else
- bputs(b, "Content-Type: text/plain" CRLF);
-
-- bprintf(b, "Content-Length: %lu" CRLF, sbuf.st_size);
-+ /* Hack: cast sbuf.st_size to long here as we are only dealing
-+ * with small files. Otherwise, we will send "Content-Length: 0"
-+ * for the images from big-endian hosts where st_size is 64 bits,
-+ * which confuses browsers.
-+ */
-+ bprintf(b, "Content-Length: %lu" CRLF, (long)sbuf.st_size);
-
- /* Following stolen from Apache:
- *
diff --git a/mail/prayer/patches/patch-ah b/mail/prayer/patches/patch-ah
deleted file mode 100644
index 4c32d18d2e1..00000000000
--- a/mail/prayer/patches/patch-ah
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ah,v 1.2 2010/06/08 12:34:38 adam Exp $
-
---- shared/shared.h.orig 2008-09-16 11:59:58 +0200
-+++ shared/shared.h 2010-05-01 21:28:47 +0200
-@@ -27,8 +27,6 @@
- #include <assert.h>
- #include <netdb.h>
-
--extern int errno; /* just in case */
--
- #include "lib.h"
- #include "common.h"
- #include "config.h"
diff --git a/mail/prayer/patches/patch-ai b/mail/prayer/patches/patch-ai
deleted file mode 100644
index d305d58d097..00000000000
--- a/mail/prayer/patches/patch-ai
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ai,v 1.2 2010/06/08 12:34:38 adam Exp $
-
---- session/prayer_session.h.orig 2008-09-16 11:59:58 +0200
-+++ session/prayer_session.h 2010-05-01 21:30:33 +0200
-@@ -25,8 +25,6 @@
- #include <grp.h>
- #include <netdb.h>
-
--extern int errno; /* just in case */
--
- #include "c-client.h"
-
- #include "shared.h"
diff --git a/mail/prayer/patches/patch-ak b/mail/prayer/patches/patch-ak
deleted file mode 100644
index 0e33c698bae..00000000000
--- a/mail/prayer/patches/patch-ak
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2010/06/08 12:34:38 adam Exp $
-
---- templates/Makefile.orig 2010-06-08 12:18:13.000000000 +0000
-+++ templates/Makefile
-@@ -14,7 +14,7 @@ TEMPLATES = old cam
-
- SUBDIRS = src $(TEMPLATES)
-
--BASECFLAGS = -I../lib
-+BASECFLAGS += -I../lib
- MYCFLAGS = $(BASECFLAGS)
-
- all: index.o
diff --git a/mail/prayer/patches/patch-aa b/mail/prayer/patches/patch-defaults_Config
index f73aee7fee3..853c28ce4c4 100644
--- a/mail/prayer/patches/patch-aa
+++ b/mail/prayer/patches/patch-defaults_Config
@@ -1,21 +1,21 @@
-$NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
+$NetBSD: patch-defaults_Config,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
---- defaults/Config.orig 2009-09-01 10:25:22.000000000 +0000
+--- defaults/Config.orig 2011-06-17 15:22:57.000000000 +0000
+++ defaults/Config
-@@ -15,9 +15,9 @@ FENCE_ENABLE = false # Use Elec
- MUTEX_SEMAPHORE = false # Use SYSV mutexes rather than file locking
+@@ -16,9 +16,9 @@ MUTEX_SEMAPHORE = false # Use SYSV
+ TIDY_ENABLE = true # Use libtidy for HTML sanitisation.
# Following depend on the way that you have configured c-client
-CCLIENT_SSL_ENABLE = false # C-client was built with SSL support
-CCLIENT_PAM_ENABLE = false # C-client was built with PAM support
-CCLIENT_KERB_ENABLE = false # C-client was built with Kerberos support
-+CCLIENT_SSL_ENABLE = true # C-client was built with SSL support
-+CCLIENT_PAM_ENABLE = true # C-client was built with PAM support
-+CCLIENT_KERB_ENABLE = true # C-client was built with Kerberos support
++CCLIENT_SSL_ENABLE = true # C-client was built with SSL support
++CCLIENT_PAM_ENABLE = true # C-client was built with PAM support
++CCLIENT_KERB_ENABLE = true # C-client was built with Kerberos support
# Probably don't need the following
RAVEN_ENABLE = false # Only of use in Cambridge at the moment.
-@@ -31,22 +31,18 @@ CC = gcc
+@@ -32,22 +32,18 @@ CC = gcc
# Location of make program (GNU make required)
MAKE = gmake
# Location of install program (GNU install or compatible required)
@@ -28,7 +28,7 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
+ BASECFLAGS += $(CPPFLAGS)
else
- BASECFLAGS = -Wall -g -O2
-+ BASECFLAGS += -Wall
++ BASECFLAGS += -Wall -g -O2
endif
ifdef INCLUDES
BASECFLAGS += $(INCLUDES)
@@ -42,7 +42,7 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
# Minimal libraries needed by Linux
BASE_LIBS = -lcrypt -lutil
-@@ -71,9 +67,9 @@ BASE_LIBS = -lcrypt -lutil
+@@ -72,9 +68,9 @@ BASE_LIBS = -lcrypt -lutil
# which points to ../../imap/c-client. This just reduces the amount of
# noise output on each line when building the package.
#
@@ -55,7 +55,18 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
#
# Following works with imap-devel RPM package from Redhat 7.
-@@ -119,8 +115,8 @@ PAM_INCLUDE =
+@@ -108,8 +104,8 @@ FENCE_INCLUDE=
+ FENCE_LIBS=-lmcheck
+
+ # Tidy library (required if TIDY_ENABLE set)
+-TIDY_INCLUDE=-I/usr/include/tidy
+-TIDY_LIBS=-ltidy
++TIDY_INCLUDE=-I ${BUILDLINK_PREFIX.tidy}/include/tidy
++TIDY_LIBS=-L${BUILDLINK_PREFIX.tidy}/lib -Wl,-R${BUILDLINK_PREFIX.tidy}/lib -ltidy
+ # Add following if using tidyp fork.
+ # TIDY_IS_TIDYP=true
+
+@@ -126,8 +122,8 @@ PAM_INCLUDE =
PAM_LIBS = -lpam
# Kerberos (required if CCLIENT_KERB_ENABLE set)
@@ -66,7 +77,7 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
# SSL definitions (required if SSL_ENABLE or CCLIENT_SSL_ENABLE set)
#
-@@ -140,8 +136,8 @@ OPENSSL=openssl
+@@ -147,8 +143,8 @@ OPENSSL=openssl
# DB definitions (required if SESSION_CACHE_ENABLE set)
#
# Following suitable for Redhat Linux which has DB 3 preinstalled
@@ -77,7 +88,12 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
# Following suitable for FreeBSD with DB 4 package installed
#DB_INCLUDE=-I/usr/local/include/db4
-@@ -159,16 +155,16 @@ BROOT=
+@@ -162,20 +158,20 @@ DB_LIBS=-ldb
+ # RW_GROUP. It is important that nothing else can read the certificate file.
+
+ # Build root (used by Redhat RPM system)
+-BROOT=
++BROOT=${DESTDIR}
# Directory, User and group for read-write files: log files, sockets etc
VAR_PREFIX = /var/spool/prayer
@@ -99,7 +115,7 @@ $NetBSD: patch-aa,v 1.10 2010/06/08 12:34:38 adam Exp $
# Access permissions for general objects (wrt above users and groups)
PUBLIC_EXEC = 0755
-@@ -181,6 +177,6 @@ PRIVATE_DIR = 0750
+@@ -188,6 +184,6 @@ PRIVATE_DIR = 0750
PRIVATE_FILE = 0640
# Location of configuration files and binaries
diff --git a/mail/prayer/patches/patch-files_Makefile b/mail/prayer/patches/patch-files_Makefile
new file mode 100644
index 00000000000..fcefd85c9a2
--- /dev/null
+++ b/mail/prayer/patches/patch-files_Makefile
@@ -0,0 +1,59 @@
+$NetBSD: patch-files_Makefile,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
+
+--- files/Makefile.orig 2008-10-30 11:28:59.000000000 +0000
++++ files/Makefile
+@@ -47,26 +47,28 @@ clean:
+ find logs \! -path "logs/CVS*" \! -type d | xargs rm -f
+ rm -f certs/*~ certs/\#*\#
+
++EXAMPLE_DIR=${PREFIX}/share/examples/prayer
++
+ distclean:
+ rm -f certs/prayer.pem
+
+ install-cert:
+ if [ -f certs/prayer.pem ]; then \
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) \
++ $(INSTALL) \
+ -m $(PRIVATE_FILE) certs/prayer.pem ${BROOT}${PREFIX}/certs; \
+ fi
+
+ install-config: etc/prayer.cf
+- $(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
+- etc/prayer.cf ${BROOT}${PRAYER_CONFIG_FILE}
++ $(INSTALL) -D $(DESTDIR) -m $(PUBLIC_FILE) \
++ etc/prayer.cf ${BROOT}${EXAMPLE_DIR}
+
+ install-aconfig:
+- $(INSTALL) -D -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
+- etc/prayer-accountd.cf ${BROOT}${ACCOUNTD_CONFIG_FILE}
++ $(INSTALL) -D $(DESTDIR) -m $(PUBLIC_FILE) \
++ etc/prayer-accountd.cf ${BROOT}${EXAMPLE_DIR}
+
+ install-motd:
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
+- etc/motd.html ${BROOT}${PREFIX}/etc
++ $(INSTALL) -m $(PUBLIC_FILE) \
++ etc/motd.html ${BROOT}${EXAMPLE_DIR}
+
+ install:
+ PREFIX=$(BROOT)$(PREFIX) VAR_PREFIX=$(BROOT)$(VAR_PREFIX) \
+@@ -75,14 +77,14 @@ install:
+ PUBLIC_DIR=$(PUBLIC_DIR) PRIVATE_DIR=$(PRIVATE_DIR) \
+ PUBLIC_FILE=$(PUBLIC_FILE) PRIVATE_FILE=$(PRIVATE_FILE) \
+ PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \
+- BIN_DIR=$(BIN_DIR) INSTALL=$(INSTALL) \
++ BIN_DIR=$(BIN_DIR) INSTALL="$(INSTALL)" \
+ ./install.sh
+ if [ ! -f $(BROOT)$(PREFIX)/certs/prayer.pem ]; then $(MAKE) install-cert; fi
+- if [ ! -f $(BROOT)$(PRAYER_CONFIG_FILE) ]; then $(MAKE) install-config; fi
+- if [ ! -f $(BROOT)$(ACCOUNTD_CONFIG_FILE) ]; then $(MAKE) install-aconfig; fi
++ if [ ! -f $(BROOT)$(PRAYER_CONFIG_FILE_EXAMPLE) ]; then $(MAKE) install-config; fi
++ if [ ! -f $(BROOT)$(ACCOUNTD_CONFIG_FILE_EXAMPLE) ]; then $(MAKE) install-aconfig; fi
+ if [ ! -f $(BROOT)$(PREFIX)/etc/motd.html ]; then $(MAKE) install-motd; fi
+
+ redhat-install-init.d:
+- install -D -o root -g root -m 755 \
++ install -D $(DESTDIR) -m 755 \
+ ./init.d/prayer $(BROOT)/etc/rc.d/init.d/prayer
+ #chkconfig prayer --level 2345 on
diff --git a/mail/prayer/patches/patch-ab b/mail/prayer/patches/patch-files_install.sh
index 92350d07741..424fdfdb4d7 100644
--- a/mail/prayer/patches/patch-ab
+++ b/mail/prayer/patches/patch-files_install.sh
@@ -1,15 +1,15 @@
-$NetBSD: patch-ab,v 1.5 2010/06/08 12:34:38 adam Exp $
+$NetBSD: patch-files_install.sh,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
---- files/install.sh.orig 2008-09-16 11:59:56 +0200
-+++ files/install.sh 2010-05-01 20:19:56 +0200
-@@ -67,21 +67,25 @@
+--- files/install.sh.orig 2008-09-16 09:59:56.000000000 +0000
++++ files/install.sh
+@@ -67,14 +67,18 @@ if [ ! -d ${PREFIX}/etc ]; then
${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PUBLIC_DIR} ${PREFIX}/etc
fi
-if [ ! -d ${PREFIX}/certs ]; then
- ${INSTALL} -d -o ${RO_USER} -g ${RO_GROUP} -m ${PRIVATE_DIR} ${PREFIX}/certs
+if [ ! -d ${SSLCERTS} ]; then
-+ ${BSD_INSTALL_DATA_DIR} ${SSLCERTS}
++ ${BSD_INSTALL_DATA_DIR} ${SSLCERTS}
fi
if [ ! -d ${BIN_DIR} ]; then
@@ -22,15 +22,13 @@ $NetBSD: patch-ab,v 1.5 2010/06/08 12:34:38 adam Exp $
+
for i in icons static
do
-- if [ -d "${PREFIX}/${i}" ]; then
-+ if [ -d "${PREFIX}/share/prayer/${i}" ]; then
- echo Removing old ${i}
-- rm -rf ${PREFIX}/${i}
-+ rm -rf ${PREFIX}/share/prayer/${i}
+ if [ -d "${PREFIX}/${i}" ]; then
+@@ -82,6 +86,6 @@ do
+ rm -rf ${PREFIX}/${i}
fi
echo Copying ${i}
- (tar cf - ${i}) | (cd ${PREFIX} ; tar xf -)
- (cd ${PREFIX}; chown -R ${RO_USER}:${RO_GROUP} ${i})
-+ (tar cf - ${i}) | (cd ${PREFIX}/share/prayer ; tar xf -)
-+ (cd ${PREFIX}/share/prayer; chown -R ${RO_USER}:${RO_GROUP} ${i})
++ (tar cf - ${i}) | (cd ${PREFIX}/share/prayer ; tar xf -)
++ # (cd ${PREFIX}; chown -R ${RO_USER}:${RO_GROUP} ${i})
done
diff --git a/mail/prayer/patches/patch-lib_os.c b/mail/prayer/patches/patch-lib_os.c
new file mode 100644
index 00000000000..343a4d09e6d
--- /dev/null
+++ b/mail/prayer/patches/patch-lib_os.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_os.c,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
+
+--- lib/os.c.orig 2011-01-18 13:32:50.000000000 +0000
++++ lib/os.c
+@@ -175,7 +175,11 @@ int *os_bind_inet_socket(unsigned long p
+
+ snprintf(port_str, sizeof(port_str), "%lu", port);
+ bzero((void *) &ai_hints, sizeof(ai_hints));
++#ifdef AI_ADDRCONFIG
+ ai_hints.ai_flags = AI_PASSIVE|AI_ADDRCONFIG;
++#else
++ ai_hints.ai_flags = AI_PASSIVE;
++#endif
+ ai_hints.ai_family = AF_UNSPEC;
+ ai_hints.ai_socktype = SOCK_STREAM;
+
diff --git a/mail/prayer/patches/patch-lib_os__bsd.h b/mail/prayer/patches/patch-lib_os__bsd.h
new file mode 100644
index 00000000000..eaec76eff13
--- /dev/null
+++ b/mail/prayer/patches/patch-lib_os__bsd.h
@@ -0,0 +1,12 @@
+$NetBSD: patch-lib_os__bsd.h,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
+
+--- lib/os_bsd.h.orig 2010-07-08 09:34:25.000000000 +0000
++++ lib/os_bsd.h
+@@ -11,6 +11,6 @@
+ #ifdef __GLIBC__
+ #include <sys/file.h>
+ #include <pty.h>
+-#else
++#elif !defined(__NetBSD__)
+ #include <libutil.h>
+ #endif
diff --git a/mail/prayer/patches/patch-aj b/mail/prayer/patches/patch-man_Makefile
index f513292348b..18ccdd1be41 100644
--- a/mail/prayer/patches/patch-aj
+++ b/mail/prayer/patches/patch-man_Makefile
@@ -1,8 +1,8 @@
-$NetBSD: patch-aj,v 1.1 2010/06/08 12:34:38 adam Exp $
+$NetBSD: patch-man_Makefile,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
---- man/Makefile.orig 2008-09-16 11:59:57 +0200
-+++ man/Makefile 2010-05-01 21:37:04 +0200
-@@ -18,7 +18,7 @@
+--- man/Makefile.orig 2008-09-16 09:59:57.000000000 +0000
++++ man/Makefile
+@@ -18,7 +18,7 @@ install:
PUBLIC_DIR=$(PUBLIC_DIR) PRIVATE_DIR=$(PRIVATE_DIR) \
PUBLIC_FILE=$(PUBLIC_FILE) PRIVATE_FILE=$(PRIVATE_FILE) \
PUBLIC_EXEC=$(PUBLIC_FILE) PRIVATE_EXEC=$(PRIVATE_EXEC) \
diff --git a/mail/prayer/patches/patch-ad b/mail/prayer/patches/patch-servers_Makefile
index 2bded5f5e16..ed783f85109 100644
--- a/mail/prayer/patches/patch-ad
+++ b/mail/prayer/patches/patch-servers_Makefile
@@ -1,22 +1,22 @@
-$NetBSD: patch-ad,v 1.6 2010/06/08 12:34:38 adam Exp $
+$NetBSD: patch-servers_Makefile,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
---- servers/Makefile.orig 2009-08-20 11:48:35 +0200
-+++ servers/Makefile 2010-05-01 21:00:07 +0200
-@@ -101,13 +101,13 @@
+--- servers/Makefile.orig 2010-07-01 12:08:54.000000000 +0000
++++ servers/Makefile
+@@ -107,13 +107,13 @@ clean:
-rm -f $(BIN) core *.o *.flc *~ \#*\#
install: all
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
-+ $(BSD_INSTALL_PROGRAM_DIR) \
++ $(INSTALL) -m $(PUBLIC_DIR) -d \
$(BROOT)$(BIN_DIR)
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
-+ $(BSD_INSTALL_PROGRAM) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
prayer $(BROOT)$(BIN_DIR)
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
-+ $(BSD_INSTALL_PROGRAM) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
prayer-chroot $(BROOT)$(BIN_DIR)
- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
-+ $(BSD_INSTALL_PROGRAM) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
prayer-session $(BROOT)$(BIN_DIR)
prayer: $(PRAYER_OBJS) prayer_main.o
diff --git a/mail/prayer/patches/patch-utils_Makefile b/mail/prayer/patches/patch-utils_Makefile
new file mode 100644
index 00000000000..984299b6597
--- /dev/null
+++ b/mail/prayer/patches/patch-utils_Makefile
@@ -0,0 +1,25 @@
+$NetBSD: patch-utils_Makefile,v 1.1 2011/06/30 01:17:38 schnoebe Exp $
+
+--- utils/Makefile.orig 2009-03-19 17:30:03.000000000 +0000
++++ utils/Makefile
+@@ -72,15 +72,15 @@ clean:
+ -rm -f $(BIN) core *.o *.flc *~ \#*\#
+
+ install: all
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_DIR) -d \
++ $(INSTALL) -m $(PUBLIC_DIR) -d \
+ $(BROOT)$(BIN_DIR)
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
+ prayer-ssl-prune $(BROOT)$(BIN_DIR)
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
+ prayer-sem-prune $(BROOT)$(BIN_DIR)
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
+ prayer-db-prune $(BROOT)$(BIN_DIR)
+- $(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_EXEC) \
++ $(INSTALL) -m $(PUBLIC_EXEC) \
+ prayer-cyclog $(BROOT)$(BIN_DIR)
+
+ prayer-ssl-prune: $(PRUNE_OBJS)