# SliTaz package receipt. PACKAGE="nss_ldap" VERSION="265" CATEGORY="system-tools" SHORT_DESC="Get users, hosts, and groups from LDAP." MAINTAINER="pascal.bellard@slitaz.org" TARBALL="$PACKAGE-$VERSION.tar.gz" DEPENDS="cyrus-sasl libkrb5 libldap openssl libcomerr libcomerr3" BUILD_DEPENDS="openldap-dev" WEB_SITE="http://www.padl.com/OSS/nss_ldap.html" WGET_URL="http://www.padl.com/download/$TARBALL" # Rules to configure and make the package. compile_rules() { cd $src ./vers_string -v ./configure --prefix=/usr --infodir=/usr/share/info \ --enable-rfc2307bis --enable-schema-mapping --enable-paged-results \ --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && make $MAKEFLAGS && make DESTDIR=$PWD/_pkg install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr $fs/etc cp -a $_pkg/usr/lib $fs/usr cp -a $_pkg/etc $fs } post_install() { if [ -s $1/etc/openldap/slapd.conf ]; then suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g') rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g') rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf) sed -i -e "s|binddn .*|binddn $rootdn|" \ -e "s|bindpw .*|bindpw $rootpw|" \ -e "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf cat <