aboutsummaryrefslogblamecommitdiffstats
path: root/testing/dspam/APKBUILD
blob: 2b17cacb3fa0a02b3b10b858204955dc712a2c69 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                   

                
        



                                                           
          








                                                                           

































                                                                                  

                                       



















                                                                       
                                                                 

                                                 
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dspam
pkgver=3.9.1_rc1
_ver=3.9.1-RC1
pkgrel=1
pkgdesc="A statistical-algorithmic hybrid anti-spam filter"
url="http://dspam.nuclearelephant.com/"
pkgusers="dspam"
pkggroups="dspam"
arch="all"
license="GPL-2"
depends=
install="$pkgname.pre-install"
makedepends="postgresql-dev sqlite-dev mysql-dev autoconf automake libtool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-mysql
	$pkgname-sqlite"

install= #dspam.install
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$_ver.tar.gz
	dspam.logrotate
	dspam.initd"


prepare() {
	cd "$srcdir"/$pkgname-$_ver
	for i in "$srcdir"/*.patch; do
		[ -f "$i" ] || continue
		msg "Applying $i"
		patch -p1 -i "$i" || return 1
	done
	aclocal -I m4 && libtoolize && autoconf && automake
}

build() {
	cd "$srcdir"/$pkgname-$_ver
	./configure --prefix=/usr \
		--sysconfdir=/etc/dspam \
		--with-dspam-home=/var/lib/dspam \
		--enable-virtual-users \
		--enable-preferences-extension \
		--enable-daemon \
		--with-storage-driver="hash_drv,sqlite3_drv,pgsql_drv,mysql_drv" \
		--with-mysql-includes=/usr/include/mysql \
		--with-mysql-libraries=/usr/lib/mysql \
		|| return 1
	make
}

package() {
	cd "$srcdir"/$pkgname-$_ver
	make install DESTDIR="$pkgdir"
	install -Dm755 "$srcdir"/dspam.initd "$pkgdir"/etc/init.d/dspam
	install -Dm644 "$srcdir"/dspam.logrotate "$pkgdir"/etc/logrotate.d/dspam
	rm "$pkgdir"/usr/lib/*.la
	rm "$pkgdir"/usr/lib/dspam/*.la
}

pgsql() {
	pkgdesc="dspam postgresql driver"
	install -d "$subpkgdir"/usr/lib/dspam
	mv "$pkgdir"/usr/lib/dspam/*pgsql* "$subpkgdir"/usr/lib/dspam/
}

mysql() {
	pkgdesc="dspam mysql driver"
	install -d "$subpkgdir"/usr/lib/dspam
	mv "$pkgdir"/usr/lib/dspam/*mysql* "$subpkgdir"/usr/lib/dspam/
}

sqlite() {
	pkgdesc="dspam sqlite driver"
	install -d "$subpkgdir"/usr/lib/dspam
	mv "$pkgdir"/usr/lib/dspam/*sqlite* "$subpkgdir"/usr/lib/dspam/
}

md5sums="326677b30af2711a8fa4b52facb52f37  dspam-3.9.1-RC1.tar.gz
a798e9a6e2d5c30724f84d004bb96339  dspam.logrotate
7d1fb0820f4a23f593f22186ef77d02a  dspam.initd"