aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dbmail/APKBUILD
blob: a160811901903a2732428effb8e333436782ccbe (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=dbmail
_realpkgver=3.0.0-rc3
pkgver=${_realpkgver/-/_}
pkgrel=0
pkgdesc="Fast and scalable sql based mail services"
url="http://dbmail.org"
arch="all"
license="GPL"
depends=
depends_dev="openldap-dev libsieve-dev glib-dev gmime-dev
	mhash-dev libevent-dev libzdb-dev"
makedepends="$depends_dev asciidoc xmlto automake autoconf"
install=""
subpackages="$pkgname-doc"
source="http://www.dbmail.org/download/3.0/dbmail-${_realpkgver}.tar.gz
	$pkgname-imapd.initd
	$pkgname-lmtpd.initd
	$pkgname-pop3d.initd
	$pkgname-httpd.initd
	$pkgname-timsieved.initd
	post-rc3.patch
	gmime-2.6.patch
	"

_builddir="$srcdir/${pkgname}-${_realpkgver}"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	autoreconf
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-sieve \
		--with-ldap
	make || return 1
	#make man pages
	cd "$_builddir/man"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/dbmail/*.la || return 1
	install -Dm644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf.sample"
	mkdir -p "$pkgdir/usr/share/$pkgname"
	mv sql/* "$pkgdir/usr/share/$pkgname/"
	mv "$pkgname.schema" "$pkgdir/usr/share/$pkgname/"
	for i in imapd lmtpd pop3d httpd timsieved; do
		install -Dm755 "$srcdir/$pkgname-$i.initd" \
			"$pkgdir/etc/init.d/dbmail-$i" || return 1
	done
	#install man pages
	cd "$_builddir/man"
	make DESTDIR="$pkgdir" install || return 1
}

md5sums="52c3b9aad310efc90a6a2fff0552f73e  dbmail-3.0.0-rc3.tar.gz
76a0f8f96ca70a4af14c81716134cc5d  dbmail-imapd.initd
a6d79d7f0cf0fb80ef2ada71c25d9350  dbmail-lmtpd.initd
504dd74912daeea4268f8c25ddf6de0f  dbmail-pop3d.initd
42ac86844fedf5d1afec764170e6a5de  dbmail-httpd.initd
4253a7580d82e026ecbaf45ea863e9e7  dbmail-timsieved.initd
5e37f1190c8798edb450a40e97fe9a81  post-rc3.patch
5c2548b1a68393337c58856614a5f359  gmime-2.6.patch"