From 96ed62e548e50a9aee6b8af5dd1ecee6562b0e25 Mon Sep 17 00:00:00 2001 From: Eray Aslan Date: Tue, 29 Nov 2011 21:52:06 +0000 Subject: Version bump. Create piddir if necessary in init script and remove bashism. Remove unused patch files. Package-Manager: portage-2.1.10.39/cvs/Linux x86_64 --- mail-filter/spamass-milter/ChangeLog | 10 +- mail-filter/spamass-milter/Manifest | 36 ++-- .../files/spamass-milter-popen.patch | 233 --------------------- .../spamass-milter/files/spamass-milter.conf2 | 11 - .../spamass-milter/files/spamass-milter.rc2 | 27 --- .../spamass-milter/files/spamass-milter.rc4 | 55 +++++ .../spamass-milter/spamass-milter-0.3.2.ebuild | 46 ++++ 7 files changed, 128 insertions(+), 290 deletions(-) delete mode 100644 mail-filter/spamass-milter/files/spamass-milter-popen.patch delete mode 100644 mail-filter/spamass-milter/files/spamass-milter.conf2 delete mode 100755 mail-filter/spamass-milter/files/spamass-milter.rc2 create mode 100644 mail-filter/spamass-milter/files/spamass-milter.rc4 create mode 100644 mail-filter/spamass-milter/spamass-milter-0.3.2.ebuild (limited to 'mail-filter') diff --git a/mail-filter/spamass-milter/ChangeLog b/mail-filter/spamass-milter/ChangeLog index 06fe8f35b3d8..281d4a5faca9 100644 --- a/mail-filter/spamass-milter/ChangeLog +++ b/mail-filter/spamass-milter/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for mail-filter/spamass-milter # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/ChangeLog,v 1.29 2011/11/23 10:32:35 eras Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/ChangeLog,v 1.30 2011/11/29 21:52:06 eras Exp $ + +*spamass-milter-0.3.2 (29 Nov 2011) + + 29 Nov 2011; Eray Aslan +spamass-milter-0.3.2.ebuild, + +files/spamass-milter.rc4, -files/spamass-milter.conf2, + -files/spamass-milter.rc2, -files/spamass-milter-popen.patch: + Version bump. Create piddir if necessary in init script and remove bashism. + Remove unused patch files. 23 Nov 2011; Eray Aslan -spamass-milter-0.3.1-r4.ebuild: remove old diff --git a/mail-filter/spamass-milter/Manifest b/mail-filter/spamass-milter/Manifest index 4a0b91bdd8e8..bfdb0f6dfb47 100644 --- a/mail-filter/spamass-milter/Manifest +++ b/mail-filter/spamass-milter/Manifest @@ -5,29 +5,29 @@ AUX README.gentoo 1680 RMD160 db0fa0f42f83626d9a62a6d3fdb9b69ff67b1967 SHA1 1241 AUX spamass-milter-auth_users.patch 3570 RMD160 51c98d93f3510818548c9d743072a18ddd570bc0 SHA1 9a638034c8372d96797e11b59c469b1d30bd70fd SHA256 7838552434d4da78bf33d3ce1f21243adcf1df5b1bd39f9550d2453c832049b9 AUX spamass-milter-header.patch 631 RMD160 40f8bae7a0c6ca5a36e3dbf897259f27456c1797 SHA1 62f66a25ec9457832f85adfa6c6e0a117f736f0a SHA256 8286c2b6c6ea5fb760ffa4f2f1815b2ef7aa596fa5e160a78cb778e887a3ffad AUX spamass-milter-popen-r1.patch 6642 RMD160 af5f26fd99ec0d000e6678f180cde74920cfad73 SHA1 efe29c896400edc58e15de1f014d9fdda9deffd0 SHA256 2f6e4a8700d0d838901b2cd62fc428bb077f87580f098b66f72b3d6dfae54d86 -AUX spamass-milter-popen.patch 6117 RMD160 6a85ef58265981e3c051fa515dec76a679682257 SHA1 66e07e44932ba86d47227541bcbed30127ca918e SHA256 e8e5a20e94efda41f3d83aa68559f79abbae340ffaebb45c4143045745520547 -AUX spamass-milter.conf2 445 RMD160 0cdfdb269142d732780d0cc028494d5a606ef8bd SHA1 dd177e36ec5672b1991ef11d852a6da636a3202d SHA256 a7f4f6c57bbfb76fab2c627e916696812e9a562f8c2b3657899de6448f40bd06 AUX spamass-milter.conf3 903 RMD160 04d98b6b4cd9bf3b0966b596ae4ba710c1c6f90a SHA1 7f16ac4ec6a118b822517777000247381d0634d8 SHA256 f1969e8d1dcba108c379469a5e88e4286624c994bb8e22fd563d1f5cc4063617 -AUX spamass-milter.rc2 702 RMD160 bd20e0bb09a96af2f2192b05bbfd6107d231baef SHA1 65e631aed7c495317602ab019acc562cb37361a4 SHA256 669242a2c1e65fd651e03fb2f4a537b816b08b9a88e1f4790d8f9b4928357f7a AUX spamass-milter.rc3 1039 RMD160 8b7c049bc1e7509f2d3043705c27b47f0a38e167 SHA1 9cb52b238d44f0ea04cbf46a0d8f7ef7244fc349 SHA256 e8acb8f341d7f5d4cfd9b77da7ef75407c543020546fcf52556f3b07e0781665 +AUX spamass-milter.rc4 1446 RMD160 7057f6152f37931adbb5baa93cd25f5dac8fcf8a SHA1 16d67bdd1188988cb30435a2104ca2e5212666c1 SHA256 6b2bfe9a5fbc59092b478f2d460f73abe3d43902ae83e637ff543bd06f3a4584 DIST spamass-milter-0.3.1.tar.bz2 116591 RMD160 49946c80ac99e04190981cd6c8de12ef54f0619d SHA1 71f8f2d56baf47058789c61e76c5cffd4046da5a SHA256 d7423835af7bb9cdf97bba7f31c5bea197dc86a600133d354aa6083bf1bbd24c +DIST spamass-milter-0.3.2.tar.bz2 125350 RMD160 2acd06dc998a7d381f2425c5711fd83a57059809 SHA1 9a490748797e22a38b615e2e6a8f5f90a4834bfc SHA256 ba2eb8c9e4c50307ffae38bb06444b9830695e742e9fd8c9da40953e7e1d830b EBUILD spamass-milter-0.3.1-r5.ebuild 1329 RMD160 60f1905d8d3f9d27ce9eb1f4fa9852d3d792b11d SHA1 55ab7e11a605b458ab6504fc072228e5ba482c2d SHA256 2675e6fff4ee96d2f5dea4618e39045a3ce9b2880ee577180318a4780c431afe -MISC ChangeLog 5128 RMD160 d155b10fb600d1c8cd03e433c0f0710377ab0c3b SHA1 25a01b80bbf2d8b906b97e38f09a3407dc8bd85d SHA256 621213f5f12e3b806796ecaf1d444b1fdeaf190417906af2c0e7c9364a958f69 +EBUILD spamass-milter-0.3.2.ebuild 1150 RMD160 e84470281964934a2cb047bfeed2873b59d688b6 SHA1 fec9d7d64ba32fe9f0ea7cdf1ec152ef1ce1f5a9 SHA256 8bfd78bbe11a0745bb8a2f6035f0591f4cef892547e621f530fab98de41f4b0b +MISC ChangeLog 5469 RMD160 730e3ffb1c26a5037eda1c8f95a6b83ab005a1b7 SHA1 baeb4b720f2cfe6a8243a639d4c6a067dc772adc SHA256 6bf60af801c5af6aeb6a7853b3027f4cb8db649e5583a2f4e22c4d327e0517ee MISC metadata.xml 162 RMD160 fd38b82541901b3c6df18b630d79fe7883ae3f01 SHA1 e6aecefcc2137d6047cedfe447686775ab59cb48 SHA256 569031668e39895fb20829fb17a49a91a83e8f41b2195b0f04825c4340d2af6b -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) +Version: GnuPG v2.0.18 (GNU/Linux) -iQIcBAEBCAAGBQJOzMvKAAoJEHfx8XVYajsf4A8P/3EFdXruvswUKJfHYexs0uQR -zocuu01n6LimUItA8CvjCzjnCl5vZUkWFjNxzEP+AyJPEXpB8iRn/F/7Uc0mPDSO -zzytHZ9DsUkESpRqK5rnak42BKpuCDFPPKNiTjpZ3te9Nf4cnTQUdW5MSuHiZtPW -7ggIVi6RXbb8jODCn4iI4W6dFzltw+WvnL537PLgSMnmTU5yTNaXo/8TBDS7PnBX -DmUwfoiKkVvCUFJWAK3UlQJQmh2W8VQtPou1N+ukh/AQCanSZs8wAAz4vHrLk1Gw -pbcRFNEF4pbPyvElEMBJKLUKkbDQT7YyqJ+gr47WJqQwXKFQGdfPOPcelurFvA8r -iSm7TI8JtYEGXiH8z30AHjeGQ4YiQ0RRcrlaUyQ2jS7zRJ7lxy/NH8Xg+mxLhLHr -KWkUU0rJPoAAIsGLG9BjMvxcL4Gu1oaUaArUqxO5HM2kBzSRiB2talpl+HW3INXS -/4+N11IvTNSp3JRyxjB0l1JXMgYSlGu4SM65t67NE1Tsd2Dyr+us8zzK0c4Iaba8 -+D8wTXMkTC725IZLAbG7tNFCUqlgQoz4whxF7iHVhm7PPg6RJb0gN2/xTG4L7KmQ -KjpJs9RUnUP6Arlfxv/X6aC4Al1v+h9YuhvHyOfZpZtRjZGhdVojeiPnXBHSdijW -4gkjMf+HFES7Cs1cdXqi -=FXoM +iQIcBAEBCAAGBQJO1VQLAAoJEHfx8XVYajsfPA8QAJ5HKWSzKHeg3VTQNWxQWw6o +0XifQXcEuK3qlOnC/huf4H/HBZZqOswwx4eWo/e3K19EnRXhug1YcQA9babhWZF+ +MO/lZx9HDqHgue+c6IxU6ygerUVqjwn1gbRSVurjGqOI3zaJtxp4aUj9eqbBdrd4 +fzXfBRsfr76pspOzR2u2Mt8MYPIJeUNS1/vk3+zU/Yo+olqeGftGbBioOOiDZ55P +OvlV/GZqVj1uFSZcnyTVQLzdgBr9bX4j7UDmR8f402xADi6wdqMe/Zbu5X676VF/ +tlG77NNajtq4d7yebwPEOwG6wc9nnVx6XBQKpC5jA0QdhWfMGhRIW2CmtO3JUZ5I +kGKnyXLV4MUI+GyB4plpY35ybZUInlFfrLN7i10Un/+OqGSuEUU3IMzET9pv1Snx +3ZEKbLeVHerFoua2SPWDYpJ29njjtFn0DMCbsda4vvL4jD8mHgQDbQTimOj8laLC +zLaqftGTKF6mC8Mt8ED2/NTRwO1dac1L+HceS8OlIZL2aJuAW2Wv3CsEsl1FVFGK +9EKEG+BwRI4zECtJJWwF85/ZyiLO3C28NQKwjE5d5SNokC9d+MMisLbCteTAmTR8 +JT5ec2u4c928zLtXiDwjYnqqM/azqP9s3ix0tnmJCbOgbBTfpcV+1ulckteQvrgi +ODIVEfzXQL2SKKr4VPd1 +=RU6l -----END PGP SIGNATURE----- diff --git a/mail-filter/spamass-milter/files/spamass-milter-popen.patch b/mail-filter/spamass-milter/files/spamass-milter-popen.patch deleted file mode 100644 index 3a7279cc2bda..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter-popen.patch +++ /dev/null @@ -1,233 +0,0 @@ -See bug #310049 - -Index: spamass-milter.cpp -=================================================================== -RCS file: /cvsroot/spamass-milt/spamass-milt/spamass-milter.cpp,v -retrieving revision 1.91 -diff -u -r1.91 spamass-milter.cpp ---- spamass-milter.cpp 24 Jul 2006 19:59:17 -0000 1.91 -+++ spamass-milter.cpp 10 Mar 2010 18:52:22 -0000 -@@ -171,10 +171,6 @@ - bool flag_expand = false; /* alias/virtusertable expansion */ - bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */ - --#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */ --static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER; --#endif -- - // {{{ main() - - int -@@ -461,59 +457,24 @@ - send another copy. The milter API will not let you send the - message AND return a failure code to the sender, so this is - the only way to do it. */ --#if defined(__FreeBSD__) -- int rv; --#endif -- --#if defined(HAVE_ASPRINTF) -- char *buf; --#else -- char buf[1024]; --#endif -- char *fmt="%s \"%s\""; -+ char *popen_argv[3]; - FILE *p; - --#if defined(HAVE_ASPRINTF) -- asprintf(&buf, fmt, SENDMAIL, spambucket); --#else --#if defined(HAVE_SNPRINTF) -- snprintf(buf, sizeof(buf)-1, fmt, SENDMAIL, spambucket); --#else -- /* XXX possible buffer overflow here */ -- sprintf(buf, fmt, SENDMAIL, spambucket); --#endif --#endif -- -- debug(D_COPY, "calling %s", buf); --#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */ -- rv = pthread_mutex_lock(&popen_mutex); -- if (rv) -- { -- debug(D_ALWAYS, "Could not lock popen mutex: %s", strerror(rv)); -- abort(); -- } --#endif -- p = popen(buf, "w"); -+ popen_argv[0] = SENDMAIL; -+ popen_argv[1] = spambucket; -+ popen_argv[2] = NULL; -+ -+ debug(D_COPY, "calling %s %s", SENDMAIL, spambucket); -+ p = popenv(popen_argv, "w"); - if (!p) - { -- debug(D_COPY, "popen failed(%s). Will not send a copy to spambucket", strerror(errno)); -+ debug(D_COPY, "popenv failed(%s). Will not send a copy to spambucket", strerror(errno)); - } else - { - // Send message provided by SpamAssassin - fwrite(assassin->d().c_str(), assassin->d().size(), 1, p); -- pclose(p); p = NULL; -+ fclose(p); p = NULL; - } --#if defined(__FreeBSD__) -- rv = pthread_mutex_unlock(&popen_mutex); -- if (rv) -- { -- debug(D_ALWAYS, "Could not unlock popen mutex: %s", strerror(rv)); -- abort(); -- } --#endif --#if defined(HAVE_ASPRINTF) -- free(buf); --#endif - } - return SMFIS_REJECT; - } -@@ -842,30 +803,19 @@ - /* open a pipe to sendmail so we can do address expansion */ - - char buf[1024]; -- char *fmt="%s -bv \"%s\" 2>&1"; -- --#if defined(HAVE_SNPRINTF) -- snprintf(buf, sizeof(buf)-1, fmt, SENDMAIL, envrcpt[0]); --#else -- /* XXX possible buffer overflow here */ -- sprintf(buf, fmt, SENDMAIL, envrcpt[0]); --#endif -+ char *popen_argv[4]; -+ -+ popen_argv[0] = SENDMAIL; -+ popen_argv[1] = "-bv"; -+ popen_argv[2] = envrcpt[0]; -+ popen_argv[3] = NULL; - -- debug(D_RCPT, "calling %s", buf); -+ debug(D_RCPT, "calling %s -bv %s", SENDMAIL, envrcpt[0]); - --#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */ -- rv = pthread_mutex_lock(&popen_mutex); -- if (rv) -- { -- debug(D_ALWAYS, "Could not lock popen mutex: %s", strerror(rv)); -- abort(); -- } --#endif -- -- p = popen(buf, "r"); -+ p = popenv(popen_argv, "r"); - if (!p) - { -- debug(D_RCPT, "popen failed(%s). Will not expand aliases", strerror(errno)); -+ debug(D_RCPT, "popenv failed(%s). Will not expand aliases", strerror(errno)); - assassin->expandedrcpt.push_back(envrcpt[0]); - } else - { -@@ -890,16 +840,8 @@ - assassin->expandedrcpt.push_back(p+7); - } - } -- pclose(p); p = NULL; -+ fclose(p); p = NULL; - } --#if defined(__FreeBSD__) -- rv = pthread_mutex_unlock(&popen_mutex); -- if (rv) -- { -- debug(D_ALWAYS, "Could not unlock popen mutex: %s", strerror(rv)); -- abort(); -- } --#endif - } else - { - assassin->expandedrcpt.push_back(envrcpt[0]); -@@ -2157,5 +2099,71 @@ - warnedmacro = true; - } - -+/* -+ untrusted-argument-safe popen function - only supports "r" and "w" modes -+ for simplicity, and always reads stdout and stderr in "r" mode. Call -+ fclose to close the FILE. -+*/ -+FILE *popenv(char *const argv[], const char *type) -+{ -+ FILE *iop; -+ int pdes[2]; -+ int save_errno; -+ if ((*type != 'r' && *type != 'w') || type[1]) -+ { -+ errno = EINVAL; -+ return (NULL); -+ } -+ if (pipe(pdes) < 0) -+ return (NULL); -+ switch (fork()) { -+ -+ case -1: /* Error. */ -+ save_errno = errno; -+ (void)close(pdes[0]); -+ (void)close(pdes[1]); -+ errno = save_errno; -+ return (NULL); -+ /* NOTREACHED */ -+ case 0: /* Child. */ -+ if (*type == 'r') { -+ /* -+ * The dup2() to STDIN_FILENO is repeated to avoid -+ * writing to pdes[1], which might corrupt the -+ * parent's copy. This isn't good enough in -+ * general, since the exit() is no return, so -+ * the compiler is free to corrupt all the local -+ * variables. -+ */ -+ (void)close(pdes[0]); -+ (void)dup2(pdes[1], STDOUT_FILENO); -+ (void)dup2(pdes[1], STDERR_FILENO); -+ if (pdes[1] != STDOUT_FILENO && pdes[1] != STDERR_FILENO) { -+ (void)close(pdes[1]); -+ } -+ } else { -+ if (pdes[0] != STDIN_FILENO) { -+ (void)dup2(pdes[0], STDIN_FILENO); -+ (void)close(pdes[0]); -+ } -+ (void)close(pdes[1]); -+ } -+ execv(argv[0], argv); -+ exit(127); -+ /* NOTREACHED */ -+ } -+ -+ /* Parent; assume fdopen can't fail. */ -+ if (*type == 'r') { -+ iop = fdopen(pdes[0], type); -+ (void)close(pdes[1]); -+ } else { -+ iop = fdopen(pdes[1], type); -+ (void)close(pdes[0]); -+ } -+ -+ return (iop); -+} -+ - // }}} - // vim6:ai:noexpandtab -Index: spamass-milter.h -=================================================================== -RCS file: /cvsroot/spamass-milt/spamass-milt/spamass-milter.h,v -retrieving revision 1.23 -diff -u -r1.23 spamass-milter.h ---- spamass-milter.h 7 Apr 2005 02:04:24 -0000 1.23 -+++ spamass-milter.h 10 Mar 2010 18:52:22 -0000 -@@ -186,5 +186,6 @@ - void parse_debuglevel(char* string); - char *strlwr(char *str); - void warnmacro(char *macro, char *scope); -+FILE *popenv(char *const argv[], const char *type); - - #endif diff --git a/mail-filter/spamass-milter/files/spamass-milter.conf2 b/mail-filter/spamass-milter/files/spamass-milter.conf2 deleted file mode 100644 index 66728f100b83..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter.conf2 +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 1999-2006 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/files/spamass-milter.conf2,v 1.1 2006/05/29 18:06:30 gustavoz Exp $ - -DAEMON=/usr/sbin/spamass-milter -SOCKET=/var/run/milter/spamass-milter.sock -PIDFILE=/var/run/milter/spamass-milter.pid -USER="milter" - -# Example: reject mails above score 20 -#OPTIONS="-r 20" diff --git a/mail-filter/spamass-milter/files/spamass-milter.rc2 b/mail-filter/spamass-milter/files/spamass-milter.rc2 deleted file mode 100755 index 089b0d1f68b5..000000000000 --- a/mail-filter/spamass-milter/files/spamass-milter.rc2 +++ /dev/null @@ -1,27 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/files/spamass-milter.rc2,v 1.1 2006/05/29 18:06:30 gustavoz Exp $ - -depend() { - need net spamd - use logger - before sendmail -} - -start() { - ebegin "Starting spamass-milter" - start-stop-daemon --start --quiet --pidfile ${PIDFILE} -c ${USER} \ - --exec ${DAEMON} -- -P ${PIDFILE} -p ${SOCKET} -f ${OPTIONS} - eend $? "Failed to start ${DAEMON}" -} - -stop() { - ebegin "Stopping spamass-milter" - start-stop-daemon --stop --quiet --pidfile ${PIDFILE} && - { - sleep 5 - rm -f ${SOCKET} - } - eend $? "Failed to stop ${DAEMON}" -} diff --git a/mail-filter/spamass-milter/files/spamass-milter.rc4 b/mail-filter/spamass-milter/files/spamass-milter.rc4 new file mode 100644 index 000000000000..d1a938b724b5 --- /dev/null +++ b/mail-filter/spamass-milter/files/spamass-milter.rc4 @@ -0,0 +1,55 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/files/spamass-milter.rc4,v 1.1 2011/11/29 21:52:06 eras Exp $ + +depend() { + need net spamd + use logger + before mta +} + +piddir=${PIDFILE%/*} +socketdir=${SOCKET%/*} + +checkconfig() { + if [ ! -d ${piddir:=/var/run/milter} ]; then + checkpath -q -d -o milter:milter -m 0755 ${piddir} || return 1 + fi + if [ ! -d ${socketdir:=/var/run/milter} ]; then + checkpath -q -d -o ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} \ + -m 0755 ${socketdir} || return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting spamass-milter" + start-stop-daemon --start --quiet --pidfile ${PIDFILE} -u ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} \ + --exec ${DAEMON} -- -P ${PIDFILE} -p ${SOCKET} -f ${OPTIONS} + eend $? "Failed to start ${DAEMON}" + spamass_timeout=0 + while [ $spamass_timeout -le 20 ] + do + if [ ! -S "${SOCKET}" -o ! -r "${SOCKET}" ] + then + sleep 1 + spamass_timeout=$(( $spamass_timeout+1 )) + else + break + fi + done + echo $spamass_timeout + chown ${SOCKET_USER:-milter}:${SOCKET_GROUP:-milter} ${SOCKET} 1>/dev/null 2>&1 + chmod ${SOCKET_MODE:-664} ${SOCKET} 1>/dev/null 2>&1 +} + +stop() { + ebegin "Stopping spamass-milter" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} && + { + sleep 5 + rm -f ${SOCKET} + } + eend $? "Failed to stop ${DAEMON}" +} diff --git a/mail-filter/spamass-milter/spamass-milter-0.3.2.ebuild b/mail-filter/spamass-milter/spamass-milter-0.3.2.ebuild new file mode 100644 index 000000000000..315a1a962102 --- /dev/null +++ b/mail-filter/spamass-milter/spamass-milter-0.3.2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamass-milter/spamass-milter-0.3.2.ebuild,v 1.1 2011/11/29 21:52:06 eras Exp $ + +EAPI=4 + +inherit eutils + +IUSE="" + +DESCRIPTION="A milter for SpamAssassin" +HOMEPAGE="http://savannah.nongnu.org/projects/spamass-milt/" +SRC_URI="http://savannah.nongnu.org/download/spamass-milt/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( mail-filter/libmilter mail-mta/sendmail ) + >=mail-filter/spamassassin-3.1.0" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup milter + enewuser milter -1 -1 /var/lib/milter milter +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-auth_users.patch +} + +src_install() { + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/spamass-milter.rc4 spamass-milter + newconfd "${FILESDIR}"/spamass-milter.conf3 spamass-milter + dodir /var/lib/milter + keepdir /var/lib/milter + fowners milter:milter /var/lib/milter + + dodoc AUTHORS NEWS README ChangeLog "${FILESDIR}/README.gentoo" +} + +pkg_postinst() { + elog "Documentation is installed in /usr/share/doc/${P}" +} -- cgit v1.2.3-65-gdbad