summaryrefslogtreecommitdiff
path: root/community/dspam/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/dspam/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/dspam/PKGBUILD')
-rw-r--r--community/dspam/PKGBUILD68
1 files changed, 68 insertions, 0 deletions
diff --git a/community/dspam/PKGBUILD b/community/dspam/PKGBUILD
new file mode 100644
index 000000000..9da467697
--- /dev/null
+++ b/community/dspam/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id: PKGBUILD 44186 2011-04-04 13:07:03Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=dspam
+pkgver=3.9.0
+pkgrel=4
+pkgdesc="A scalable, open-source statistical anti-spam filter"
+arch=('i686' 'x86_64')
+url="http://dspam.nuclearelephant.com/"
+options=('!libtool')
+backup=(etc/dspam/dspam.conf)
+license=("GPL")
+depends=(readline libcap ncurses zlib openssl)
+makedepends=('libmysqlclient' 'postgresql-libs' 'db' 'sqlite3')
+optdepends=('libmysqlclient: MySQL support'
+ 'postgresql-libs: PostgreSQL support'
+ 'db: BerkeleyDB support'
+ 'sqlite3: SQLite support')
+options=('zipman' 'docs' '!libtool')
+source=(http://downloads.sourceforge.net/project/dspam/dspam/dspam-$pkgver/dspam-$pkgver.tar.gz
+ dspam.logrotated
+ dspam)
+install=$pkgname.install
+md5sums=('10d092b57d628d8c91655fee5dc0d0cd'
+ '2163ca41de383f09f4d754e2d35cb158'
+ 'bb2300eff5b2a6eb987750c71a2c2169')
+
+build() {
+ OPTS="--enable-delivery-to-stdout --with-dspam-owner=dspam --with-dspam-group=dspam --enable-daemon --enable-virtual-users \
+ --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"
+
+ cd $srcdir/$pkgname-$pkgver
+ [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr --sysconfdir=/etc/dspam --localstatedir=/var ${OPTS}
+ make -j1
+}
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+
+ mkdir -p $pkgdir/srv/http/dspam
+ cp -a webui/* $pkgdir/srv/http/dspam/
+ find $pkgdir/srv/http/dspam/ -type f -name 'Makefile*' -exec rm -f {} \;
+ 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}
+ install -m644 ../dspam.logrotated $pkgdir/etc/logrotate.d
+ 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' \
+ -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
+
+ cd $pkgdir/usr/share/man/man3
+ find -type l -exec ln -sf libdspam.3 {} \;
+
+ chmod 0755 $pkgdir/usr/bin/*
+}