wok-next view nss_ldap/receipt @ rev 20982

... and this one
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Sep 28 01:16:57 2018 +0300 (2018-09-28)
parents 757d032c55c7
children d5aab818505e
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=$DESTDIR 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 }