diff options
author | ache <ache@FreeBSD.org> | 2008-07-26 18:41:17 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2008-07-26 18:41:17 +0800 |
commit | b8f887a2d137ea6f00b6eb985bf502ea211021db (patch) | |
tree | 89a0fe70b7e36a57d7242ad06a0791d98c0f9876 | |
parent | 5acc20b12549975a73b5f2b125c16affb5153474 (diff) | |
download | freebsd-ports-gnome-b8f887a2d137ea6f00b6eb985bf502ea211021db.tar.gz freebsd-ports-gnome-b8f887a2d137ea6f00b6eb985bf502ea211021db.tar.zst freebsd-ports-gnome-b8f887a2d137ea6f00b6eb985bf502ea211021db.zip |
- Respect NO_INSTALL_MANPAGES
- repocopy [files/milter-greylist.sh -> files/milter-greylist.in, pkg-message -> files/pkg-message.in]
itectu@: no more .sh
- Bump PORTREVISION
- Broken messages are not quoted
- silence some portlint tab warnings
- seperate NOPORTDOCS from NOPORTEXAMPLES
- drop 5.x support
- use SUB_FILES for pkg-message processing
- make use of @dirrmtry in pkg-plist
PR: 125653
Submitted by: "Philip M. Gollucci" <pgollucci@p6m7g8.com> (almost all)
-rw-r--r-- | mail/milter-greylist/Makefile | 45 | ||||
-rw-r--r-- | mail/milter-greylist/files/milter-greylist.in | 4 | ||||
-rw-r--r-- | mail/milter-greylist/files/milter-greylist.sh | 34 | ||||
-rw-r--r-- | mail/milter-greylist/pkg-message | 20 | ||||
-rw-r--r-- | mail/milter-greylist/pkg-plist | 7 |
5 files changed, 22 insertions, 88 deletions
diff --git a/mail/milter-greylist/Makefile b/mail/milter-greylist/Makefile index a7ea3d1fc9ab..1bb88334d32b 100644 --- a/mail/milter-greylist/Makefile +++ b/mail/milter-greylist/Makefile @@ -7,6 +7,7 @@ PORTNAME= milter-greylist PORTVERSION= 4.0 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/ DISTNAME= milter-greylist-${PORTVERSION} @@ -29,10 +30,10 @@ PKGMESSAGE= ${WRKDIR}/pkg-message # installed port preference over it. ## +.if !defined (NO_INSTALL_MANPAGES) MAN5= greylist.conf.5 MAN8= milter-greylist.8 - -.include <bsd.port.pre.mk> +.endif .if !defined(WITH_SENDMAIL_BASE) && \ !defined(WITH_SENDMAIL_PORT) && \ @@ -45,7 +46,7 @@ WITH_SENDMAIL_BASE=yes _MILT_DEP= MILTERBASE= /usr .else -BROKEN= "Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes" +BROKEN= Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes .endif .else _MILT_DEP= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail @@ -56,63 +57,51 @@ MILTERBASE?= ${LOCALBASE} # If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF ## .if defined(WITH_LIBSPF2) -.if ${OSVERSION} < 502102 -IGNORE= Using libspf2 requires a thread safe resolver -.else BUILD_DEPENDS+= libspf2>=1.2.5:${PORTSDIR}/mail/libspf2 -CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE} -.endif +CONFIGURE_ARGS+= --with-libspf2=${LOCALBASE} .endif .if defined(WITH_GEOIP) BUILD_DEPENDS+= GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP -CONFIGURE_ARGS+= --with-libGeoIP=${LOCALBASE} +CONFIGURE_ARGS+= --with-libGeoIP=${LOCALBASE} .endif .if defined(WITH_CURL) -BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl +BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl CONFIGURE_ARGS+= --with-curl=${LOCALBASE} .endif RUN_DEPENDS+= ${BUILD_DEPENDS} -BUILD_DEPENDS+= ${_MILT_DEP} +BUILD_DEPENDS+= ${_MILT_DEP} CFLAGS+= ${PTHREAD_CFLAGS} LIBS+= ${PTHREAD_LIBS} GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ARGS+= --with-user=mailnull --with-libmilter=${MILTERBASE} -.if ${OSVERSION} >= 502102 -CONFIGURE_ARGS+= --enable-dnsrbl --with-thread-safe-resolver -.endif +CONFIGURE_ARGS+= --with-user=mailnull --with-libmilter=${MILTERBASE} \ + --enable-dnsrbl --with-thread-safe-resolver CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LIBS="${LIBS} " ALL_TARGET= milter-greylist +SUB_FILES+= pkg-message -USE_RC_SUBR= yes -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} - -post-extract: - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh +USE_RC_SUBR= milter-greylist do-install: @${MKDIR} ${PREFIX}/etc/mail - @${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec @${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5 @${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8 + @${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec @${INSTALL_DATA} ${WRKSRC}/greylist.conf \ ${PREFIX}/etc/mail/greylist.conf.sample - @${INSTALL_SCRIPT} ${WRKSRC}/milter-greylist.sh ${PREFIX}/etc/rc.d/ - @${SED} -e "s,%%DOCSDIR%%,${DOCSDIR},g" \ - -e "s,%%PREFIX%%,${PREFIX},g" \ - ${.CURDIR}/pkg-message > ${PKGMESSAGE} post-install: @${MKDIR} /var/milter-greylist @${CHOWN} -R mailnull /var/milter-greylist .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} - @${MKDIR} ${EXAMPLESDIR} @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif +.if !defined (NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} @${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR} .endif @${TEST} -f /var/db/milter-greylist/greylist.db && ( \ @@ -131,4 +120,4 @@ post-install: ) || ${TRUE} @${CAT} ${PKGMESSAGE} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/mail/milter-greylist/files/milter-greylist.in b/mail/milter-greylist/files/milter-greylist.in index 3ce90bbb90da..726559266f38 100644 --- a/mail/milter-greylist/files/milter-greylist.in +++ b/mail/milter-greylist/files/milter-greylist.in @@ -19,6 +19,8 @@ name="miltergreylist" rcvar=`set_rcvar` +command="%%PREFIX%%/libexec/milter-greylist" + load_rc_config $name miltergreylist_enable=${miltergreylist_enable-"NO"} @@ -29,6 +31,4 @@ miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.co miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \ -f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"} -command="%%PREFIX%%/libexec/milter-greylist" - run_rc_command "$1" diff --git a/mail/milter-greylist/files/milter-greylist.sh b/mail/milter-greylist/files/milter-greylist.sh deleted file mode 100644 index 3ce90bbb90da..000000000000 --- a/mail/milter-greylist/files/milter-greylist.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# PROVIDE: miltergreylist -# REQUIRE: LOGIN -# BEFORE: sendmail -# KEYWORD: milter-greylist - -# Define these miltergreylist_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/miltergreylist -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# - -. %%RC_SUBR%% - -name="miltergreylist" -rcvar=`set_rcvar` - -load_rc_config $name - -miltergreylist_enable=${miltergreylist_enable-"NO"} -miltergreylist_runas=${miltergreylist_runas-"mailnull"} -miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"} -miltergreylist_sockfile=${miltergreylist_sockfile-"/var/milter-greylist/milter-greylist.sock"} -miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.conf"} -miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \ --f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"} - -command="%%PREFIX%%/libexec/milter-greylist" - -run_rc_command "$1" diff --git a/mail/milter-greylist/pkg-message b/mail/milter-greylist/pkg-message deleted file mode 100644 index 2f6bb34b68fb..000000000000 --- a/mail/milter-greylist/pkg-message +++ /dev/null @@ -1,20 +0,0 @@ -===> IMPORTANT NOTE - - A sample configuration file has been installed in %%PREFIX%%/etc/mail - directory. Copy and edit it to suit your needs before launching - milter-greylist. - - Add following lines - -dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default -define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'') -define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'') -INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s') - - to your /etc/mail/<your_host>.mc configuration. - - To run milter-greylist from startup, add miltergreylist_enable="YES" - in your /etc/rc.conf or your /etc/rc.conf.local - - See %%DOCSDIR%%/README for operation details. - diff --git a/mail/milter-greylist/pkg-plist b/mail/milter-greylist/pkg-plist index ab750df836a2..41254f195013 100644 --- a/mail/milter-greylist/pkg-plist +++ b/mail/milter-greylist/pkg-plist @@ -1,12 +1,11 @@ libexec/milter-greylist etc/mail/greylist.conf.sample -etc/rc.d/milter-greylist.sh %%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%EXAMPLESDIR%%/greylist.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/greylist.conf @exec /bin/mkdir -p /var/milter-greylist @exec /usr/sbin/chown -R mailnull /var/milter-greylist @exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n** **\n** WARNING **\n** **\n** The default dump file location has changed. **\n** Please move greylist.db from /var/db/milter-greylist/ **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly. **\n** **\n************************************************************\n************************************************************\n' ||true %%PORTDOCS%%@dirrm %%DOCSDIR%% -%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% -@unexec /bin/rmdir %D/etc/mail 2>/dev/null || true +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +@dirrmtry etc/mail @unexec [ -f /var/milter-greylist/greylist.db ] || /bin/rmdir /var/milter-greylist || true |