wok-current view nss_ldap/receipt @ rev 25483

created recipe for py3k-six
author Hans-G?nter Theisgen
date Mon Oct 17 07:54:33 2022 +0100 (2022-10-17)
parents bd7510903310
children
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="https://web.archive.org/web/20181221041632/https://www.padl.com/OSS/nss_ldap.html"
11 WGET_URL="https://fossies.org/linux/privat/old/$TARBALL"
13 DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3"
14 BUILD_DEPENDS="openldap-dev perl"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - https://raw.githubusercontent.com/PADL/nss_ldap/master/ChangeLog 2>/dev/null | \
20 sed '/^[0-9]/!d;s|[\t ].*||;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 ./vers_string -v
28 ./configure --prefix=/usr --infodir=/usr/share/info \
29 --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \
30 --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS &&
31 make $MAKEFLAGS &&
32 make DESTDIR=$DESTDIR install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr $fs/etc
39 cp -a $install/usr/lib $fs/usr
40 cp -a $install/etc $fs
41 }
43 post_install()
44 {
45 if [ -s "$1/etc/openldap/slapd.conf" ]; then
46 suffix=$(awk '/^suffix/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g')
47 rootdn=$(awk '/^rootdn/ { print $2 }' < "$1/etc/openldap/slapd.conf" | sed 's/"//g')
48 rootpw=$(awk '/^rootpw/ { print $2 }' < "$1/etc/openldap/slapd.conf")
49 sed -i -e "s|binddn .*|binddn $rootdn|" \
50 -e "s|bindpw .*|bindpw $rootpw|" \
51 -e "s|dc=padl,dc=com|$suffix|g" "$1/etc/ldap.conf"
52 cat <<EOT
53 ------
54 Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords:
55 $(grep ^suffix /etc/openldap/slapd.conf)
56 $(grep ^rootdn /etc/openldap/slapd.conf)
57 $(grep ^rootpw /etc/openldap/slapd.conf)
58 ------
59 EOT
60 fi
61 }