diff options
author | pawel <pawel@FreeBSD.org> | 2013-03-09 06:27:59 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2013-03-09 06:27:59 +0800 |
commit | 356159bac5ed90d23eac9db0ca796bdaf6a984e5 (patch) | |
tree | 730a24fa7c1ef01cd00b5d0b99e3948f566aa9c9 /mail/avenger | |
parent | 5c5db989d7000be387dd86d2b111f0ba8e2956d8 (diff) | |
download | freebsd-ports-gnome-356159bac5ed90d23eac9db0ca796bdaf6a984e5.tar.gz freebsd-ports-gnome-356159bac5ed90d23eac9db0ca796bdaf6a984e5.tar.zst freebsd-ports-gnome-356159bac5ed90d23eac9db0ca796bdaf6a984e5.zip |
- Update to version 0.8.3
- Remove leading article from COMMENT
- Get database dependency through USE_BDB
- Support OptionsNG, add DOCS and SASL options
- Use port framework for user and group creation
- Make daemon binary look for config files in ETCDIR not /etc
- Install config files in ETCDIR and preserve them when modified
Diffstat (limited to 'mail/avenger')
-rw-r--r-- | mail/avenger/Makefile | 62 | ||||
-rw-r--r-- | mail/avenger/distinfo | 4 | ||||
-rw-r--r-- | mail/avenger/files/patch-Makefile.in | 14 | ||||
-rw-r--r-- | mail/avenger/files/pkg-message.in | 8 | ||||
-rw-r--r-- | mail/avenger/pkg-deinstall | 34 | ||||
-rw-r--r-- | mail/avenger/pkg-install | 51 | ||||
-rw-r--r-- | mail/avenger/pkg-plist | 12 |
7 files changed, 68 insertions, 117 deletions
diff --git a/mail/avenger/Makefile b/mail/avenger/Makefile index da74145ca6a7..583a33c29817 100644 --- a/mail/avenger/Makefile +++ b/mail/avenger/Makefile @@ -1,28 +1,22 @@ -# New ports collection makefile for: avenger -# Date created: 8 May 2005 -# Whom: dm -# +# Created by: dm # $FreeBSD$ -# -# If you would like to use SASL authentication, you will need to define: -# -# WITH_AVENGER_SASL2=yes -# -# in your make.conf file. -# PORTNAME= avenger -PORTVERSION= 0.8.1 -PORTREVISION= 1 +PORTVERSION= 0.8.3 CATEGORIES= mail MASTER_SITES= http://www.mailavenger.org/dist/ MAINTAINER= ports@FreeBSD.org -COMMENT= An anti-spam SMTP server - -LIB_DEPENDS= db-4.3:${PORTSDIR}/databases/db43 +COMMENT= Anti-spam SMTP server GNU_CONFIGURE= yes +USE_BDB= 43 + +USERS= ${PORTNAME} +GROUPS= ${USERS} + +PORTDOCS= INSTALL INSTALL.html README NEWS +SUB_FILES= pkg-message MAN1= aliascheck.1 avenger.1 dbutil.1 deliver.1 dotlock.1 \ edinplace.1 escape.1 macutil.1 mailexec.1 match.1 \ @@ -31,19 +25,37 @@ MAN5= asmtpd.conf.5 MAN8= asmtpd.8 avenger.local.8 CONFIGURE_ENV= WFLAGS='-Wall' -CONFIGURE_ARGS= --with-db=${LOCALBASE} +CONFIGURE_ARGS= --with-db=${LOCALBASE} --with-etcdir=${ETCDIR} + +OPTIONS_DEFINE= SASL -.if defined(WITH_AVENGER_SASL2) -LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 -# Note, for version 0.7.2, the --enable-sasl=/... syntax is broken -#CONFIGURE_ARGS+= --enable-sasl=${LOCALBASE} +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MSASL} +LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --enable-sasl .endif -pre-install: - PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL - post-install: - PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} POST-INSTALL + ${MKDIR} ${ETCDIR} +.for file in asmtpd.conf unknown + ${INSTALL_DATA} ${WRKSRC}/etc/${file} ${ETCDIR}/${file}.sample + @if [ ! -f ${ETCDIR}/${file} ]; then \ + ${CP} -p ${ETCDIR}/${file}.sample ${ETCDIR}/${file} ; \ + fi +.endfor + ${INSTALL_DATA} ${WRKSRC}/etc/pf.os ${PREFIX}/share + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/etc/smtp-filter.pf ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/etc/avsendmail.m4 ${DATADIR} + +.if ${PORT_OPTIONS:MDOCS} + ${MKDIR} ${DOCSDIR} +.for file in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} +.endfor +.endif + + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/mail/avenger/distinfo b/mail/avenger/distinfo index a70c3023176c..177557dd1b99 100644 --- a/mail/avenger/distinfo +++ b/mail/avenger/distinfo @@ -1,2 +1,2 @@ -SHA256 (avenger-0.8.1.tar.gz) = 580c06121bc0cc68431f5ef02b110bbba45a733d444b034a775c970597e84a1a -SIZE (avenger-0.8.1.tar.gz) = 830234 +SHA256 (avenger-0.8.3.tar.gz) = 0242648ddb4f26d39e89049a23cf5ab2f8992105f124e7334835daaf636cc4b7 +SIZE (avenger-0.8.3.tar.gz) = 874695 diff --git a/mail/avenger/files/patch-Makefile.in b/mail/avenger/files/patch-Makefile.in new file mode 100644 index 000000000000..78bae428e241 --- /dev/null +++ b/mail/avenger/files/patch-Makefile.in @@ -0,0 +1,14 @@ +--- ./Makefile.in.orig 2013-03-08 21:13:45.000000000 +0100 ++++ ./Makefile.in 2013-03-08 21:16:55.000000000 +0100 +@@ -287,9 +287,9 @@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + LYNX = lynx +-SUBDIRS = libasync asmtpd util local doc etc ++SUBDIRS = libasync asmtpd util local doc + libexec_SCRIPTS = avenger +-sample_DATA = INSTALL INSTALL.html ++sample_DATA = + CLEANFILES = core *.core *~ + DISTCLEANFILES = autom4te*.cache config.status config.log avenger + EXTRA_DIST = .gitignore avenger.in INSTALL.html LICENSE diff --git a/mail/avenger/files/pkg-message.in b/mail/avenger/files/pkg-message.in new file mode 100644 index 000000000000..7fb99d75c510 --- /dev/null +++ b/mail/avenger/files/pkg-message.in @@ -0,0 +1,8 @@ +----------------------------------------------------------- + +Before using Mail Avenger, you will need to configure it. +Instructions are available in: + +%%DATADIR%%/INSTALL + +----------------------------------------------------------- diff --git a/mail/avenger/pkg-deinstall b/mail/avenger/pkg-deinstall deleted file mode 100644 index 9b1bcdb4f6fc..000000000000 --- a/mail/avenger/pkg-deinstall +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -if [ -n "${PACKAGE_BUILDING}" ]; then - exit 0 -fi - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=avenger -GROUP=avenger -AVDIR=/var/spool/avenger -AVETC=/etc/avenger - -PW=/usr/sbin/pw - -if ${PW} groupshow "${GROUP}" >/dev/null 2>&1; then - echo - echo "If you're done with Mail Avenger permanently, delete the $GROUP group manually: pw groupdel ${GROUP}" | fmt -fi - -if ${PW} usershow "${USER}" >/dev/null 2>&1; then - echo - echo "If you're done with Mail Avenger permanently, delete the $USER user manually: pw userdel ${USER}" | fmt -fi - -for dir in "$AVETC" "$AVDIR"; do - if [ -d "$dir" ] && ! rmdir $dir 2>/dev/null; then - echo - echo "You may wish to investigate the contents of $dir and delete the directory if you're done with Mail Avenger permanently." | fmt - fi - echo -done diff --git a/mail/avenger/pkg-install b/mail/avenger/pkg-install deleted file mode 100644 index 7969f695eab8..000000000000 --- a/mail/avenger/pkg-install +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -if [ -n "${PACKAGE_BUILDING}" ]; then - exit 0 -fi - -USER=avenger -GROUP=avenger -AVDIR=/var/spool/avenger - -PW=/usr/sbin/pw - - -if [ "$2" = "PRE-INSTALL" ]; then - echo -n "Checking for group '$GROUP'... " - - if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then - echo -n "doesn't exist, adding... " - if ${PW} groupadd $GROUP; then - echo "success." - else - echo "FAILED!" - exit 1 - fi - else - echo "exists." - fi - - echo -n "Checking for user '$USER'... " - - if ! ${PW} usershow $USER >/dev/null 2>&1; then - echo -n "doesn't exist, adding... " - if ${PW} useradd $USER -c 'Mail Avenger' \ - -d "$AVDIR" -g $GROUP -s /sbin/nologin -h -; then - echo "success." - else - echo "FAILED!" - exit 1 - fi - else - echo "exists." - fi -elif [ "$2" = "POST-INSTALL" ]; then - echo "Before using Mail Avenger, you will need to configure it." - echo "Instructions are available in:" - echo "" - echo " ${PKG_PREFIX}/share/avenger/INSTALL" - echo "" -fi - -exit 0 diff --git a/mail/avenger/pkg-plist b/mail/avenger/pkg-plist index eff75e43c65f..eed69d3b1aaf 100644 --- a/mail/avenger/pkg-plist +++ b/mail/avenger/pkg-plist @@ -10,15 +10,17 @@ bin/match bin/sendmac bin/smtpdcheck bin/synos +@unexec if cmp -s %D/etc/avenger/asmtpd.conf.sample %D/etc/avenger/asmtpd.conf; then rm -f %D/etc/avenger/asmtpd.conf; fi +%%ETCDIR%%/asmtpd.conf.sample +@exec if [ ! -f %D/etc/avenger/asmtpd.conf ] ; then cp -p %D/%F %B/asmtpd.conf; fi +@unexec if cmp -s %D/etc/avenger/unknown.sample %D/etc/avenger/unknown; then rm -f %D/etc/avenger/unknown; fi +%%ETCDIR%%/unknown.sample +@exec if [ ! -f %D/etc/avenger/unknown ] ; then cp -p %D/%F %B/unknown; fi libexec/avenger libexec/avenger.local sbin/asmtpd -%%DATADIR%%/INSTALL -%%DATADIR%%/INSTALL.html -%%DATADIR%%/asmtpd.conf %%DATADIR%%/avsendmail.m4 -%%DATADIR%%/smtp-filter.iptables %%DATADIR%%/smtp-filter.pf -%%DATADIR%%/unknown share/pf.os @dirrm %%DATADIR%% +@dirrmtry %%ETCDIR%% |