wok view nss_ldap/receipt @ rev 15426
Up: thunderbird-langpack-ru (17.0.9esr)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Sun Nov 03 21:52:52 2013 +0100 (2013-11-03) |
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 }