aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2008-07-26 10:41:17 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2008-07-26 10:41:17 +0000
commit4fd6e01f06b0dafbefa085dae459d1ad53c80a64 (patch)
tree5b10e4b5395ee67dd274a0f5d1900068edbf51e4
parent9fce4b4fed24f1af276371e3057679133c799d99 (diff)
downloadports-4fd6e01f06b0dafbefa085dae459d1ad53c80a64.tar.gz
ports-4fd6e01f06b0dafbefa085dae459d1ad53c80a64.zip
Notes
-rw-r--r--mail/milter-greylist/Makefile45
-rw-r--r--mail/milter-greylist/files/milter-greylist.in4
-rw-r--r--mail/milter-greylist/files/milter-greylist.sh34
-rw-r--r--mail/milter-greylist/pkg-message20
-rw-r--r--mail/milter-greylist/pkg-plist7
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