aboutsummaryrefslogtreecommitdiffstats
path: root/testing/clapf/APKBUILD
blob: 9de6de05e56b1346bd8ec3d7f0ca8f951c49a0fe (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=clapf
pkgver=0.4.6_rc3
_realver=0.4.6-rc3
pkgrel=3
pkgdesc="clapf is an open source email content filter application"
url="http://clapf.acts.hu"
arch="x86_64"
license="as-is"
depends="clamav-db"
depends_dev="gsl-dev mysql-dev clamav-dev zlib-dev"
makedepends="$depends_dev"
install="$pkgname.pre-install"
pkgusers="clapf"
subpackages="$pkgname-dev"
source="http://clapf.acts.hu/clapf-$_realver.tar.gz
	$pkgname.confd
	$pkgname.initd"

_builddir="$srcdir/$pkgname-$_realver"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-libclamav \
		--with-tokendb=mysql \
		--with-userdb=mysql \
		--enable-lmtp \
		--with-store=fs \
		--enable-blackhole \
		--enable-rbl \
		--enable-policy \
		--enable-whitelist \
		--enable-blackhole \
		--with-clapf-user=clapf \
		--enable-language-detection \
		--enable-memcached \
		--enable-spamsum

	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
        install -Dm755 "$srcdir/$pkgname".initd \
		"$pkgdir/etc/init.d/$pkgname" || return 1
        install -Dm644 "$srcdir/$pkgname".confd \
                "$pkgdir/etc/cond.d/$pkgname" || return 1	
	install -do $pkgname "$pkgdir"/var/run/clapf || return 1
}

md5sums="7850eb8b75988f3944f2b69b9e3b0c4d  clapf-0.4.6-rc3.tar.gz
385318b45b2bccdd76fd312576380735  clapf.confd
263283c96608d696cd5e9eb9de921b16  clapf.initd"