wok-6.x annotate nss_ldap/receipt @ rev 1946

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