wok-4.x view nss_ldap/receipt @ rev 5906

Up libiec61883-dev (1.2.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 26 13:40:17 2010 +0200 (2010-07-26)
parents b9619a375396
children 664b01de0dcf
line source
1 # SliTaz package receipt.
3 PACKAGE="nss_ldap"
4 VERSION="265"
5 CATEGORY="system-tools"
6 SHORT_DESC="Get users, hosts, and groups from LDAP."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3"
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 ./vers_string -v
18 ./configure --prefix=/usr --infodir=/usr/share/info \
19 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \
20 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
21 make -j 4 &&
22 make DESTDIR=$PWD/_pkg install
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr $fs/etc
29 cp -a $_pkg/usr/lib $fs/usr
30 cp -a $_pkg/etc $fs
31 }
33 post_install()
34 {
35 if [ -s $1/etc/openldap/slapd.conf ]; then
36 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
37 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
38 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
39 sed -i -e "s|binddn .*|binddn $rootdn|" \
40 -e "s|bindpw .*|bindpw $rootpw|" \
41 -e "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
42 cat <<EOT
43 ------
44 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
45 $(grep ^suffix /etc/openldap/slapd.conf)
46 $(grep ^rootdn /etc/openldap/slapd.conf)
47 $(grep ^rootpw /etc/openldap/slapd.conf)
48 ------
49 EOT
50 fi
51 }