aboutsummaryrefslogtreecommitdiffstats
path: root/testing/maildrop/APKBUILD
blob: 88e83757ab00c38757f374fdfce83949ce5b8d06 (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
# Contributor: Juraj Sujan <sujan@sofy.sk>
# Maintainer: Juraj Sujan <sujan@sofy.sk>
pkgname=maildrop
pkgver=2.5.2
pkgrel=0
pkgdesc="Mail delivery agent with filtering abilities"
url="http://courier-mta.org/maildrop/"
arch="all"
license="GPL3"
depends=
makedepends="perl pcre-dev"
install=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/courier/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2
	http://www.max.rs/ozone/maildrop-2.3.0-dovecotauth.patch.txt"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	# apply patches here
	if ! patch --verbose -p1 -i ../maildrop-2.3.0-dovecotauth.patch.txt; then
		error "dovecotauth patch failed"
		return 1
	fi
}

build() {
	cd "$_builddir"
	# workaround for strange detection of default mailbox file/dir
	export QMAIL="foo"
	./configure --prefix=/usr \
	    --disable-authlib \
	    --without-db \
	    --enable-syslog=1 \
	    --with-default-maildrop=./Maildir || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	mkdir "$pkgdir"/usr/share/doc
	mv "$pkgdir"/usr/share/maildrop "$pkgdir"/usr/share/doc/
	cp README.dovecotauth "$pkgdir"/usr/share/doc/maildrop/
}
md5sums="3edb56534ae442a494255db6c8aaab99  maildrop-2.5.2.tar.bz2
f5e0fd910d76c4fba2a5fcdd40c6b375  maildrop-2.3.0-dovecotauth.patch.txt"