summaryrefslogtreecommitdiff
path: root/core/libldap/PKGBUILD
blob: b629157ac3eb72a487baa9632bac9abc824cb336 (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
# $Id: PKGBUILD 109954 2011-02-14 13:17:18Z andrea $
# Maintainer:
# Contributor: Judd Vinet <jvinet@zeroflux.org>

pkgname=libldap
pkgver=2.4.24
pkgrel=1
pkgdesc="Lightweight Directory Access Protocol (LDAP) client libraries"
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
url="http://www.openldap.org/"
backup=(etc/openldap/ldap.conf)
depends=('libsasl' 'openssl')
makedepends=('tcp_wrappers' 'groff')
options=('!libtool')
source=("ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-${pkgver}.tgz"
        'ntlm.patch')
md5sums=('116fe1e23a7b67686d5e62274367e6c0'
         'dfa9eb6f2fd9d0a3dab0e1860923489e')

build() {
  cd ${srcdir}/openldap-${pkgver}

  patch -Np1 -i ${srcdir}/ntlm.patch

  ./configure --prefix=/usr \
    --libexecdir=/usr/sbin \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --localstatedir=/var/lib/openldap \
    --enable-crypt \
    --enable-dynamic \
    --with-threads \
    --enable-wrappers \
    --enable-spasswd \
    --with-cyrus-sasl \
    --disable-bdb \
    --disable-hdb

  cd include
  make

  cd ../libraries
  make depend
  make

  cd ../doc/man/man3
  make
  
  cd ../man5
  make
}

package() {
  cd ${srcdir}/openldap-${pkgver}

  cd include
  make DESTDIR=${pkgdir} install

  cd ../libraries
  make DESTDIR=${pkgdir} install

  cd ../doc/man/man3
  make DESTDIR=${pkgdir} install

  cd ../man5
  install -Dm644 ldap.conf.5.tmp \
    ${pkgdir}/usr/share/man/man5/ldap.conf.5
  
  # get rid of duplicate default conf files
  rm ${pkgdir}/etc/openldap/*.default

  ln -sf liblber.so ${pkgdir}/usr/lib/liblber.so.2
  ln -sf libldap.so ${pkgdir}/usr/lib/libldap.so.2

  install -Dm644 ${srcdir}/openldap-${pkgver}/LICENSE \
    ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
}