summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2008-05-12 21:49:38 +0000
committerAlfredo Tupone <tupone@gentoo.org>2008-05-12 21:49:38 +0000
commit7acc3fd56682e5a3c58e0fceab45aedf3ba430c8 (patch)
tree5e516f26d7aa158c8978a69302f67fadb0133c68 /mail-filter/spamdyke
parent- Keyworded ~arm per request. Builds native but fails at cross-compiles. (diff)
downloadgentoo-2-7acc3fd56682e5a3c58e0fceab45aedf3ba430c8.tar.gz
gentoo-2-7acc3fd56682e5a3c58e0fceab45aedf3ba430c8.tar.bz2
gentoo-2-7acc3fd56682e5a3c58e0fceab45aedf3ba430c8.zip
Version bump to 3.1.7. patched to build with gcc hardened
(Portage version: 2.1.4.4)
Diffstat (limited to 'mail-filter/spamdyke')
-rw-r--r--mail-filter/spamdyke/ChangeLog9
-rw-r--r--mail-filter/spamdyke/files/spamdyke-3.1.7-nested.patch88
-rw-r--r--mail-filter/spamdyke/spamdyke-3.1.7.ebuild72
3 files changed, 168 insertions, 1 deletions
diff --git a/mail-filter/spamdyke/ChangeLog b/mail-filter/spamdyke/ChangeLog
index 3b5e7db2dd2f..a43b3cb3184d 100644
--- a/mail-filter/spamdyke/ChangeLog
+++ b/mail-filter/spamdyke/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-filter/spamdyke
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamdyke/ChangeLog,v 1.3 2008/02/11 21:59:07 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamdyke/ChangeLog,v 1.4 2008/05/12 21:49:37 tupone Exp $
+
+*spamdyke-3.1.7 (12 May 2008)
+
+ 12 May 2008; <atupone@gentoo.org> +files/spamdyke-3.1.7-nested.patch,
+ +spamdyke-3.1.7.ebuild:
+ Version bump to 3.1.7
+ Make it build with hardened gcc
*spamdyke-3.1.6 (11 Feb 2008)
diff --git a/mail-filter/spamdyke/files/spamdyke-3.1.7-nested.patch b/mail-filter/spamdyke/files/spamdyke-3.1.7-nested.patch
new file mode 100644
index 000000000000..dc2290213d32
--- /dev/null
+++ b/mail-filter/spamdyke/files/spamdyke-3.1.7-nested.patch
@@ -0,0 +1,88 @@
+--- configure.ac.old 2008-05-12 23:07:42.000000000 +0200
++++ configure.ac 2008-05-12 23:15:47.000000000 +0200
+@@ -45,7 +45,7 @@
+ AC_CHECK_LIB([ssl],
+ [SSL_library_init],
+ [ LIBS="$LIBS -lssl"
+- AC_DEFINE([HAVE_LIBSSL], [1])
++ AC_DEFINE([HAVE_LIBSSL], [1], [Defined if Openssl library exists])
+ AC_MSG_CHECKING([for OpenSSL libraries (for TLS support)])
+ AC_MSG_RESULT([yes])
+ ],
+@@ -66,11 +66,12 @@
+
+ # Checks for the flag to compile anonymous inner functions.
+ AC_MSG_CHECKING([whether anonymous inner functions are supported by default])
++OLD_CFLAGS=$CFLAGS
++CFLAGS="$OLD_CFLAGS -w"
+ AC_TRY_COMPILE([],
+ [ int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); ],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_RESULT([no])
+- OLD_CFLAGS=$CFLAGS
+ CFLAGS="$OLD_CFLAGS -fnested-functions"
+ AC_MSG_CHECKING([whether anonymous inner functions are supported with -fnested-functions])
+ AC_TRY_COMPILE([],
+@@ -102,7 +103,7 @@
+ [ int i;
+ i = PACKETSZ; ],
+ [ AC_MSG_RESULT([yes])
+- AC_DEFINE([HAVE_NAMESER_COMPAT], [1]) ],
++ AC_DEFINE([HAVE_NAMESER_COMPAT], [1], [Defined if nameserver constant are defined in arpa/nameser_compat.h]) ],
+ [ AC_MSG_RESULT([no])
+ AC_MSG_FAILURE([Unable to compile without nameserver constants.])
+ ])
+@@ -114,7 +115,7 @@
+ [ struct dirent tmp_dirent;
+ tmp_dirent.d_type = 0; ],
+ [ AC_MSG_RESULT([yes])
+- AC_DEFINE([HAVE_DIRENT_TYPES], [1])
++ AC_DEFINE([HAVE_DIRENT_TYPES], [1], [Defined if dirent type exists])
+ AC_MSG_CHECKING([whether readdir() and stat() understand whiteout files])
+ AC_TRY_COMPILE([ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -122,7 +123,7 @@
+ [ short dir_wht = DT_WHT;
+ mode_t stat_wht = S_IFWHT; ],
+ [ AC_MSG_RESULT([yes])
+- AC_DEFINE([HAVE_WHITEOUT], [1]) ],
++ AC_DEFINE([HAVE_WHITEOUT], [1], [Defined if have whiteout]) ],
+ [ AC_MSG_RESULT([no]) ])
+ ],
+ [ AC_MSG_RESULT([no]) ])
+@@ -132,9 +133,9 @@
+ #include <unistd.h> ],
+ [ printf("%u", getpid()); ],
+ [ AC_MSG_RESULT([unsigned int])
+- AC_DEFINE([FORMAT_PID_T], ["%u"]) ],
++ AC_DEFINE([FORMAT_PID_T], ["%u"], [Defined if unsigned int]) ],
+ [ AC_MSG_RESULT([unsigned long])
+- AC_DEFINE([FORMAT_PID_T], ["%lu"]) ])
++ AC_DEFINE([FORMAT_PID_T], ["%lu"], [Defined if unsigned long]) ])
+
+ AC_MSG_CHECKING([whether uid_t is an unsigned int or an unsigned long])
+ AC_TRY_COMPILE([ #include <stdio.h>
+@@ -142,9 +143,9 @@
+ #include <unistd.h> ],
+ [ printf("%u", getuid()); ],
+ [ AC_MSG_RESULT([unsigned int])
+- AC_DEFINE([FORMAT_UID_T], ["%u"]) ],
++ AC_DEFINE([FORMAT_UID_T], ["%u"], [Defined if unsigned int]) ],
+ [ AC_MSG_RESULT([unsigned long])
+- AC_DEFINE([FORMAT_UID_T], ["%lu"]) ])
++ AC_DEFINE([FORMAT_UID_T], ["%lu"], [Defined if unsigned long]) ])
+
+ AC_MSG_CHECKING([whether gid_t is an unsigned int or an unsigned long])
+ AC_TRY_COMPILE([ #include <stdio.h>
+@@ -152,9 +153,9 @@
+ #include <unistd.h> ],
+ [ printf("%u", getgid()); ],
+ [ AC_MSG_RESULT([unsigned int])
+- AC_DEFINE([FORMAT_GID_T], ["%u"]) ],
++ AC_DEFINE([FORMAT_GID_T], ["%u"], [Defined if unsigned int]) ],
+ [ AC_MSG_RESULT([unsigned long])
+- AC_DEFINE([FORMAT_GID_T], ["%lu"]) ])
++ AC_DEFINE([FORMAT_GID_T], ["%lu"]), [Defined if unsigned long] ])
+
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
diff --git a/mail-filter/spamdyke/spamdyke-3.1.7.ebuild b/mail-filter/spamdyke/spamdyke-3.1.7.ebuild
new file mode 100644
index 000000000000..3a7d36d90585
--- /dev/null
+++ b/mail-filter/spamdyke/spamdyke-3.1.7.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamdyke/spamdyke-3.1.7.ebuild,v 1.1 2008/05/12 21:49:37 tupone Exp $
+
+EAPI="1"
+
+inherit eutils autotools
+
+DESCRIPTION="A drop-in connection-time spam filter for qmail"
+HOMEPAGE="http://www.spamdyke.org/"
+SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+tls"
+
+DEPEND="tls? ( dev-libs/openssl )"
+
+S=${WORKDIR}/${P}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-nested.patch
+ echo "# Configuration option for ${PN}" > ${PN}.conf
+ if use tls; then
+ echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
+ >> ${PN}.conf
+ fi
+ echo "graylist-dir=/var/tmp/${PN}/graylist" >> ${PN}.conf
+ echo "never-graylist-rdns-dir=/etc/${PN}/never-graylist" >> ${PN}.conf
+ echo "reject-empty-rdns" >> ${PN}.conf
+ echo "reject-unresolvable-rdns" >> ${PN}.conf
+ eautoreconf
+}
+
+src_compile() {
+ econf --with-debug \
+ $(use_enable tls) || die "econf failed"
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+ cd ../utils
+ econf || die "econf failed in utils"
+ emake CFLAGS="${CFLAGS}" || die "emake in utils died"
+}
+
+src_install() {
+ dobin ${PN} || die "Installing ${PN} binary failed"
+ insinto /etc/${PN}
+ doins ${PN}.conf || die "Installing ${PN} configuration file failed"
+ keepdir /var/tmp/${PN}/graylist/$(../utils/domain2path -d localhost)
+ fowners -R qmaild /var/tmp/${PN}
+ insinto /etc/${PN}/never-graylist/$(../utils/domain2path -d localhost)
+ touch localhost
+ doins localhost
+ cd ../utils
+ dobin domain2path || die "Installing domain2path binary failed"
+ cd ../documentation
+ dodoc {Changelog,INSTALL,UPGRADING}.txt
+ dohtml FAQ.html \
+ README.html \
+ README_ip_file_format.html \
+ README_rdns_directory_format.html \
+ README_rdns_file_format.html
+}
+
+pkg_postinst() {
+ elog "In /var/qmail/control/conf-smtpd insert the line:"
+ elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
+ elog "Run spamdyke with the '-h' flag to see the available options and"
+ elog "update /etc/spamdyke.conf accordingly"
+}