diff options
Diffstat (limited to 'mail/milter-greylist')
-rw-r--r-- | mail/milter-greylist/Makefile | 17 | ||||
-rw-r--r-- | mail/milter-greylist/PLIST | 3 | ||||
-rw-r--r-- | mail/milter-greylist/distinfo | 4 | ||||
-rw-r--r-- | mail/milter-greylist/files/milter-greylist.sh | 6 | ||||
-rw-r--r-- | mail/milter-greylist/patches/patch-p0f.c | 47 | ||||
-rw-r--r-- | mail/milter-greylist/patches/patch-spamd.c | 36 |
6 files changed, 107 insertions, 6 deletions
diff --git a/mail/milter-greylist/Makefile b/mail/milter-greylist/Makefile index d72c7bc8400..f5d459b47f1 100644 --- a/mail/milter-greylist/Makefile +++ b/mail/milter-greylist/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.58 2013/01/08 15:54:54 tron Exp $ +# $NetBSD: Makefile,v 1.59 2013/01/11 13:23:17 tron Exp $ DISTNAME= milter-greylist-4.4.2 +PKGREVISION= 1 CATEGORIES= mail MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/ EXTRACT_SUFX= .tgz @@ -23,6 +24,7 @@ RCD_SCRIPTS= milter-greylist .include "options.mk" CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} +CONFIGURE_ARGS+= --with-conffile=${PKG_SYSCONFDIR:Q}/greylist.conf CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q} CONFIGURE_ARGS+= --with-user=${MILTER_USER} BUILD_DEFS+= MILTER_USER MILTER_GROUP VARBASE @@ -34,11 +36,24 @@ INSTALLATION_DIRS+= share/examples/milter-greylist OWN_DIRS_PERMS+= ${VARBASE}/milter-greylist ${MILTER_USER} ${MILTER_GROUP} 0755 +SUBST_CLASSES+= paths +SUBST_STAGE.paths= pre-configure +SUBST_FILES.paths= greylist.conf greylist2.conf +SUBST_SED.paths+= -e "s|/var/run|${VARBASE}/run|g" +SUBST_SED.paths+= -e "s|/var/milter-greylist|${VARBASE}/milter-greylist|g" +SUBST_MESSAGE.paths= Fixing paths in conf examples. + +EGDIR= ${PREFIX}/share/examples/milter-greylist +CONF_FILES= ${EGDIR}/greylist.conf ${PKG_SYSCONFDIR}/greylist.conf + + post-install: ${INSTALL_DATA} ${WRKSRC}/README \ ${DESTDIR}${PREFIX}/share/doc/milter-greylist ${INSTALL_DATA} ${WRKSRC}/greylist.conf \ ${DESTDIR}${PREFIX}/share/examples/milter-greylist + ${INSTALL_DATA} ${WRKSRC}/greylist2.conf \ + ${DESTDIR}${PREFIX}/share/examples/milter-greylist .include "../../mail/libmilter/buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" diff --git a/mail/milter-greylist/PLIST b/mail/milter-greylist/PLIST index dc7083a871c..dd02cdbc1d0 100644 --- a/mail/milter-greylist/PLIST +++ b/mail/milter-greylist/PLIST @@ -1,7 +1,8 @@ -@comment $NetBSD: PLIST,v 1.7 2009/06/14 18:04:38 joerg Exp $ +@comment $NetBSD: PLIST,v 1.8 2013/01/11 13:23:17 tron Exp $ bin/milter-greylist man/man8/milter-greylist.8 man/man5/greylist.conf.5 share/doc/milter-greylist/README share/examples/milter-greylist/greylist.conf +share/examples/milter-greylist/greylist2.conf share/examples/rc.d/milter-greylist diff --git a/mail/milter-greylist/distinfo b/mail/milter-greylist/distinfo index aa7771995cc..cce838cc642 100644 --- a/mail/milter-greylist/distinfo +++ b/mail/milter-greylist/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.35 2013/01/08 15:54:54 tron Exp $ +$NetBSD: distinfo,v 1.36 2013/01/11 13:23:17 tron Exp $ SHA1 (milter-greylist-4.4.2.tgz) = a87468a3ab7a9cbb051f88e043cd1f244b6a1351 RMD160 (milter-greylist-4.4.2.tgz) = 077ab452c8bb007c9f52e80be8db3475a83af410 Size (milter-greylist-4.4.2.tgz) = 230544 bytes SHA1 (patch-aa) = c42757814933001ddbcdfb77dd03e17a9c4c8283 +SHA1 (patch-p0f.c) = 512055976836662e2c39362fc17766db0ae1a7b0 +SHA1 (patch-spamd.c) = 5249c4061460cc7b1f9e2d25df0a50f6f628c728 diff --git a/mail/milter-greylist/files/milter-greylist.sh b/mail/milter-greylist/files/milter-greylist.sh index 3ed4108533b..7307a72d20b 100644 --- a/mail/milter-greylist/files/milter-greylist.sh +++ b/mail/milter-greylist/files/milter-greylist.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: milter-greylist.sh,v 1.6 2009/09/22 15:57:50 tron Exp $ +# $NetBSD: milter-greylist.sh,v 1.7 2013/01/11 13:23:17 tron Exp $ # # PROVIDE: milter-greylist @@ -10,7 +10,7 @@ name="miltergreylist" rcvar="miltergreylist" command="@PREFIX@/bin/milter-greylist" -command_args="-p /var/milter-greylist/milter-greylist.sock -u @MILTER_USER@" +command_args="-p @VARBASE@/milter-greylist/milter-greylist.sock -u @MILTER_USER@" if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then . /etc/rc.subr @@ -20,7 +20,7 @@ if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then run_rc_command "$1" else # old NetBSD, Solaris, Linux, etc... - pidfile=/var/run/${name}.pid + pidfile=@VARBASE@/run/${name}.pid case $1 in start) diff --git a/mail/milter-greylist/patches/patch-p0f.c b/mail/milter-greylist/patches/patch-p0f.c new file mode 100644 index 00000000000..0d50d022dae --- /dev/null +++ b/mail/milter-greylist/patches/patch-p0f.c @@ -0,0 +1,47 @@ +$NetBSD: patch-p0f.c,v 1.4 2013/01/11 13:23:17 tron Exp $ + +Build fix for Solaris 11. + +--- p0f.c.orig 2013-01-08 14:30:01.000000000 +0000 ++++ p0f.c +@@ -116,25 +116,25 @@ strcasestr ( haystack, needle ) + #define RESP_NOMATCH 2 + + struct p0f_query { +- u_int32_t magic; +- u_int8_t type; +- u_int32_t id; +- u_int32_t src_ad,dst_ad; +- u_int16_t src_port,dst_port; ++ uint32_t magic; ++ uint8_t type; ++ uint32_t id; ++ uint32_t src_ad,dst_ad; ++ uint16_t src_port,dst_port; + }; + struct p0f_response { +- u_int32_t magic; +- u_int32_t id; +- u_int8_t type; +- u_int8_t genre[20]; +- u_int8_t detail[40]; ++ uint32_t magic; ++ uint32_t id; ++ uint8_t type; ++ uint8_t genre[20]; ++ uint8_t detail[40]; + int8_t dist; +- u_int8_t link[30]; +- u_int8_t tos[30]; +- u_int8_t fw,nat; +- u_int8_t real; ++ uint8_t link[30]; ++ uint8_t tos[30]; ++ uint8_t fw,nat; ++ uint8_t real; + int16_t score; +- u_int16_t mflags; ++ uint16_t mflags; + int32_t uptime; + }; + /* End of stuff borrowed from p0f/p0f-query.h */ diff --git a/mail/milter-greylist/patches/patch-spamd.c b/mail/milter-greylist/patches/patch-spamd.c new file mode 100644 index 00000000000..dced3f585fe --- /dev/null +++ b/mail/milter-greylist/patches/patch-spamd.c @@ -0,0 +1,36 @@ +$NetBSD: patch-spamd.c,v 1.4 2013/01/11 13:23:17 tron Exp $ + +Fix build under Solaris 11. + +--- spamd.c.orig 2013-01-08 14:30:01.000000000 +0000 ++++ spamd.c 2013-01-11 13:07:04.000000000 +0000 +@@ -55,7 +55,11 @@ + #include "spf.h" + #include "acl.h" + #include "conf.h" ++#ifdef HAVE_OLD_QUEUE_H + #include "queue.h" ++#else ++#include <sys/queue.h> ++#endif + #include "milter-greylist.h" + + #include "spamd.h" +@@ -439,7 +443,7 @@ + struct sockaddr_un s_un; + int sock; + +- bzero(&s_un, sizeof(s_un)); ++ (void)memset(&s_un, 0, sizeof(s_un)); + s_un.sun_family = AF_UNIX; + strncpy(s_un.sun_path, path, sizeof(s_un.sun_path) - 1); + +@@ -468,7 +472,7 @@ + int e; + int sock = -1; + +- bzero(&hints, sizeof(hints)); ++ (void)memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + #ifdef AI_ADDRCONFIG + hints.ai_flags = AI_ADDRCONFIG; |