wok-next view nss_ldap/receipt @ rev 20513

A lot of tiny edits; remove wget and pkg-build from $BUILD_DEPENDS and from *-dev packages $DEPENDS.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 21 15:58:17 2018 +0200 (2018-03-21)
parents 9e01bc6321ea
children 757d032c55c7
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"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://www.padl.com/download/$TARBALL"
14 BUILD_DEPENDS="openldap-dev perl"
16 compile_rules() {
17 ./vers_string -v
18 ./configure \
19 --prefix=/usr \
20 --infodir=/usr/share/info \
21 --enable-rfc2307bis \
22 --enable-schema-mapping \
23 --enable-paged-results \
24 --sysconfdir=/etc \
25 --mandir=/usr/share/man \
26 $CONFIGURE_ARGS &&
27 make $MAKEFLAGS &&
28 make DESTDIR=$DESTDIR install
29 }
31 genpkg_rules() {
32 mkdir -p $fs/usr $fs/etc
33 cp -a $install/usr/lib $fs/usr
34 cp -a $install/etc $fs
35 }
37 post_install() {
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,
48 rootdn and rootpw keywords:
49 $(grep ^suffix /etc/openldap/slapd.conf)
50 $(grep ^rootdn /etc/openldap/slapd.conf)
51 $(grep ^rootpw /etc/openldap/slapd.conf)
52 ------
53 EOT
54 fi
55 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3"
56 }