aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rmilter/APKBUILD
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-11-28 18:40:10 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-12-26 10:01:53 +0000
commitb3d10d56958485c034a5c66d006ee680644d5b77 (patch)
treed84d7d16b61afad2aeb2773754fcbbf2dc75ead7 /testing/rmilter/APKBUILD
parent8db10f90bc1848cd8050dfe0df9cc40671225d39 (diff)
downloadaports-b3d10d56958485c034a5c66d006ee680644d5b77.tar.bz2
aports-b3d10d56958485c034a5c66d006ee680644d5b77.tar.xz
testing/rmilter: upgrade to 1.10.0, implemented an idea of modular design
-- - subpackages adds more functionality in one click - made a kind of automatic service dependency for external local services
Diffstat (limited to 'testing/rmilter/APKBUILD')
-rw-r--r--testing/rmilter/APKBUILD101
1 files changed, 76 insertions, 25 deletions
diff --git a/testing/rmilter/APKBUILD b/testing/rmilter/APKBUILD
index 66526c6788..88cc71e590 100644
--- a/testing/rmilter/APKBUILD
+++ b/testing/rmilter/APKBUILD
@@ -2,10 +2,10 @@
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=rmilter
-pkgver=1.9.2
-pkgrel=2
+pkgver=1.10.0
+pkgrel=0
pkgdesc="Rspamd mail filter"
-url="https://rspamd.com"
+url="https://rspamd.com/rmilter"
arch="all"
license="BSD"
pkgusers="rmilter"
@@ -15,18 +15,24 @@ depends_dev=""
makedepends="$depends_dev cmake bison flex bsd-compat-headers
libressl-dev pcre-dev libmilter-dev opendkim-dev hiredis-dev
glib-dev"
-install="$pkgname.pre-install"
+install="$pkgname.pre-install $pkgname-clamav.pre-install $pkgname-dkim.pre-install"
+subpackages="$pkgname-clamav::noarch $pkgname-rspamd::noarch $pkgname-redis::noarch $pkgname-dkim::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/vstakhov/$pkgname/archive/$pkgver.tar.gz
- $pkgname.conf
+ $pkgname-clamav.conf
+ $pkgname-rspamd.conf
+ $pkgname-redis.conf
+ $pkgname-dkim.conf
$pkgname.confd
$pkgname.initd
+ $pkgname.conf
+ config.patch
config_dir.patch
system_hiredis.patch
"
+builddir="$srcdir"/$pkgname-$pkgver
-_builddir="$srcdir"/$pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
cmake CMakeLists.txt \
-DCMAKE_INSTALL_PREFIX=/usr \
-DRMILTER_USER=$pkgusers \
@@ -36,29 +42,74 @@ build() {
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
- install -d "$pkgdir"/etc/mail/dkim
+ install -Dm644 $pkgname.conf.sample "$pkgdir"/etc/$pkgname/$pkgname.conf.common
+ install -Dm644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname/$pkgname.conf
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
+ install -dm755 "$pkgdir"/etc/$pkgname/conf.d
+}
+
+clamav() {
+ pkgdesc="$pkgdesc: enable virus scanning with local Clamav instance"
+ depends="$pkgname clamav"
+ install -Dm644 /dev/null "$subpkgdir"/etc/conf.d/$pkgname-rc_need@clamd
+ install -Dm644 "$srcdir"/$pkgname-clamav.conf "$subpkgdir"/etc/$pkgname/conf.d/clamav.conf
+}
+
+rspamd() {
+ pkgdesc="$pkgdesc: enable spam filtering with local Rspamd instance"
+ depends="$pkgname rspamd"
+ install -Dm644 /dev/null "$subpkgdir"/etc/conf.d/$pkgname-rc_need@rspamd
+ install -Dm644 "$srcdir"/$pkgname-rspamd.conf "$subpkgdir"/etc/$pkgname/conf.d/rspamd.conf
+}
+
+redis() {
+ pkgdesc="$pkgdesc: enable greylisting and limits with local Redis backend"
+ depends="$pkgname redis"
+ install -Dm644 /dev/null "$subpkgdir"/etc/conf.d/$pkgname-rc_need@redis
+ install -Dm644 "$srcdir"/$pkgname-redis.conf "$subpkgdir"/etc/$pkgname/conf.d/redis.conf
+}
+
+dkim() {
+ pkgdesc="$pkgdesc: enable DKIM"
+ depends="$pkgname"
+ install -dm750 -g mail "$subpkgdir"/etc/mail
+ install -dm755 "$subpkgdir"/etc/mail/dkim
+ install -Dm644 "$srcdir"/$pkgname-dkim.conf "$subpkgdir"/etc/$pkgname/conf.d/dkim.conf
}
-md5sums="c64ad097d79b8bc4efe8fba15b72e6b6 rmilter-1.9.2.tar.gz
-74b3a71b9e14d548f9bbade386cdacae rmilter.conf
-e159e4461b765b487f72c05b3d504a9c rmilter.confd
-a3fa9ba78d3392716d04f27e40e40ac8 rmilter.initd
+md5sums="220d693636f9ec5606033d15816a2346 rmilter-1.10.0.tar.gz
+ae0cd1a2b91e06c217d3883211ef57b8 rmilter-clamav.conf
+bdbd10caee1958ce5f9b8b899accac9c rmilter-rspamd.conf
+690b8f76f40f1a16d3ca7b994c27b637 rmilter-redis.conf
+33eafa022a0e918c7a1cf74a81654373 rmilter-dkim.conf
+d37109f41764e89606d1e40c30c010de rmilter.confd
+098a8f376dab26291f3a5e3e775e14b5 rmilter.initd
+a4a15e6c89caaecf7bbdae681cdf36a2 rmilter.conf
+87da6d59c5ca17e760668ba878d83391 config.patch
e4f3e1ea90401b8d55e6a381af05b994 config_dir.patch
-e5d20803b01b6d47e81a700bd12aa529 system_hiredis.patch"
-sha256sums="3e44977c39ece541c90ff1075b58847f44d310aa9d4ee49bc2df96e1ee4fb39f rmilter-1.9.2.tar.gz
-65f602b802766ff71807ca5537c2c17b400e0dfd915223ddeb306db074162019 rmilter.conf
-fad2d6baea215c3b31750e8128efe557a27024974eca2ff359b8fa921acb9076 rmilter.confd
-ce592d80851b0a52138bfa97f70c3e98a21555daa9e8a9f3966b7cafca1acc3c rmilter.initd
+d1aded4ee98211bd5e644c63c77eab8b system_hiredis.patch"
+sha256sums="ea80563fa7636afed0b5fd9a29aa2300f15793ed85788e4ce69c187d341a7d54 rmilter-1.10.0.tar.gz
+35f6eecbac988a4a2fdbb649fdf93aec5e77ded321aaa0521ddc9ef2ffe721e1 rmilter-clamav.conf
+eae2a0867c3e258fa052f1ada5465cf3132da87028ac9ac1a829c3239382fa13 rmilter-rspamd.conf
+9c265b9dc02b5e520d62228e9486d8bf96041f50da8f240ad352a5b189da8b27 rmilter-redis.conf
+f7513ab4345d127d2a6ef34848bc68faea83e3f7cdc11f1da641e2934bb19dd9 rmilter-dkim.conf
+fd7ac67f1c2d8bc03fee67f5fca4d0a12c562eaaab00a390e0f8e5230e6a5da4 rmilter.confd
+d0cce00aa6780fabbba03d14ab4ffa914326ac48a085bcde4c12853f8c44037d rmilter.initd
+ee73f437d02ef343eb0c1aa6d2da5bfc502e4ee93fb9d9f3362dda2efe9e5a13 rmilter.conf
+aada82ad61f3d33d285e163e054748159c378f4b7713814bf8ae94c6451bea1e config.patch
1aa29ce0a638356d4ebd75757a2094f9db20ad3895867e3676d5ae1129352760 config_dir.patch
-12d5050e60bb8c2cd1e5468a65d2f447e83f6bd49c8cac92c54e4cd40ed47e45 system_hiredis.patch"
-sha512sums="4938515d18d4cff363266348cbd00b85690f889cb479a0e2fb61fa74e1e0deb3e78ec06132537ae001ccec375d0bab10af77c4a4c6fb248dc7f9f929c5a57eb9 rmilter-1.9.2.tar.gz
-4b577dbe63277dd932be74fad78989366056e3d0b7945af17906da17f685b19d0c58078398277ece4cff6304af8e20f45e61d196c86f933c7c5857efdecbdd81 rmilter.conf
-d222bcf307e89f110efed524c2d708d3512d4400235091de0250d1f60358f65871667112bdad61bbcd948a9abdb8a46d8c3952cf78585cfb59fcf94f15849062 rmilter.confd
-2ec3eb3fece210867001cf3a799336c77dfec7dd770442852a14b337205893aaefe24999ca5c0d92706bf8e9f1c8a192282e5c48b7bde2e591b03f721560e6e3 rmilter.initd
+aa57dbf0e6244675989caec1a62ce969f044e0f0dc4f7bfee00e91ae19c58bc0 system_hiredis.patch"
+sha512sums="bef62d6dd4190b9a28e751cc598d201f0f994a08def46ae68587d1cc956e7e209ae540d91241545dc4efd055b4bf2b95039f0e9649448e5506f17ec37240adf8 rmilter-1.10.0.tar.gz
+e28357e8eab451cb972149b003db56e4386f17e137c3a690e90c4b161edd6eeb7da99b8f36cdf016f11161664b90825ee2f706ce70887c6d8b9c6a7b167770cd rmilter-clamav.conf
+15db17901e4fc53596860dadade29b656d0addb390a56a610d13caee6362c867215de0fb57071ba87f0b97620d076444ad22fd87a3c27b2ca709fc31d71ed19c rmilter-rspamd.conf
+f56f4295209483e2e2d0ecceeecdd8a73e547ba85bca6cf9c54f3a57a87b3ca1dfbb6dd062d54224840019cee47a062d8b9384b8b08a789b0ea46b947cb11ac2 rmilter-redis.conf
+b558762c18fbcb0a50c787094d267fabae3d336ea665b126fccf1fc67284b38336ee4b9997e23091bc64e60a0302e3c5a3f659581b72dccc5da0d26c8e722f30 rmilter-dkim.conf
+a8c91009662e1f4b4fd140df8187bc2b781aab167b71219ed63447da480f3b856bea00e48651f26104e5e53f096a84dc10f769067bc9c0e6e1d504a9fcef4fbd rmilter.confd
+010d6e8e83087212ef0fe0bebfcd9581e8205dcf2ddf3434f7b25b9e80959cd6f24a5ede3207f9a104b3d467a5649e365a78fa609a7d2bf361253c803bb1ab2c rmilter.initd
+1ab84f669bd05268816c2c454e939921102713f4ce9ef39ca695a21fc3410d915abecabd5b732022f945abfdf3d1e39ab13c8412c8de46420651a1b26e2374b3 rmilter.conf
+2112a10358d7f00931a850f501db53481932badeee488afc8d8481c07bde8556449e2485c0fad5e5a0837fd921dc153a674e1c69fc1d055f6f10b89f2f061237 config.patch
6ac3a1d73e52c156b60cabaabceea6e01c7e5f2dce78a557ccce24127440a8fea713b2465ecdd29486c4283afb6dee723cbcb476f1789bcd3876dd6c6aa5ebd1 config_dir.patch
-14ddca01c495cc4fa1467deb682f049d91586f0d670c596ee1e1c7c40ba12ca58c40e29ca1d18abb4d19387b668caaf627e2cdd35b172f3ca85f6bfe8fe8295a system_hiredis.patch"
+6913c39c3335ecaebd6413ea8d39630cf67bc5fba9a91609f1ea25f756702e1652d51429534a5223a7136a7424deaffd16c2a2fb8d32fa1a1f1f23b3b8fed87c system_hiredis.patch"