wok-next view nss_ldap/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents 4e6503d7a19f
children d457c4e37c1b
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://www.padl.com/OSS/nss_ldap.html"
10 REPOLOGY="nss-ldap"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="http://www.padl.com/download/$TARBALL"
15 BUILD_DEPENDS="openldap-dev perl"
17 compile_rules() {
18 ./vers_string -v
19 ./configure \
20 --enable-rfc2307bis \
21 --enable-schema-mapping \
22 --enable-paged-results \
23 $CONFIGURE_ARGS &&
24 make $MAKEFLAGS &&
25 make DESTDIR=$install install
26 }
28 genpkg_rules() {
29 mkdir -p $fs/usr $fs/etc
30 cp -a $install/usr/lib $fs/usr
31 cp -a $install/etc $fs
32 }
34 post_install() {
35 if [ -s "$1/etc/openldap/slapd.conf" ]; then
36 suffix=$(awk '/^suffix/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g')
37 rootdn=$(awk '/^rootdn/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g')
38 rootpw=$(awk '/^rootpw/ { print $2 }' < "$1/etc/openldap/slapd.conf")
39 sed -i -e "s|binddn .*|binddn $rootdn|" \
40 -e "s|bindpw .*|bindpw $rootpw|" \
41 -e "s|dc=padl,dc=com|$suffix|g" "$1/etc/ldap.conf"
42 cat <<EOT
43 ------
44 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix,
45 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 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3"
53 }