updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / openldap-smbk5pwd / PKGBUILD
blob08d1bc976081d0137a32a61daa1fd7deec2aa5f1
1 # Maintainer: Uwe L. Korn <uwelk@xhochy.com>
2 # Contributor: Uwe L. Korn <uwelk@xhochy.com>
4 pkgname=openldap-smbk5pwd
5 pkgver=2.4.26
6 pkgrel=7
7 pkgdesc="smbk5pwd Module LDAP Server (change LDAP, Samba and Kerberos password simultanouesly)"
8 arch=('i686' 'x86_64')
9 license=('custom')
10 url="http://www.openldap.org/"
11 depends=("libldap>=${pkgver}" 'openldap' 'heimdal-aur')
12 source=("ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz")
13 md5sums=('f36f3086031dd56ae94f722ffae8df5e')
14 options=("emptydirs" "!libtool")
16 build() {
17   cd "${srcdir}"/openldap-${pkgver}
18   sed -i 's|-m 644 $(LIBRARY)|-m 755 $(LIBRARY)|' libraries/{liblber,libldap,libldap_r}/Makefile.in
19   sed -i 's|#define LDAPI_SOCK LDAP_RUNDIR LDAP_DIRSEP "run" LDAP_DIRSEP "ldapi"|#define LDAPI_SOCK LDAP_DIRSEP "run" LDAP_DIRSEP "openldap" LDAP_DIRSEP "ldapi"|' include/ldap_defaults.h
20   sed -i 's|%LOCALSTATEDIR%/run|/run/openldap|' servers/slapd/slapd.conf
21   sed -i 's|-$(MKDIR) $(DESTDIR)$(localstatedir)/run|-$(MKDIR) $(DESTDIR)/run/openldap|' servers/slapd/Makefile.in
23   LDFLAGS="$LDFLAGS -L\"openldap-${pkgver}\"/libldap/usr/lib" 
24   ./configure --prefix=/usr --mandir=/usr/share/man --libexecdir=/usr/lib \
25     --sysconfdir=/etc --localstatedir=/var/lib/openldap \
26     --enable-ipv6 --enable-syslog --enable-local \
27     --enable-bdb --enable-hdb \
28     --enable-crypt --enable-dynamic \
29     --with-threads  --disable-wrappers \
30     --enable-spasswd --with-cyrus-sasl \
31     --enable-overlays=mod --enable-modules=yes
32   
33   cd include
34   make
35   
36   cd ${srcdir}/openldap-${pkgver}/contrib/slapd-modules/smbk5pwd
37   cp /usr/include/et/com_err.h ${srcdir}/openldap-${pkgver}/include 
38   make
41 package() {
42   cd ${srcdir}/openldap-${pkgver}/contrib/slapd-modules/smbk5pwd
43   make DESTDIR=${pkgdir} install
44   mkdir -p ${pkgdir}/usr/lib/openldap
45   mv ${pkgdir}/usr/local/libexec/openldap/* ${pkgdir}/usr/lib/openldap/
46   rmdir ${pkgdir}/usr/local/libexec/openldap
47   rmdir ${pkgdir}/usr/local/libexec
48   rmdir ${pkgdir}/usr/local
49   
50   install -Dm644 ${srcdir}/openldap-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE