aboutsummaryrefslogtreecommitdiffstats
path: root/main/imap/APKBUILD
blob: e14d2c08cc3870f934a42c699432765d5d8a671a (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
# 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=2
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="openssl-dev"
source="ftp://ftp.cac.washington.edu/$pkgname/$pkgname-$pkgver.tar.gz
	c-client-2006k_GENTOO_amd64-so-fix.patch
	c-client-2006k_KOLAB_Annotations.patch
	c-client-2007e-ldflags.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"
	make slx SPECIALAUTHENTICATORS=ssl 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 -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
7f3937a871edd54203fe51f91423e204  c-client-2006k_GENTOO_amd64-so-fix.patch
c50f734aa18019ecebfc8737ca27cc22  c-client-2006k_KOLAB_Annotations.patch
d28962ed76df636ff666c09d420e1451  c-client-2007e-ldflags.patch"
sha256sums="53e15a2b5c1bc80161d42e9f69792a3fa18332b7b771910131004eb520004a28  imap-2007f.tar.gz
77de7621946c69638295ac11275124d0c405a4c6ba284a068f9a96c4994f3184  c-client-2006k_GENTOO_amd64-so-fix.patch
cd8833d4eabd8fbad6a1588e3ee5375fced007964f1c6bcd016b34bee5d8eaf2  c-client-2006k_KOLAB_Annotations.patch
ed9b6503da3b6e9dfa3b2ee4ebca810e642a2f4e379e655330d1d269ed018ac1  c-client-2007e-ldflags.patch"
sha512sums="7c3e1d9927872001e768ff2ddbcf3af74078243efe58dd70e01d966856b7611134e4b579818691a954bade9acaeeda6f2f30f40d812b8aa20990de5cb90d5d35  imap-2007f.tar.gz
213f06e133704ed2bb9fc6900edb7a4505bf6965409ecf76502bf9cafdf7c981bca552479f8ffaa1a355d2f1c1c08dbe0453fa5bce06590f6627d0e622c70879  c-client-2006k_GENTOO_amd64-so-fix.patch
871093236b3ae300968e1e200a2389566af72ed1f62ad57c1dc617dd59e8378f29175fe07e5cfc575e022f3c27769b06850cbf21567f7cc359ca204c4d87a3af  c-client-2006k_KOLAB_Annotations.patch
786cdb20bf6e8ce9587fbb3862d47bea9e7abdb0c5b1354c90d2bf2828dfb0a8d83379dd21987b8b6d295589891c784bb1c945b941f9f3262d8b97139415ea9e  c-client-2007e-ldflags.patch"