wok view nss_ldap/receipt @ rev 2239

netatalk-pam: add /etc/pam.d/
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 14 13:13:31 2009 +0000 (2009-02-14)
parents
children 5914bf41369f
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 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
18 make &&
19 make DESTDIR=$PWD/_pkg install
20 }
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 genpkg_rules()
24 {
25 mkdir -p $fs/usr $fs/etc
26 cp -a $_pkg/usr/lib $fs/usr
27 cp -a $_pkg/etc $fs
28 }
30 post_install()
31 {
32 if [ -s $1/etc/openldap/slapd.conf ]; then
33 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
34 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
35 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
36 sed -i "s|binddn .*|binddn $rootdn|" \
37 -i "s|bindpw .*|bindpw $rootpw|" $1/etc/ldap.conf
38 sed -i "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
39 cat <<EOT
40 ------
41 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
42 $(grep ^suffix /etc/openldap/slapd.conf)
43 $(grep ^rootdn /etc/openldap/slapd.conf)
44 $(grep ^rootpw /etc/openldap/slapd.conf)
45 ------
46 EOT
47 fi
48 }