summaryrefslogtreecommitdiff
path: root/mail/exim
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-08-02 17:00:06 +0000
committerjmmv <jmmv@pkgsrc.org>2003-08-02 17:00:06 +0000
commit31f27473853e2435089133e31458c0e1c1f50ae8 (patch)
treee2a8755d9490554970c9f55f57e1d14d2d7f92ea /mail/exim
parent511e8c6c51ddfac5274cd2ce718dfbb9dd8ab48d (diff)
downloadpkgsrc-31f27473853e2435089133e31458c0e1c1f50ae8.tar.gz
Convert exim and exim-user to the bsd.pkg.install.mk framework:
- Introduce EXIM_GROUP and EXIM_USER to tune the details of the group and user used by the daemon. - Honour PKG_SYSCONFDIR. - Install sample files under the examples directory. - Automatically install example files under sysconfdir using CONF_FILES. This simplifies exim's set up from admin's point of view. - Use RCD_SCRIPTS to handle the startup script. As a result, bump PKGREVISION of exim and exim-user.
Diffstat (limited to 'mail/exim')
-rw-r--r--mail/exim/MESSAGE23
-rw-r--r--mail/exim/Makefile61
-rw-r--r--mail/exim/PLIST9
-rw-r--r--mail/exim/distinfo12
-rw-r--r--mail/exim/files/exim.sh (renamed from mail/exim/files/exim)7
-rw-r--r--mail/exim/patches/patch-aa28
-rw-r--r--mail/exim/patches/patch-ab29
-rw-r--r--mail/exim/patches/patch-ac4
-rw-r--r--mail/exim/patches/patch-ad4
-rw-r--r--mail/exim/patches/patch-ae4
10 files changed, 110 insertions, 71 deletions
diff --git a/mail/exim/MESSAGE b/mail/exim/MESSAGE
index a3fc2a9d162..c755634bf82 100644
--- a/mail/exim/MESSAGE
+++ b/mail/exim/MESSAGE
@@ -1,19 +1,20 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.2 2002/06/19 16:02:26 ad Exp $
+$NetBSD: MESSAGE,v 1.3 2003/08/02 17:00:08 jmmv Exp $
To use exim, you will need to perform the following steps manually; it is
inappropriate for this package to make the changes for you.
-1. Set the correct ownership and permissions on the exim log directory:
- chown mail:mail /var/log/exim && chmod 750 /var/log/exim
-3. Read the documentation. Edit ${PREFIX}/etc/exim/configure to taste.
-4. Back-up /etc/mailer.conf to /etc/mailer.conf.sendmail.
- Copy ${PREFIX}/etc/exim/mailer.conf.exim to /etc/mailer.conf.
-5. Set 'sendmail=NO', 'exim=YES' and exim_flags to some sane value in
- /etc/rc.conf (previously it was "-bd -q15m"). Copy ${PREFIX}/etc/rc.d/exim
- to /etc/rc.d.
-6. Configuring log rotation is dependant on personal taste and the version of
- NetBSD in use. See weekly.conf(5), newsyslog(8), exicyclog and eximstats.
+1. Read the documentation. Edit ${PKG_SYSCONFDIR}/configure to taste.
+2. Edit ${PKG_SYSCONFDIR}/aliases to taste (or override it with the default
+ /etc/aliases system file).
+3. Back-up /etc/mailer.conf to /etc/mailer.conf.sendmail.
+ Copy ${EGDIR}/mailer.conf to /etc/mailer.conf.
+4. Set 'sendmail=NO', 'exim=YES' and exim_flags to some sane value in
+ /etc/rc.conf (previously it was "-bd -q15m").
+ Copy ${PREFIX}/etc/rc.d/exim to /etc/rc.d.
+5. Configuring log rotation is dependant on personal taste and the version
+ of NetBSD in use. See weekly.conf(5), newsyslog(8), exicyclog and
+ eximstats.
Also note:
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index f4948641a5c..80ec5d76d10 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.36 2003/07/17 21:45:58 grant Exp $
+# $NetBSD: Makefile,v 1.37 2003/08/02 17:00:08 jmmv Exp $
DISTNAME= exim-4.10
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= mail net
MASTER_SITES= ftp://ftp.exim.org/pub/exim/exim4/ \
ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \
@@ -12,44 +12,61 @@ MAINTAINER= ad@NetBSD.org
HOMEPAGE= http://www.exim.org/
COMMENT= The Exim mail transfer agent, a replacement for sendmail
+DEPENDS+= exim-user>=4.10nb1:../../mail/exim-user
+
USE_PERL5= yes
USE_BUILDLINK2= yes
+USE_PKGINSTALL= yes
MAKE_ENV+= SSLBASE=${SSLBASE:Q}
-DEPENDS+= exim-user>=4.10:../../mail/exim-user
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+= EXIM_GROUP EXIM_USER
+
+PKG_SYSCONFSUBDIR= exim
+EGDIR= ${PREFIX}/share/examples/exim
+CONF_FILES= ${EGDIR}/aliases ${PKG_SYSCONFDIR}/aliases
+CONF_FILES+= ${EGDIR}/configure ${PKG_SYSCONFDIR}/configure
+MESSAGE_SUBST+= EGDIR="${EGDIR}"
+
+RCD_SCRIPTS= exim
+
+OWN_DIRS_PERMS= /var/log/exim ${EXIM_USER} ${EXIM_GROUP} 750
+
+# XXX: The following will be handled by buildlink2 at some point.
+CFLAGS+= ${_STRIPFLAG_CC}
pre-patch:
${MKDIR} ${WRKSRC}/Local
${CP} ${WRKSRC}/src/EDITME ${WRKSRC}/Local/Makefile.netbsd
pre-configure:
- ${SED} -e 's:@PREFIX@:${PREFIX}:' \
+ ${SED} -e 's:@PREFIX@:${PREFIX}:g' \
+ -e 's:@PKG_SYSCONFDIR@:${PKG_SYSCONFDIR}:g' \
+ -e 's:@EXIM_USER@:${EXIM_USER}:g' \
+ -e 's:@EXIM_GROUP@:${EXIM_GROUP}:g' \
< ${WRKSRC}/Local/Makefile.netbsd \
> ${WRKSRC}/Local/Makefile
+ ${SED} -e 's:@PREFIX@:${PREFIX}:g' \
+ -e 's:@PKG_SYSCONFDIR@:${PKG_SYSCONFDIR}:g' \
+ < ${WRKSRC}/src/configure.default \
+ > ${WRKSRC}/src/configure.default.new
+ ${MV} ${WRKSRC}/src/configure.default.new \
+ ${WRKSRC}/src/configure.default
-pre-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/etc/exim
- ${INSTALL_DATA_DIR} /var/log/exim
- ${CHMOD} 750 /var/log/exim
- strip ${WRKSRC}/build-*/exim
- strip ${WRKSRC}/build-*/exim_dbmbuild
- strip ${WRKSRC}/build-*/exim_tidydb
- strip ${WRKSRC}/build-*/exim_fixdb
- strip ${WRKSRC}/build-*/exim_dumpdb
- strip ${WRKSRC}/build-*/exim_lock
-
-post-install:
- ${SED} -e 's:@PREFIX@:${PREFIX}:' \
- ${FILESDIR}/exim \
- > ${PREFIX}/etc/rc.d/exim
+post-build:
${SED} -e 's:@PREFIX@:${PREFIX}:' \
${FILESDIR}/exim_newaliases \
- > ${PREFIX}/sbin/exim_newaliases
- ${CHMOD} ugo+x ${PREFIX}/sbin/exim_newaliases
+ > ${WRKDIR}/exim_newaliases
${SED} -e 's:@PREFIX@:${PREFIX}:' \
${FILESDIR}/mailer.conf.exim \
- > ${PREFIX}/etc/exim/mailer.conf.exim
+ > ${WRKDIR}/mailer.conf
+
+pre-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/exim_newaliases ${PREFIX}/sbin
+ ${INSTALL_DATA} ${WRKDIR}/mailer.conf ${EGDIR}
.include "../../security/openssl/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/exim/PLIST b/mail/exim/PLIST
index 471b3c0202a..293a81c42ad 100644
--- a/mail/exim/PLIST
+++ b/mail/exim/PLIST
@@ -1,6 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2002/12/09 11:38:04 ad Exp $
-etc/exim/configure.example
-etc/exim/mailer.conf.exim
+@comment $NetBSD: PLIST,v 1.5 2003/08/02 17:00:08 jmmv Exp $
etc/rc.d/exim
sbin/exicyclog
sbin/exigrep
@@ -17,4 +15,7 @@ sbin/eximstats
sbin/exinext
sbin/exiqsumm
sbin/exiwhat
-@dirrm etc/exim
+share/examples/exim/aliases
+share/examples/exim/configure
+share/examples/exim/mailer.conf
+@dirrm share/examples/exim
diff --git a/mail/exim/distinfo b/mail/exim/distinfo
index 86fffd37772..69ee1cbe771 100644
--- a/mail/exim/distinfo
+++ b/mail/exim/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.10 2003/03/22 12:37:24 jmmv Exp $
+$NetBSD: distinfo,v 1.11 2003/08/02 17:00:08 jmmv Exp $
SHA1 (exim-4.10.tar.bz2) = cd374dde11a24fd12aa1c0ff72270d876d9c180d
Size (exim-4.10.tar.bz2) = 1037997 bytes
-SHA1 (patch-aa) = c892a73a1850a9ce53828e88ca9d646407aa0ff2
-SHA1 (patch-ab) = 1180e73bff8f7cee712fb64d8c2a647057a56184
-SHA1 (patch-ac) = 6bb782eb07c724da82be3aefcdf9a4bf90906687
-SHA1 (patch-ad) = 2e4fe6eec1772946c6ed615df56459abc0f2d06d
-SHA1 (patch-ae) = 18c0ad924a709abc5c2a7e334ce53cb3413d4d3b
+SHA1 (patch-aa) = 9ef7ef419781ad7fceb55fa346b4d0abd2c37bc1
+SHA1 (patch-ab) = 6fcddd0d315dd19fa3a45cb30043a36bdb1ded84
+SHA1 (patch-ac) = 6f514aa7e52c3ccca6db8e95d521a1c43f8f515f
+SHA1 (patch-ad) = ec9f2404a0aa9bf0663e2146f203c08bcaf0295d
+SHA1 (patch-ae) = 5ca61d792b9426e0ae2da71643ea53c0ddf9cc2d
diff --git a/mail/exim/files/exim b/mail/exim/files/exim.sh
index 69237585343..5d0db37d800 100644
--- a/mail/exim/files/exim
+++ b/mail/exim/files/exim.sh
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: exim,v 1.1 2001/06/26 00:21:47 wiz Exp $
+# $NetBSD: exim.sh,v 1.4 2003/08/02 17:00:09 jmmv Exp $
#
# PROVIDE: mail
# REQUIRE: LOGIN
+#
. /etc/rc.subr
@@ -11,7 +12,7 @@ name="exim"
rcvar=$name
command="@PREFIX@/sbin/${name}"
pidfile="/var/run/${name}.pid"
-required_files="@PREFIX@/etc/exim/configure"
+required_files="@PKG_SYSCONFDIR@/configure"
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/exim/patches/patch-aa b/mail/exim/patches/patch-aa
index d57436817ef..89ee5e014fc 100644
--- a/mail/exim/patches/patch-aa
+++ b/mail/exim/patches/patch-aa
@@ -1,13 +1,31 @@
-$NetBSD: patch-aa,v 1.3 2002/06/19 16:02:27 ad Exp $
+$NetBSD: patch-aa,v 1.4 2003/08/02 17:00:10 jmmv Exp $
---- scripts/exim_install.orig Thu Jun 13 12:06:12 2002
-+++ scripts/exim_install Thu Jun 13 12:07:28 2002
-@@ -42,6 +42,8 @@
+--- scripts/exim_install.orig 2002-07-22 10:59:47.000000000 +0200
++++ scripts/exim_install
+@@ -42,6 +42,8 @@ INFO_DIRECTORY=`sed -n -e '/^ *INFO_DIRE
NO_SYMLINK=`sed -n -e '/^ *NO_SYMLINK *=/{s/^[^=]*= *//; s/ \{1,\}#.*//;s/ *$//;h;}' -e '${g;p;}' Makefile`
EXE=`sed -n -e '/^ *EXE *=/{s/^[^=]*= *//; s/ \{1,\}#.*//;s/ *$//;h;}' -e '${g;p;}' Makefile`
-+INST_CONFIGURE_FILE=$CONFIGURE_FILE.example
++INST_CONFIGURE_FILE=${PREFIX}/share/examples/exim/configure
+
# Allow INST_xx to over-ride xx
case "$INST_BIN_DIRECTORY" in ?*) BIN_DIRECTORY="$INST_BIN_DIRECTORY";; esac
case "$INST_CONFIGURE_FILE" in ?*) CONFIGURE_FILE="$INST_CONFIGURE_FILE";; esac
+@@ -278,15 +280,8 @@ if [ ! -f ${CONFIGURE_FILE} ]; then
+ echo $com "*** Exim installation ${ver}failed ***"
+ exit 1
+ fi
+- if [ ! -f /etc/aliases ]; then
+- echo $com '****'
+- echo $com Installing a dummy /etc/aliases file because you do not have
+- echo $com one, and the default configuration requires it. You should
+- echo $com edit /etc/aliases and at least create an alias for postmaster.
+- echo $com '***'
+- echo ${CP} ../src/aliases.default /etc/aliases
+- ${real} ${CP} ../src/aliases.default /etc/aliases
+- fi
++ echo ${CP} ../src/aliases.default ${PREFIX}/share/examples/exim/aliases
++ ${real} ${CP} ../src/aliases.default ${PREFIX}/share/examples/exim/aliases
+ else
+ echo $com Configuration file ${CONFIGURE_FILE} already exists
+ fi
diff --git a/mail/exim/patches/patch-ab b/mail/exim/patches/patch-ab
index 0b40dc6284d..d3c0154979b 100644
--- a/mail/exim/patches/patch-ab
+++ b/mail/exim/patches/patch-ab
@@ -1,6 +1,6 @@
-$NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
+$NetBSD: patch-ab,v 1.8 2003/08/02 17:00:10 jmmv Exp $
---- Local/Makefile.netbsd.orig 2003-03-22 13:37:47.000000000 +0100
+--- Local/Makefile.netbsd.orig 2003-07-30 20:51:26.000000000 +0200
+++ Local/Makefile.netbsd
@@ -98,7 +98,9 @@
# /usr/local/sbin. The installation script will try to create this directory,
@@ -18,20 +18,21 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
# configuration if this file does not exist.
-CONFIGURE_FILE=/usr/exim/configure
-+CONFIGURE_FILE=@PREFIX@/etc/exim/configure
++CONFIGURE_FILE=@PKG_SYSCONFDIR@/configure
#------------------------------------------------------------------------------
-@@ -126,7 +128,7 @@ CONFIGURE_FILE=/usr/exim/configure
+@@ -126,7 +128,8 @@ CONFIGURE_FILE=/usr/exim/configure
# owner of a local mailbox.) Specifying these values as root is very strongly
# discouraged. These values are compiled into the binary.
-EXIM_USER=
-+EXIM_USER=mail
++EXIM_USER=@EXIM_USER@
++EXIM_GROUP=@EXIM_GROUP@
# If the setting of EXIM_USER is numeric (e.g. EXIM_USER=42), there must
# also be a setting of EXIM_GROUP. If, on the other hand, you use a name
-@@ -207,7 +209,7 @@ TRANSPORT_SMTP=yes
+@@ -207,7 +210,7 @@ TRANSPORT_SMTP=yes
# This one is special-purpose, and commonly not required, so it is not
# included by default.
@@ -40,7 +41,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
#------------------------------------------------------------------------------
-@@ -216,9 +218,9 @@ TRANSPORT_SMTP=yes
+@@ -216,9 +219,9 @@ TRANSPORT_SMTP=yes
# MBX, is included only when requested. If you do not know what this is about,
# leave these settings commented out.
@@ -53,7 +54,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
#------------------------------------------------------------------------------
-@@ -281,7 +283,7 @@ LOOKUP_LSEARCH=yes
+@@ -281,7 +284,7 @@ LOOKUP_LSEARCH=yes
# files are defaulted in the OS/Makefile-Default file, but can be overridden in
# local OS-specific make files.
@@ -62,7 +63,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
-@@ -302,9 +304,9 @@ EXIM_MONITOR=eximon.bin
+@@ -302,9 +305,9 @@ EXIM_MONITOR=eximon.bin
# included in the Exim binary. You will then need to set up the run time
# configuration to make use of the mechanism(s) selected.
@@ -75,7 +76,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
#------------------------------------------------------------------------------
-@@ -315,8 +317,9 @@ EXIM_MONITOR=eximon.bin
+@@ -315,8 +318,9 @@ EXIM_MONITOR=eximon.bin
# with TLS support. If you don't know what this is all about, leave these
# settings commented out.
@@ -87,7 +88,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
# If you are running Exim as a server, note that just building it with TLS
# support is not all you need to do. You also need to set up a suitable
-@@ -371,7 +374,7 @@ EXIM_MONITOR=eximon.bin
+@@ -371,7 +375,7 @@ EXIM_MONITOR=eximon.bin
# %s. This will be replaced by one of the strings "main", "panic", or "reject"
# to form the final file names. Some installations may want something like this:
@@ -96,7 +97,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
# which results in files with names /var/log/exim_mainlog, etc. The directory
# in which the log files are placed must exist; Exim does not try to create
-@@ -467,14 +470,14 @@ ZCAT_COMMAND=/usr/bin/zcat
+@@ -467,14 +471,14 @@ ZCAT_COMMAND=/usr/bin/zcat
# this setting. See the manual section entitled "Use of tcpwrappers" in the
# chapter on building and installing Exim.
@@ -113,7 +114,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
# but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM
# as well.
-@@ -511,11 +514,11 @@ ZCAT_COMMAND=/usr/bin/zcat
+@@ -511,11 +515,11 @@ ZCAT_COMMAND=/usr/bin/zcat
# haven't got Perl, Exim will still build and run; you just won't be able to
# use those utilities.
@@ -130,7 +131,7 @@ $NetBSD: patch-ab,v 1.7 2003/03/22 12:37:25 jmmv Exp $
#------------------------------------------------------------------------------
-@@ -695,7 +698,7 @@ ZCAT_COMMAND=/usr/bin/zcat
+@@ -695,7 +699,7 @@ ZCAT_COMMAND=/usr/bin/zcat
# (process id) to a file so that it can easily be identified. The path of the
# file can be specified here. Some installations may want something like this:
diff --git a/mail/exim/patches/patch-ac b/mail/exim/patches/patch-ac
index 4658df43820..bb710d89f53 100644
--- a/mail/exim/patches/patch-ac
+++ b/mail/exim/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.4 2002/06/19 16:02:27 ad Exp $
+$NetBSD: patch-ac,v 1.5 2003/08/02 17:00:10 jmmv Exp $
--- OS/Makefile-NetBSD-a.out.orig Thu Apr 18 08:08:28 2002
+++ OS/Makefile-NetBSD-a.out Thu Jun 13 12:37:38 2002
@@ -7,7 +7,7 @@ $NetBSD: patch-ac,v 1.4 2002/06/19 16:02:27 ad Exp $
CHOWN_COMMAND=/usr/sbin/chown
-CFLAGS=-O
-+CFLAGS=-O2 -pipe
++CFLAGS+=-O2 -pipe
HAVE_SA_LEN=YES
+HAVE_IPV6=YES
diff --git a/mail/exim/patches/patch-ad b/mail/exim/patches/patch-ad
index 94c9996fcd5..60200fb4fdc 100644
--- a/mail/exim/patches/patch-ad
+++ b/mail/exim/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.3 2002/12/09 11:38:05 ad Exp $
+$NetBSD: patch-ad,v 1.4 2003/08/02 17:00:10 jmmv Exp $
--- OS/Makefile-NetBSD~ Mon Jul 22 09:59:45 2002
+++ OS/Makefile-NetBSD Mon Dec 9 11:22:09 2002
@@ -8,7 +8,7 @@ $NetBSD: patch-ad,v 1.3 2002/12/09 11:38:05 ad Exp $
-# Include Makfile.NetBSD-a.out
+CHOWN_COMMAND=/usr/sbin/chown
-+CFLAGS=-O2 -pipe
++CFLAGS+=-O2 -pipe
-.if exists(OS/Makefile-NetBSD-a.out)
-.include "OS/Makefile-NetBSD-a.out"
diff --git a/mail/exim/patches/patch-ae b/mail/exim/patches/patch-ae
index 02b67c51ae6..c40e513d54f 100644
--- a/mail/exim/patches/patch-ae
+++ b/mail/exim/patches/patch-ae
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.3 2002/12/09 11:38:06 ad Exp $
+$NetBSD: patch-ae,v 1.4 2003/08/02 17:00:10 jmmv Exp $
--- src/configure.default.orig Thu Jun 13 11:37:52 2002
+++ src/configure.default Thu Jun 13 11:38:06 2002
@@ -7,7 +7,7 @@ $NetBSD: patch-ae,v 1.3 2002/12/09 11:38:06 ad Exp $
allow_fail
allow_defer
- data = ${lookup{$local_part}lsearch{/etc/aliases}}
-+ data = ${lookup{$local_part}dbm{/etc/mail/aliases.db}}
++ data = ${lookup{$local_part}lsearch{@PKG_SYSCONFDIR@/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe