summaryrefslogtreecommitdiffstats
path: root/testing/dspam/APKBUILD
blob: 1d049cfbe7a05ae19a6551e37946d1060d381549 (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.0_rc2
_ver=3.9.0-RC2
pkgrel=0
pkgdesc="A statistical-algorithmic hybrid anti-spam filter"
url="http://dspam.nuclearelephant.com/"
pkgusers="dspam"
pkggroups="dspam"
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
	0001-Support-for-parallell-builds.patch
	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

}

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="013dc6700f7c5a757b7a656626b36248  dspam-3.9.0-RC2.tar.gz
0f9f6b32cab7b8e3ad342daad119535d  0001-Support-for-parallell-builds.patch
a798e9a6e2d5c30724f84d004bb96339  dspam.logrotate
7d1fb0820f4a23f593f22186ef77d02a  dspam.initd"