aboutsummaryrefslogtreecommitdiffstats
path: root/main/imap/APKBUILD
blob: f0b3d5276e0680ac13cdc9ca49e87345fa415a53 (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
# 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=8
pkgdesc="An IMAP/POP server"
url="http://www.washington.edu/imap"
arch="all"
license="Apache-2.0"
subpackages="$pkgname-dev c-client:cclient"
depends=""
makedepends="libressl-dev"
source="http://ftp.ntua.gr/pub/net/mail/imap/imap-$pkgver.tar.gz
	fix-linking.patch
	c-client-2006k_KOLAB_Annotations.patch
	"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	default_prepare
	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
}

build() {
	cd $builddir
	export GCCCFLAGS="$CFLAGS"
	yes "y" | make slx SPECIALAUTHENTICATORS=ssl SSLTYPE=unix \
		EXTRACFLAGS="$CFLAGS -fPIC" \
		EXTRALDFLAGS="$LDFLAGS"
}

package() {
	cd $builddir
	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
	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/
}

sha512sums="7c3e1d9927872001e768ff2ddbcf3af74078243efe58dd70e01d966856b7611134e4b579818691a954bade9acaeeda6f2f30f40d812b8aa20990de5cb90d5d35  imap-2007f.tar.gz
f8a4b5b8759b690273ec8c86db55c3c3ebf7b358321aa829341bc65e98db0f10696b1eeae922eecada668f011b0b3231ed73c3a959b47b4cba00568bf7d231c1  fix-linking.patch
871093236b3ae300968e1e200a2389566af72ed1f62ad57c1dc617dd59e8378f29175fe07e5cfc575e022f3c27769b06850cbf21567f7cc359ca204c4d87a3af  c-client-2006k_KOLAB_Annotations.patch"