wok-6.x view nss_ldap/receipt @ rev 19334
apache: mkdir for PIDFILE
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Sun Jul 17 20:43:11 2016 -0400 (2016-07-17) |
parents | 164fcaca1cd0 |
children | 8dd8bab3f0ca |
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 }