aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rmilter/APKBUILD
blob: b8b52e19394f15306fe964bddddbe9f7dd660941 (plain) (blame)
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
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=rmilter
pkgver=1.7.3
pkgrel=0
pkgdesc="Rspamd mail filter"
url="https://rspamd.com"
arch="all"
license="BSD"
pkgusers="rmilter"
pkggroups="rmilter"
depends=""
depends_dev=""
makedepends="$depends_dev cmake bison flex bsd-compat-headers openssl-dev pcre-dev libmilter-dev opendkim-dev hiredis-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/vstakhov/$pkgname/archive/$pkgver.tar.gz
	$pkgname.conf
	$pkgname.confd
	$pkgname.initd
	config_dir.patch
	system_hiredis.patch
"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	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"
	cmake CMakeLists.txt \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DRMILTER_USER=$pkgusers \
		-DRMILTER_GROUP=$pkggroups \
	|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -d "$pkgdir"/etc/mail/dkim
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname/$pkgname.conf
}

md5sums="d607a7063bd56cbed7b420e86b636973  rmilter-1.7.3.tar.gz
74b3a71b9e14d548f9bbade386cdacae  rmilter.conf
e159e4461b765b487f72c05b3d504a9c  rmilter.confd
a3fa9ba78d3392716d04f27e40e40ac8  rmilter.initd
9fe7aea93e81b7e36020f186c5b9288d  config_dir.patch
388470c71ad9d98088e2338a7b7066b7  system_hiredis.patch"
sha256sums="515e0f69af9f702cc36fd565e30c9f715bff819df250679d0a24e4f07ba5f081  rmilter-1.7.3.tar.gz
65f602b802766ff71807ca5537c2c17b400e0dfd915223ddeb306db074162019  rmilter.conf
fad2d6baea215c3b31750e8128efe557a27024974eca2ff359b8fa921acb9076  rmilter.confd
ce592d80851b0a52138bfa97f70c3e98a21555daa9e8a9f3966b7cafca1acc3c  rmilter.initd
863d36c15386e8927775fd368fdba4b234bbab83bfbd6a156f328b356880a91b  config_dir.patch
49d964572ba4660bf4a9893eca5ed90b20a64ed02258d99e43687aeed6222852  system_hiredis.patch"
sha512sums="4e65dbcccd7f378eb1dd93ffca1983614df19edf62b531483a59c636eb4564dbb531da2ecce3ea789c038913c8623e78db8636eff64f574eb5abc709cf8fc0e1  rmilter-1.7.3.tar.gz
4b577dbe63277dd932be74fad78989366056e3d0b7945af17906da17f685b19d0c58078398277ece4cff6304af8e20f45e61d196c86f933c7c5857efdecbdd81  rmilter.conf
d222bcf307e89f110efed524c2d708d3512d4400235091de0250d1f60358f65871667112bdad61bbcd948a9abdb8a46d8c3952cf78585cfb59fcf94f15849062  rmilter.confd
2ec3eb3fece210867001cf3a799336c77dfec7dd770442852a14b337205893aaefe24999ca5c0d92706bf8e9f1c8a192282e5c48b7bde2e591b03f721560e6e3  rmilter.initd
cd6cd168e0d0d14d62a74e59be7eebff4951f14f017e1b5e688aff78f5f119729c067074e9d12518fe8b4699aaa4c6a78de8c19226b91316844c636ab667fc8e  config_dir.patch
536d35c2a8797f375f8dc77eb86c2012712ba7a4861f33513c795ef1d902f5db83383a0033e486bac02a5631e012aff96b600216119ab71ffce510a17880c554  system_hiredis.patch"