aboutsummaryrefslogtreecommitdiffstats
path: root/main/amavis/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/amavis/APKBUILD')
-rw-r--r--main/amavis/APKBUILD45
1 files changed, 15 insertions, 30 deletions
diff --git a/main/amavis/APKBUILD b/main/amavis/APKBUILD
index 7b41bc8578..d55c588a27 100644
--- a/main/amavis/APKBUILD
+++ b/main/amavis/APKBUILD
@@ -1,8 +1,7 @@
-# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=amavis
pkgver=2.12.1
-pkgrel=0
+pkgrel=1
pkgdesc="High-performance interface between mailer (MTA) and content checkers"
url="https://gitlab.com/amavis/amavis"
arch="noarch !x86" # perl-db
@@ -23,47 +22,33 @@ subpackages="$pkgname-openrc"
source="https://gitlab.com/amavis/amavis/-/archive/v$pkgver/amavis-v$pkgver.tar.gz
amavisd.initd
amavisd.confd
+ amavisd-conf.patch
"
pkgusers="amavis"
pkggroups="amavis"
-
builddir="$srcdir"/$pkgname-v$pkgver
package() {
- cd "$builddir"
- (
- HOME=/var/amavis
- QUARANTINE=$HOME/quarantine
- USER=amavis
- GROUP=amavis
- DIRS="$HOME $HOME/tmp $HOME/var $HOME/db $HOME/home $QUARANTINE"
- CONFIG=/etc/amavisd.conf
+ _amavis_home=/var/amavis
- for dir in $DIRS
- do
- mkdir -p ${pkgdir}$dir
+ for dir in $_amavis_home/tmp \
+ $_amavis_home/var \
+ $_amavis_home/db \
+ $_amavis_home/home \
+ $_amavis_home/quarantine \
+ ; do
+ install -dm750 -o amavis -g amavis "${pkgdir}$dir"
done
- install -m 755 -o root -D amavisd $pkgdir/usr/sbin/amavisd
- install -m 755 -o root -D amavisd-nanny $pkgdir/usr/bin/amavisd-nanny
- install -m 755 -o root -D amavisd-release $pkgdir/usr/bin/amavisd-release
- sed -e "s:^.*\$MYHOME = .*$:\$MYHOME = '$HOME';:" \
- -e 's:^.*\$TEMPBASE = .*$:\$TEMPBASE = "\$MYHOME/tmp";:' \
- -e 's:^.*\$db_home = .*$:\$db_home = "$MYHOME/db";:' \
- -e "s:^.*\$QUARANTINEDIR = .*$:\$QUARANTINEDIR = '$QUARANTINE';:" \
- -e "s:^.*\$daemon_user = 'vscan';\(.*\)$:\$daemon_user = 'amavis';\1:" \
- -e "s:^.*\$daemon_group = 'vscan';\(.*\)$:\$daemon_group = 'amavis';\1:" < amavisd.conf > amavisd.conf.alpine
- install -m 640 -o root -D amavisd.conf.alpine ${pkgdir}${CONFIG}
- )
+ for file in amavisd amavisd-nanny amavisd-release amavisd.conf; do
+ install -Dm755 -o root -g amavis "$file" "$pkgdir/usr/sbin/$file"
+ done
install -Dm755 "$srcdir"/amavisd.initd "$pkgdir"/etc/init.d/amavisd
install -Dm644 "$srcdir"/amavisd.confd "$pkgdir"/etc/conf.d/amavisd
-
- chown -R amavis:amavis "$pkgdir"/var/amavis
- chmod -R 750 "$pkgdir"/var/amavis
- chown root:amavis "$pkgdir"/etc/amavisd.conf
}
sha512sums="33bcc8606e142ed390cb368a7c640f96b70ecd1c8473e7d19f3125f89afde7a044981b9e3704c722c54472f88b2e4e54c89bab19bc28ceb89561aeb8ede04c8e amavis-v2.12.1.tar.gz
6a9dd16a6b52f3d1fbd16887f29ccceddc58e88a02e681f23c1fe54b7e24feea5089d52813f4f3e87d9242daf79d2b2ea1e7c451d83d7de943403e71dc61c4e5 amavisd.initd
-a5ce3583c34197f335372728cf92da23bae2cd7a9ae48daff6eaadbf66fbd5be6bb8b480b0fce1ea2b3a662b0a54d1d2f1f277d2f9a06d9630b57fa5d7ac2635 amavisd.confd"
+a5ce3583c34197f335372728cf92da23bae2cd7a9ae48daff6eaadbf66fbd5be6bb8b480b0fce1ea2b3a662b0a54d1d2f1f277d2f9a06d9630b57fa5d7ac2635 amavisd.confd
+87f9c4489fb377e6e1315edcef75940b1a61a30c418106c1ef48eef4f425746333c550b270e0e6727fe89a68239f673f24392d81a53157ad487d3d2da1e95b4c amavisd-conf.patch"