diff --git a/srcpkgs/spampd/files/spampd/run b/srcpkgs/spampd/files/spampd/run new file mode 100755 index 00000000000..7c19ace4ea9 --- /dev/null +++ b/srcpkgs/spampd/files/spampd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec spampd --nodetach ${OPTS:=--host=127.0.0.1:10025 --relayhost=127.0.0.1:10026 --a --rh --u=_spampd --g=_spampd --maxsize=512} diff --git a/srcpkgs/spampd/patches/perl-5.18-fixes.patch b/srcpkgs/spampd/patches/perl-5.18-fixes.patch new file mode 100644 index 00000000000..41b71409a4c --- /dev/null +++ b/srcpkgs/spampd/patches/perl-5.18-fixes.patch @@ -0,0 +1,42 @@ +diff --git a/spampd b/spampd +index 7b1f234..2798d50 100644 +--- spampd ++++ spampd +@@ -937,6 +937,10 @@ if ( !$options{logsock} ) { + }; + } + ++# untaint some args to prevent errors in other modules ++($pidfile) = ($pidfile =~ /^(.+)$/); ++($relayhost) = ($relayhost =~ /^(.+)$/); ++($relayport) = ($relayport =~ /^(.+)$/); + + my $server = bless { + server => {host => $host, +@@ -1147,10 +1151,10 @@ L. + + =head1 Requires + +-=over 5 +- + Perl modules: + ++=over 5 ++ + =item B + + =item B +@@ -1478,11 +1482,11 @@ Prints usage information. + + =head2 Deprecated Options + +-=over 5 +- + The following options are no longer used but still accepted for backwards + compatibility with prevoius I versions: + ++=over 5 ++ + =item B<--dead-letters> + + =item B<--heloname> diff --git a/srcpkgs/spampd/template b/srcpkgs/spampd/template new file mode 100644 index 00000000000..b5fbfb6a48c --- /dev/null +++ b/srcpkgs/spampd/template @@ -0,0 +1,25 @@ +# Template file for 'spampd' +pkgname=spampd +version=2.30 +revision=1 +hostmakedepends="perl" +depends="perl perl-Net-Server spamassassin" +build_style=gnu-makefile +short_desc="SMTP proxy used scan messages for spam" +maintainer="Enno Boland " +license="GPL-3" +homepage="http://www.worlddesign.com/index.cfm/page/software/open-source/spampd.htm" +distfiles="https://github.com/downloads/mpaperno/$pkgname/$pkgname-$version.tar.gz" +checksum=c980e55f46c7757fd45294e5268766253123490d0158d2ee36ad5700ddf823bb +noarch=yes +system_accounts="_spampd" +_spampd_homedir="/var/lib/spampd" + +pre_install() { + sed -i '/INSTALL.* \(spampd.default\|spampd-init.sh\) /d' Makefile +} +post_install() { + vmkdir usr/bin + mv $DESTDIR/usr/sbin/* $DESTDIR/usr/bin + vsv spampd +}