blob: fa5b08397cd44fc4e905de0fe34b87952cc408c4 (
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
|
# $Id: PKGBUILD 72136 2012-06-09 00:24:01Z dreisner $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
pkgname=courier-authlib
pkgver=0.64.0
pkgrel=2
pkgdesc="Authentification library for the courier mailserver(s)"
arch=(i686 x86_64 'mips64el')
license=('GPL2')
url="http://courier-mta.org/authlib/"
backup=('etc/authlib/authdaemonrc' 'etc/authlib/authldaprc' \
'etc/authlib/authmysqlrc' 'etc/authlib/authpgsqlrc')
depends=('openssl' 'gdbm' 'perl' 'libtool' 'expect')
makedepends=('pam' 'expect' 'libldap' 'libmysqlclient' 'postgresql-libs>=8.3.0')
optdepends=('libmysqlclient' 'libldap' 'postgresql-libs')
conflicts=('courier-imap-mysql' 'courier-imap-pgsql' 'courier-imap-ldap')
provides=('courier-imap-mysql' 'courier-imap-pgsql' 'courier-imap-ldap')
options=(!libtool)
install=${pkgname}.install
source=(http://downloads.sourceforge.net/project/courier/authlib/${pkgver}/${pkgname}-${pkgver}.tar.bz2
courier-authlib.tmpfiles
authdaemond.rc.d)
md5sums=('d946a76e81e45a139543305d310399f6'
'bef189740e9516b0beaace4e8954ef14'
'7de75a9a74796f4fd2e81fd3ca16ed8d')
build() {
#export MAKEFLAGS="-j1"
cd ${srcdir}/${pkgname}-${pkgver}
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--with-db=gdbm \
--with-mailuser=courier --with-mailgroup=courier \
--with-authpam --with-authpwd --with-authshadow \
--with-authldap --with-authmysql --with-authpgsql \
--with-authuserdb --with-authcram --with-authdaemon \
--with-authdaemonvar=/run/authdaemon
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
###############################################################################
# post_installation ---- rename the config file and change ownerschip
for distfile in ${pkgdir}/etc/authlib/*.dist; do
chown 72:72 ${distfile}
mv ${distfile} ${pkgdir}/etc/authlib/`basename ${distfile} .dist`
done
# copy the .schema; mostly refered to as courier.schema -> rename it
install -Dm 444 authldap.schema \
${pkgdir}/etc/openldap/schema/courier.schema
###############################################################################
# Install daemon, that wraps couriers bashscript
install -Dm 755 ${srcdir}/authdaemond.rc.d ${pkgdir}/etc/rc.d/authdaemond
#mkdir -p ${pkgdir}/var/spool/authdaemon
#chown -R 72:72 ${pkgdir}/var/spool/authdaemon
mkdir -p ${pkgdir}/var/spool/courier
chown -R 72:72 ${pkgdir}/var/spool/courier
# docs say we can remove .a files after make
find ${pkgdir} -name '*\.a' -exec rm -f {} \;
# Make libs available to /usr/lib
cd $pkgdir/usr/lib
for lib in courier-authlib/*.so; do
ln -s $lib .
done
install -Dm644 "$srcdir/courier-authlib.tmpfiles" "$pkgdir/usr/lib/tmpfiles/courier-authlib.conf"
# avoid conflict with filesystem>=2012.06
rmdir "$pkgdir/run/authdaemon"
}
|