aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dbmail/APKBUILD
blob: 32a5409873b333e0ed71d81e37e5e2e213a4eb9d (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=dbmail
_realpkgver=3.0.2
pkgver=3.1.15
pkgrel=1
pkgdesc="Fast and scalable sql based mail services"
url="http://dbmail.org"
arch="all"
license="GPL"
pkgusers="dbmail"
pkggroups="dbmail"
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 $pkgname-auth-ldap:auth_ldap"
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
	$pkgname.pre-install
	dbmail.conf
	"

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

prepare() {
	local i
	cd "$_builddir"
	# we need support for gmine 2.6
	sed -i 's/gmime-2.4/gmime-2.6/g' configure
}

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

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	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
	install -m644 -D "$srcdir"/$pkgname.conf \
		"$pkgdir"/etc/$pkgname.conf || return 1
	install -dDo dbmail "$pkgdir"/var/run/dbmail || return 1
	install -dDo dbmail "$pkgdir"/var/lib/dbmail || return 1
}

auth_ldap() {
	pkgdesc="$pkgname ldap authentication"
	mkdir -p "$subpkgdir"/usr/lib/dbmail
	mv "$pkgdir"/usr/lib/dbmail/libauth_ldap* \
		"$subpkgdir"/usr/lib/dbmail/ || return 1
}

md5sums="4f54bec673eeb22b0971cbfe7a533f58  dbmail-3.0.2.tar.gz
2f77092fade3b10123a47a5cce5b6a4a  dbmail-imapd.initd
f3a84b58ba878375ca088a0b544922cc  dbmail-lmtpd.initd
4273524211baefd9f32ea40ce9cb7dd1  dbmail-pop3d.initd
1bf891189a6daf14254738d28f3c654f  dbmail-httpd.initd
4cd701bf1a8d292848fffe208afbe182  dbmail-timsieved.initd
f146703e0c8c9badc92de152ac6f1e5b  dbmail.pre-install
549f2073f1c6ac902f783b493c0667d4  dbmail.conf"
sha256sums="d999d533bb923cacc91c46ae814f18658f933fdfe644ef7b837bdc49dac47fe9  dbmail-3.0.2.tar.gz
cc4c9eaecb859bc3ba213928fb6db32de06ce8ff69b4b3a3f3725c08cfc30f69  dbmail-imapd.initd
edc7e30d42f5f62c1413d69a67420cfac3454401faf9cec023bb3e6f34fc5029  dbmail-lmtpd.initd
88486036ee5232a8ef48cd2cdf74ceea2f2840f18e7807a8d83a57d7381668a1  dbmail-pop3d.initd
c84cfb86ef598e25990971cbf01712963d51cc015f033e3d7f97cb9abca4e3dc  dbmail-httpd.initd
a6200baa4d8e3da63df14f694b39f22eac24d4912ef87e280049c793d47d1744  dbmail-timsieved.initd
9065f79ec44c435fe48e3fcb363d855403fb1d1327fac6ac5bced44cfeb35060  dbmail.pre-install
b73fc15ab36423fe2c4c5a677fb21c706ca51aa9e0a948ca582e8bb27cc8ce67  dbmail.conf"
sha512sums="cd44bb8932d094e5334aeae51d6c3b672c41e3cce5ffb3b8169d082317dae2371414dbf30c2bcbce0681b41cacf4cc92cfe8c87541dca51e5678597aa85731ee  dbmail-3.0.2.tar.gz
8c6c56586c2465549b62b9960e9202a63c18ee2ad7fc074530e3da795f95a957a0e23faba51f073e7596c22993641bb18c38295bd5d80b679bb22cd3b5928966  dbmail-imapd.initd
22b4f6e920a401c73efe6be45f410fc630bbc269c9ecd6d205ff3b6905a6a248e15885b3ee9a299dbfec1b795d1d15c6af60ab024b389329bc2f4a1deaaf45d4  dbmail-lmtpd.initd
a3ea01e52116fa369cf8c228b21f0c03ca8468b302aea0dc6874d0bf50f27e6d25d21b9fb690ea5177686998f3866e61619fe767307a5359aa83d5e3cab62ae2  dbmail-pop3d.initd
aa4133d4e2267908a12c29af34142546581a7659f2b0ccfdfa2a8be447c8de48dc80a7c64010c7fd96452c9b267bd0f7cce8498641e0ca034084fc5705ea4c25  dbmail-httpd.initd
91bc74ed756db22efb633c2ffa2e09931638380446f29aed4a3bd616ca082fd496f53be55e03952d2d9b02ca4e9cb765976df3d4f8c86a80467ee2aa47889a8c  dbmail-timsieved.initd
c720c624b221b98f2104845f1990652a5d7d035bc46126938f213d89e57e80a0bbd9818408329d3ec6dd764f12d3d4834a110c59429d79125bb4dcdfd6459e3e  dbmail.pre-install
2726eb944043face96fdcbc7210b2e3b9a6d4f0981825dc134a88217935b01f33935b90bb0458534d87e4941d7da3cad279876912a6c7da108b15d684829117f  dbmail.conf"