wok view nss_ldap/receipt @ rev 15265
Up cookutils (3.1.7)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 25 09:50:51 2013 +0000 (2013-09-25) |
parents | 664b01de0dcf |
children | 3765f181a6d5 |
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 BUILD_DEPENDS="openldap-dev"
11 WEB_SITE="http://www.padl.com/OSS/nss_ldap.html"
12 WGET_URL="http://www.padl.com/download/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./vers_string -v
19 ./configure --prefix=/usr --infodir=/usr/share/info \
20 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \
21 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
22 make $MAKEFLAGS &&
23 make DESTDIR=$PWD/_pkg install
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr $fs/etc
30 cp -a $_pkg/usr/lib $fs/usr
31 cp -a $_pkg/etc $fs
32 }
34 post_install()
35 {
36 if [ -s $1/etc/openldap/slapd.conf ]; then
37 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
38 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
39 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
40 sed -i -e "s|binddn .*|binddn $rootdn|" \
41 -e "s|bindpw .*|bindpw $rootpw|" \
42 -e "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
43 cat <<EOT
44 ------
45 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
46 $(grep ^suffix /etc/openldap/slapd.conf)
47 $(grep ^rootdn /etc/openldap/slapd.conf)
48 $(grep ^rootpw /etc/openldap/slapd.conf)
49 ------
50 EOT
51 fi
52 }