sbcl rebuild
[arch-packages.git] / imap / trunk / PKGBUILD
bloba00122884af672180b3fb2e2397915004a6c9217
2 pkgbase=imap
3 pkgname=(imap c-client)
4 pkgver=2007f
5 pkgrel=14
6 arch=('x86_64')
7 license=('APACHE')
8 url="https://github.com/uw-imap/imap"
9 makedepends=('pam' 'git')
10 source=("imap-src::git+https://github.com/uw-imap/imap.git#tag=patches-FD29-RPM"
11         'c-client-2006k_GENTOO_amd64-so-fix.patch'
12         'imap' 'ipop2' 'ipop3')
13 options=('staticlibs')
14 sha256sums=('SKIP'
15             '77de7621946c69638295ac11275124d0c405a4c6ba284a068f9a96c4994f3184'
16             'f192e6e6d7388c7f63441d4f122aa4c667a5eef93f22cb748b7aca0bfae2b034'
17             '43899df58e2e21adcf08ed686cfa26e793ba1e4b376dd917cba4c1e34e7214bd'
18             'b91477ef6706a693ea01e2dc15a7b826b6ae89be8182f91a6817d2fb95cbdb72')
20 prepare() {
21   cd "$srcdir/$pkgbase-src"
23   sed \
24     -e "s:-g -fno-omit-frame-pointer -O6:\${CFLAGS}:" \
25     -e "s:SSLDIR=/usr/local/ssl:SSLDIR=/usr:" \
26     -e "s:SSLCERTS=\$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:" \
27     -i src/osdep/unix/Makefile
29   patch -p1 -i "$srcdir/c-client-2006k_GENTOO_amd64-so-fix.patch"
32 build() {
33   cd "$srcdir/$pkgbase-src"
34   CFLAGS+=" -ffat-lto-objects"
35   # NOTE: if you wish to enforce SSL, use SSLTYPE=unix.nopwd
37   yes "y" | make lnp EXTRAAUTHENTICATORS=gss PASSWDTYPE=pam SPECIALAUTHENTICATORS=ssl SSLTYPE=unix EXTRACFLAGS="${CFLAGS} -fPIC -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpam" EXTRALDFLAGS="${LDFLAGS}"
41 package_imap() {
42   pkgdesc="An IMAP/POP server"
43   depends=('c-client')
44   provides=('imap-server' 'pop3-server')
45   conflicts=('courier-mta' 'courier-imap')
46   backup=(etc/xinetd.d/{imap,ipop2,ipop3})
47   install=imap.install
49   cd "$srcdir/$pkgbase-src"
50   install -d "$pkgdir/usr/bin"
51   install -D -m755 imapd/imapd "$pkgdir/usr/bin/imapd"
52   install -D -m755 ipopd/ipop2d "$pkgdir/usr/bin/ipop2d"
53   install -D -m755 ipopd/ipop3d "$pkgdir/usr/bin/ipop3d"
55   # install xinetd.d configs
56   install -D -m644 ../imap "$pkgdir/etc/xinetd.d/imap"
57   install -D -m644 ../ipop2 "$pkgdir/etc/xinetd.d/ipop2"
58   install -D -m644 ../ipop3 "$pkgdir/etc/xinetd.d/ipop3"
61 package_c-client() {
62   pkgdesc="Imap client library"
63   depends=('pam')
65   cd "$srcdir/$pkgbase-src"
67   for i in c-client mail imap4r1 rfc822 linkage misc smtp nntp \
68     osdep env_unix env fs ftl nl tcp sslio utf8 utf8aux; do
69     install -D -m644 c-client/${i}.h "$pkgdir/usr/include/imap/${i}.h"
70   done
71   install -m644 c-client/linkage.c "$pkgdir/usr/include/imap/linkage.c"
72   install -D -m644 c-client/c-client.a "$pkgdir/usr/lib/c-client.a"
73   ln -sf c-client.a "$pkgdir/usr/lib/libc-client.a"
75   install -D -m755 c-client/libc-client.so.1.0.0 "$pkgdir/usr/lib/libc-client.so.1.0.0"
76   ln -sf /usr/lib/libc-client.so.1.0.0 "$pkgdir/usr/lib/libc-client.so.1"
77   ln -sf /usr/lib/libc-client.so.1.0.0 "$pkgdir/usr/lib/libc-client.so"