aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dspam/APKBUILD
blob: 2b17cacb3fa0a02b3b10b858204955dc712a2c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# 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"