archrelease: copy trunk to community-any
[ArchLinux/community.git] / amavisd-milter / trunk / PKGBUILD
blob1f0db87a04c2aef2b4aa132b32c392ca19c687c0
1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
2 # Contributor: Florian Pritz <bluewind@xinu.at>
3 # Contributor: Karol Babioch <karol@babioch.de>
5 pkgname=amavisd-milter
6 pkgver=1.7.2
7 pkgrel=1
8 pkgdesc="sendmail milter for amavisd-new using the AM.PDP protocol"
9 arch=('x86_64')
10 url="http://amavisd-milter.sourceforge.net/"
11 license=('BSD')
12 depends=('amavisd-new')
13 makedepends=('libmilter')
14 source=("https://github.com/prehor/amavisd-milter/releases/download/$pkgver/amavisd-milter-$pkgver.tar.gz"
15         'amavisd-milter.service')
16 sha512sums=('639a5a4f92131f9b8d004255819e36dedd529ec95f8290663c6ea5860dbbce049a822ba0e68158228716778265009b93024e9102defdf9250d4e889157008181'
17             '0a07da1f1c1299ac26fc8ccd77919e4c5c69ea3e673c1d34f46f730899e2b4234784147fb9929e635a6dc7a40474ca0ba2f03785125ba5b37b1252eb986b4510')
19 prepare() {
20     cd "${srcdir}/${pkgname}-${pkgver}"
22     # change upstream default paths (must match those of amavisd-new)
23     sed -i 's|/var/amavis|/var/spool/amavis|g' "${pkgname}/amavisd-milter.8"
26 build() {
27     cd "${srcdir}/${pkgname}-${pkgver}"
28     ./configure \
29         --prefix=/usr \
30         --bindir=/usr/bin \
31         --sbindir=/usr/bin \
32         --sysconfdir=/etc/amavis \
33         --localstatedir=/var/spool/amavis \
34         --sharedstatedir=/usr/share
35     make
38 check() {
39     cd "${srcdir}/${pkgname}-${pkgver}"
40     make check
43 package() {
44     cd "${srcdir}/${pkgname}-${pkgver}"
45     make DESTDIR="${pkgdir}" install
46     # license
47     install -D -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
48     # systemd unit
49     install -D -m644 "${srcdir}/amavisd-milter.service" "${pkgdir}/usr/lib/systemd/system/amavisd-milter.service"