wok-current view nss_ldap/receipt @ rev 17774
linphone: g_static_mutex_lock is deprecated
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 14 13:09:34 2015 +0100 (2015-03-14) |
parents | 3765f181a6d5 |
children | 9e01bc6321ea |
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 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.padl.com/OSS/nss_ldap.html"
11 WGET_URL="http://www.padl.com/download/$TARBALL"
13 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3"
14 BUILD_DEPENDS="openldap-dev perl"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./vers_string -v
21 ./configure --prefix=/usr --infodir=/usr/share/info \
22 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \
23 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
24 make $MAKEFLAGS &&
25 make DESTDIR=$DESTDIR install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr $fs/etc
32 cp -a $install/usr/lib $fs/usr
33 cp -a $install/etc $fs
34 }
36 post_install()
37 {
38 if [ -s $1/etc/openldap/slapd.conf ]; then
39 suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
40 rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g')
41 rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf)
42 sed -i -e "s|binddn .*|binddn $rootdn|" \
43 -e "s|bindpw .*|bindpw $rootpw|" \
44 -e "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf
45 cat <<EOT
46 ------
47 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
48 $(grep ^suffix /etc/openldap/slapd.conf)
49 $(grep ^rootdn /etc/openldap/slapd.conf)
50 $(grep ^rootpw /etc/openldap/slapd.conf)
51 ------
52 EOT
53 fi
54 }