wok-stable view nss_ldap/receipt @ rev 2445

nss_ldap: enable-rfc2307bis
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Mar 13 12:11:02 2009 +0000 (2009-03-13)
parents 750f18342487
children 1f99ce29d09e
line source
1 # SliTaz package receipt.
3 PACKAGE="nss_ldap"
4 VERSION="264"
5 CATEGORY="system-tools"
6 SHORT_DESC="Get users, hosts, and groups from LDAP."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE.tgz"
9 WEB_SITE="http://www.padl.com/OSS/nss_ldap.html"
10 WGET_URL="http://www.padl.com/download/$TARBALL"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 cd $src
16 ./configure --prefix=/usr --infodir=/usr/share/info \
17 --enable-rfc2307bis \
18 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
19 make &&
20 make DESTDIR=$PWD/_pkg install
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr $fs/etc
27 cp -a $_pkg/usr/lib $fs/usr
28 cp -a $_pkg/etc $fs
29 }
31 post_install()
32 {
33 if [ -s $1/etc/openldap/slapd.conf ]; then
34 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
35 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
36 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
37 sed -i "s|binddn .*|binddn $rootdn|" \
38 -i "s|bindpw .*|bindpw $rootpw|" $1/etc/ldap.conf
39 sed -i "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
40 cat <<EOT
41 ------
42 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
43 $(grep ^suffix /etc/openldap/slapd.conf)
44 $(grep ^rootdn /etc/openldap/slapd.conf)
45 $(grep ^rootpw /etc/openldap/slapd.conf)
46 ------
47 EOT
48 fi
49 }