wok-current view nss_ldap/receipt @ rev 2569
mirror-tools/mkpkgiso: add wok/wok-stable
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 30 16:47:36 2009 +0000 (2009-03-30) |
parents | bfd0152b290a |
children | 5b44af8c1257 |
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 DEPENDS="cyrus-sasl libkrb5 libldap openssl"
10 WEB_SITE="http://www.padl.com/OSS/nss_ldap.html"
11 WGET_URL="http://www.padl.com/download/$TARBALL"
13 # Rules to configure and make the package.
14 compile_rules()
15 {
16 cd $src
17 ./configure --prefix=/usr --infodir=/usr/share/info \
18 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \
19 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
20 make &&
21 make DESTDIR=$PWD/_pkg install
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/usr $fs/etc
28 cp -a $_pkg/usr/lib $fs/usr
29 cp -a $_pkg/etc $fs
30 }
32 post_install()
33 {
34 if [ -s $1/etc/openldap/slapd.conf ]; then
35 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
36 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
37 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
38 sed -i -e "s|binddn .*|binddn $rootdn|" \
39 -e "s|bindpw .*|bindpw $rootpw|" \
40 -e "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
41 cat <<EOT
42 ------
43 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
44 $(grep ^suffix /etc/openldap/slapd.conf)
45 $(grep ^rootdn /etc/openldap/slapd.conf)
46 $(grep ^rootpw /etc/openldap/slapd.conf)
47 ------
48 EOT
49 fi
50 }