summaryrefslogtreecommitdiff
path: root/community/dspam
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-03-02 18:00:18 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2013-03-02 18:02:35 +0100
commitbae1d2619114abb36d636273329ed6d3ae157055 (patch)
tree9a9c785204458547c0fc6b6b10357abd379a0fdd /community/dspam
parentf3a6a3f3b315c15fe04bb44a40020c3842c8ef21 (diff)
parent98aa0004e23472ee63753fded33cd55d8b942f36 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/bitcoin/PKGBUILD community/canorus/PKGBUILD community/celt-0.7/PKGBUILD community/djview4/PKGBUILD community/erlang-sdl/PKGBUILD community/erlang/PKGBUILD community/fcitx-mozc/PKGBUILD community/glitz/PKGBUILD community/gmerlin/PKGBUILD community/gmic/PKGBUILD community/goldendict/PKGBUILD community/google-gadgets/PKGBUILD community/highlight/PKGBUILD community/jack2/PKGBUILD community/kvirc/PKGBUILD community/launchy/PKGBUILD community/mplayer2/PKGBUILD community/mumble/PKGBUILD community/mupdf/PKGBUILD community/projectm/PKGBUILD community/psimedia/PKGBUILD community/pyqt3/PKGBUILD community/qps/PKGBUILD community/qstardict/PKGBUILD community/qsynergy/PKGBUILD community/synergy/PKGBUILD community/units/PKGBUILD community/yagf/PKGBUILD extra/automoc4/PKGBUILD extra/avahi/PKGBUILD extra/avidemux/PKGBUILD extra/bzflag/PKGBUILD extra/cagibi/PKGBUILD extra/cairo/PKGBUILD extra/calligra/PKGBUILD extra/cmake/PKGBUILD extra/dssi/PKGBUILD extra/ffmpeg/PKGBUILD extra/glu/PKGBUILD extra/graphviz/PKGBUILD extra/hylafax/PKGBUILD extra/kdesdk/PKGBUILD extra/libbluedevil/PKGBUILD extra/liblastfm/PKGBUILD extra/liborigin2/PKGBUILD extra/libpng/PKGBUILD extra/libqzeitgeist/PKGBUILD extra/libx11/PKGBUILD extra/mesa/PKGBUILD extra/mpg123/PKGBUILD extra/mtr/PKGBUILD extra/mysql/PKGBUILD extra/netpbm/PKGBUILD extra/nspr/PKGBUILD extra/polkit-qt/PKGBUILD extra/poppler/PKGBUILD extra/prison/PKGBUILD extra/pyqt/PKGBUILD extra/qimageblitz/PKGBUILD extra/qscintilla/PKGBUILD extra/qsynth/PKGBUILD extra/qt-assistant-compat/PKGBUILD extra/qt-gstreamer/PKGBUILD extra/qt/PKGBUILD extra/qtwebkit/PKGBUILD extra/qwt/PKGBUILD extra/samba/PKGBUILD extra/sane/PKGBUILD extra/smplayer/PKGBUILD extra/soprano/PKGBUILD extra/texmacs/PKGBUILD extra/tomcat-native/PKGBUILD extra/transmission/PKGBUILD extra/wpa_supplicant_gui/PKGBUILD libre/lame-libre/PKGBUILD libre/linux-libre/PKGBUILD libre/mesa-demos-libre/PKGBUILD
Diffstat (limited to 'community/dspam')
-rw-r--r--community/dspam/PKGBUILD45
-rw-r--r--community/dspam/dspam.install9
-rw-r--r--community/dspam/dspam.logrotated13
-rw-r--r--community/dspam/dspam_maintenance.cron6
4 files changed, 52 insertions, 21 deletions
diff --git a/community/dspam/PKGBUILD b/community/dspam/PKGBUILD
index 030116559..e95ec610b 100644
--- a/community/dspam/PKGBUILD
+++ b/community/dspam/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 77118 2012-10-05 10:37:20Z spupykin $
+# $Id: PKGBUILD 85298 2013-02-28 15:36:02Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=dspam
pkgver=3.10.2
-pkgrel=2
+pkgrel=3
pkgdesc="A scalable, open-source statistical anti-spam filter"
arch=('i686' 'x86_64' 'mips64el')
url="http://dspam.nuclearelephant.com/"
@@ -13,29 +13,35 @@ backup=('etc/dspam/dspam.conf'
'srv/http/dspam/cgi-bin/subadmins')
license=("GPL")
depends=(readline libcap ncurses zlib openssl)
-makedepends=('libmysqlclient' 'postgresql-libs' 'db' 'sqlite')
+makedepends=('libmysqlclient' 'postgresql-libs' 'db' 'sqlite' 'libldap')
optdepends=('libmysqlclient: MySQL support'
'postgresql-libs: PostgreSQL support'
'db: BerkeleyDB support'
- 'sqlite: SQLite support')
+ 'sqlite: SQLite support'
+ 'clamav: ClamAV support'
+ 'libldap: external lookup support')
options=('zipman' 'docs' '!libtool')
install=$pkgname.install
source=(http://downloads.sourceforge.net/project/dspam/dspam/dspam-$pkgver/dspam-$pkgver.tar.gz
dspam.logrotated
dspam
dspam.service
- dspam.tmpfiles)
+ dspam.tmpfiles
+ dspam_maintenance.cron)
md5sums=('0e0e405d3284485b2a43f47eaf6b09bb'
- '2163ca41de383f09f4d754e2d35cb158'
+ 'cec7e3df4cbc6feca387fb516a5b3490'
'bb2300eff5b2a6eb987750c71a2c2169'
'1581a94598cec370b66f37b118970676'
- '933643f2204ccbd7e451a439f83db1ea')
+ '933643f2204ccbd7e451a439f83db1ea'
+ 'ebfb0fec16a56f6e1a3a61ced2d5015d')
build() {
- OPTS="--with-dspam-owner=dspam --with-dspam-group=dspam --enable-daemon --enable-virtual-users \
+ OPTS="--with-dspam-owner=dspam --with-dspam-group=dspam --with-dspam-home-group=dspam --with-dspam-mode=2510 \
+ --enable-daemon --enable-virtual-users --enable-large-scale --enable-long-usernames --enable-external-lookup \
+ --enable-split-configuration --enable-syslog --enable-clamav \
+ --with-dspam-home=/var/lib/dspam --with-logdir=/var/log/dspam --with-logfile=/var/log/dspam/dspam.log \
--with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib \
- --with-storage-driver="mysql_drv,libdb4_drv,pgsql_drv,sqlite3_drv,hash_drv" --with-dspam-home=/var/lib/dspam \
- --with-logdir=/var/log/dspam --enable-preferences-extension --enable-large-scale"
+ --with-storage-driver="mysql_drv,libdb4_drv,pgsql_drv,sqlite3_drv,hash_drv" --enable-preferences-extension"
cd $srcdir/$pkgname-$pkgver
[ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr --sysconfdir=/etc/dspam --localstatedir=/var ${OPTS}
@@ -52,25 +58,32 @@ package() {
find $pkgdir/srv/http/dspam/ -type f -name '*.in' -exec rm -f {} \;
install -d $pkgdir/etc/logrotate.d \
- $pkgdir/etc/rc.d $pkgdir/var/lib/dspam/{mysql,pgsql}
+ $pkgdir/etc/rc.d \
+ $pkgdir/usr/share/dspam/{mysql,pgsql}
install -m644 ../dspam.logrotated $pkgdir/etc/logrotate.d/dspam
install -m755 ../dspam $pkgdir/etc/rc.d
sed -i 's|#ServerPID|ServerPID|' $pkgdir/etc/dspam/dspam.conf
- sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/var/run/dspam/dspam.sock\":gI' \
- -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/var/run/dspam/dspam.pid:gI' \
+ sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/run/dspam/dspam.sock\":gI' \
+ -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/run/dspam/dspam.pid:gI' \
-i $pkgdir/etc/dspam/dspam.conf
sed -i 's|/var/lib/mysql/mysql.sock|/tmp/mysql.sock|' $pkgdir/etc/dspam/dspam.conf
- cp -r src/tools.mysql_drv/*.sql $pkgdir/var/lib/dspam/mysql
- cp -r src/tools.pgsql_drv/*.sql $pkgdir/var/lib/dspam/pgsql
+ cp -r src/tools.mysql_drv/*.sql $pkgdir/usr/share/dspam/mysql
+ cp -r src/tools.pgsql_drv/*.sql $pkgdir/usr/share/dspam/pgsql
+
+ # install dspam_maintenance from contrib/
+ install -Dm0755 contrib/dspam_maintenance/dspam_maintenance.sh $pkgdir/usr/bin/dspam_maintenance
+ install -Dm0644 contrib/dspam_maintenance/dspam_maintenance.1 $pkgdir/usr/share/man/man1/dspam_maintenance.1
+ install -Dm0755 $srcdir/dspam_maintenance.cron $pkgdir/etc/cron.daily/dspam_maintenance
cd $pkgdir/usr/share/man/man3
find -type l -exec ln -sf libdspam.3 {} \;
- chmod 0755 $pkgdir/usr/bin/*
+ # make logrotate happy
+ chmod 750 $pkgdir/var/log/dspam
install -Dm0644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
install -Dm0644 $srcdir/$pkgname.tmpfiles $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf
diff --git a/community/dspam/dspam.install b/community/dspam/dspam.install
index fc74fe55e..4eac46ede 100644
--- a/community/dspam/dspam.install
+++ b/community/dspam/dspam.install
@@ -3,8 +3,10 @@ post_install() {
groupadd -g 115 dspam && echo "done."
echo -n "adding dspam system user... "
useradd -c "DSPAM Daemon" -u 115 -d /var/lib/dspam -g dspam -s /bin/false dspam \
- && echo "done."
+ && echo "done."
passwd -l dspam &>/dev/null
+ chown root:dspam usr/bin/dspamc
+ chmod g+s usr/bin/dspamc
cat << EOF
>>> To populate the DSPAM database, you need to follow several steps.
@@ -27,6 +29,11 @@ cat << EOF
EOF
}
+post_upgrade() {
+ chown root:dspam usr/bin/dspamc
+ chmod g+s usr/bin/dspamc
+}
+
post_remove() {
echo -n -e "\nremoving dspam system user and group..."
userdel dspam && echo "done."
diff --git a/community/dspam/dspam.logrotated b/community/dspam/dspam.logrotated
index 89db6f565..c73b1dcb3 100644
--- a/community/dspam/dspam.logrotated
+++ b/community/dspam/dspam.logrotated
@@ -1,5 +1,10 @@
-/var/log/dspam/sql.errors /var/log/dspam/system.log /var/log/dspam/dspam.debug /var/log/dspam/dspam.messages {
- weekly
- compress
- create 0644 dspam dspam
+/var/log/dspam/sql.errors
+/var/lib/dspam/system.log
+/var/log/dspam/dspam.debug
+/var/log/dspam/dspam.messages
+/var/log/dspam/dspam.log {
+ weekly
+ compress
+ missingok
+ copytruncate
}
diff --git a/community/dspam/dspam_maintenance.cron b/community/dspam/dspam_maintenance.cron
new file mode 100644
index 000000000..940d8aed1
--- /dev/null
+++ b/community/dspam/dspam_maintenance.cron
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# DSPAM maintenance tasks
+# check "man 1 dspam_maintenance" for more options
+
+/usr/bin/dspam_maintenance --verbose --purgescriptdir=/usr/share/dspam 1> /dev/null