wok-next view nss_ldap/receipt @ rev 15584
Add some licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 30 17:02:58 2013 +0000 (2013-11-30) |
parents | 8e4c74abdf74 |
children | 164fcaca1cd0 |
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"
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=$DESTIDR 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 }