summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5f509925ba02f14e568423c03b5af2162540552d (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
# Greylisting daemon from Debian project. Requires 'start-stop-daemon'.
# Contributor: Vladimir Koshelenko <koshelenko@rndavia.ru>
# Maintainer: Denis Yantarev <denis dot yantarev at gmail dot com>

pkgname=greylistd
pkgver=0.8.8.7
pkgrel=1
pkgdesc="Simple greylisting system for mail transport agents"
url="https://packages.debian.org/sid/greylistd"
depends=('python2' 'start-stop-daemon')
source=(http://ftp.debian.org/debian/pool/main/g/greylistd/${pkgname}_${pkgver}.tar.xz
	greylistd.service
	greylistd.tmpfiles
	greylistd.install
	python2.patch)
md5sums=('a97720a78299554f2a190f7fa6dfd39e'
         'ad1f516bdb732982fec38f492134d5b8'
         '5c76ca975a41ef967f6a1f8bfc760446'
         '7c309496b15079820b852c7140194d8c'
         '6947ebf9d170801b86db013b3521e1af')
backup=(etc/greylistd/config)
install=greylistd.install
arch=('x86_64' 'i686')
license=('GPL')

build() {
	cd $srcdir/$pkgname-$pkgver || return 1
	patch -p0 < ../python2.patch || return 1
}

package() {
	cd $srcdir

	# configuration
	mkdir -p $pkgdir/etc/greylistd || return 1
	install -D -m644 $srcdir/$pkgname-$pkgver/config/config $pkgdir/etc/greylistd/ || return 1
	install -D -m644 $srcdir/$pkgname-$pkgver/config/whitelist-hosts $pkgdir/etc/greylistd/ || return 1
	install -D -m644 $srcdir/$pkgname-$pkgver/doc/examples/exim4-acl-example.txt $pkgdir/etc/greylistd/ || return 1

	# systemd scripts
	mkdir -p $pkgdir/usr/lib/systemd/system || return 1
	install -D -m644 $srcdir/greylistd.service $pkgdir/usr/lib/systemd/system/ || return 1

	mkdir -p $pkgdir/usr/lib/tmpfiles.d || return 1
	install -D -m644 $srcdir/greylistd.tmpfiles $pkgdir/usr/lib/tmpfiles.d/greylistd.conf || return 1

	# man pages
	mkdir -p $pkgdir/usr/man/man1 || return 1
	install -D -m644 $srcdir/$pkgname-$pkgver/doc/man1/greylist.1 $pkgdir/usr/man/man1/ || return 1
	gzip $pkgdir/usr/man/man1/greylist.1

	mkdir -p $pkgdir/usr/man/man8 || return 1
	install -D -m644 $srcdir/$pkgname-$pkgver/doc/man8/greylistd.8 $pkgdir/usr/man/man8/ || return 1
	gzip $pkgdir/usr/man/man8/greylistd.8

	# binaries
	mkdir -p $pkgdir/usr/bin || return 1
	install -D -m755 $srcdir/$pkgname-$pkgver/program/greylist $pkgdir/usr/bin/ || return 1
	install -D -m755 $srcdir/$pkgname-$pkgver/program/greylistd $pkgdir/usr/bin/ || return 1
}