aboutsummaryrefslogtreecommitdiffstats
path: root/main/imap/APKBUILD
blob: dd6c2c143e2dbf4fb5b5b076593bebcf7cd7733f (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

# at this point its only php who wants this for imap support
# if more packages needs the c-client lib we might want to
# build it shared
pkgname=imap
pkgver=2007f
pkgrel=6
pkgdesc="An IMAP/POP server"
url="http://www.washington.edu/imap"
arch="all"
license="ASL 2.0"
subpackages="$pkgname-dev c-client:cclient"
depends=
makedepends="libressl-dev"
source="http://gd.tuwien.ac.at/infosys/mail/imap/imap-$pkgver.tar.gz
	fix-linking.patch
	c-client-2006k_KOLAB_Annotations.patch
	"

prepare() {
	cd $srcdir/$pkgname-$pkgver
	for i in ../*.patch; do
		msg "Applying $i"
		patch -p1 -i $i || return 1
	done
	sed -e "s:-g -fno-omit-frame-pointer -O6:\${CFLAGS}:" \
		-e "s:SSLDIR=/usr/local/ssl:SSLDIR=/usr:" \
		-e "s:SSLCERTS=\$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:" \
		-e "s:^CC=.*:CC=${CC:-cc}:" \
		-i src/osdep/unix/Makefile || return 1
}

build() {
	cd $srcdir/$pkgname-$pkgver

	export GCCCFLAGS="$CFLAGS"
	yes "y" | make slx SPECIALAUTHENTICATORS=ssl SSLTYPE=unix \
		EXTRACFLAGS="$CFLAGS -fPIC" \
		EXTRALDFLAGS="$LDFLAGS" \
		|| return 1
}

package() {
	cd $srcdir/$pkgname-$pkgver
	mkdir -p $pkgdir/usr/sbin
	install -D -m755 imapd/imapd $pkgdir/usr/sbin/imapd
	install -D -m755 ipopd/ipop2d $pkgdir/usr/sbin/ipop2d
	install -D -m755 ipopd/ipop3d $pkgdir/usr/sbin/ipop3d
	for i in c-client mail imap4r1 rfc822 linkage misc smtp nntp osdep \
			env_unix env fs ftl nl tcp sslio utf8 utf8aux; do
		install -D -m644 c-client/$i.h \
			"$pkgdir"/usr/include/imap/$i.h
	done
	install -m644 c-client/linkage.c "$pkgdir"/usr/include/imap/linkage.c

	install -Dm755 c-client/libc-client.so.1.0.0 \
		"$pkgdir"/usr/lib/libc-client.so.1.0.0 \
		|| return 1
	ln -s libc-client.so.1.0.0 "$pkgdir"/usr/lib/libc-client.so.1
	ln -s libc-client.so.1.0.0 "$pkgdir"/usr/lib/libc-client.so
}

cclient() {
	pkgdesc="UW IMAP c-client library"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ || return 1
}

md5sums="2126fd125ea26b73b20f01fcd5940369  imap-2007f.tar.gz
affade6de21bfd66c72e50c61fed511e  fix-linking.patch
c50f734aa18019ecebfc8737ca27cc22  c-client-2006k_KOLAB_Annotations.patch"
sha256sums="53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28  imap-2007f.tar.gz
8ee94cf79ba424e94c39cd6a68e74745431051e0e830843a51067db523e37833  fix-linking.patch
cd8833d4eabd8fbad6a1588e3ee5375fced007964f1c6bcd016b34bee5d8eaf2  c-client-2006k_KOLAB_Annotations.patch"
sha512sums="7c3e1d9927872001e768ff2ddbcf3af74078243efe58dd70e01d966856b7611134e4b579818691a954bade9acaeeda6f2f30f40d812b8aa20990de5cb90d5d35  imap-2007f.tar.gz
f8a4b5b8759b690273ec8c86db55c3c3ebf7b358321aa829341bc65e98db0f10696b1eeae922eecada668f011b0b3231ed73c3a959b47b4cba00568bf7d231c1  fix-linking.patch
871093236b3ae300968e1e200a2389566af72ed1f62ad57c1dc617dd59e8378f29175fe07e5cfc575e022f3c27769b06850cbf21567f7cc359ca204c4d87a3af  c-client-2006k_KOLAB_Annotations.patch"