wok-6.x diff nss_ldap/receipt @ rev 2435
mc: update depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Mar 12 16:28:39 2009 +0000 (2009-03-12) |
parents | |
children | 5914bf41369f |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/nss_ldap/receipt Thu Mar 12 16:28:39 2009 +0000 1.3 @@ -0,0 +1,48 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="nss_ldap" 1.7 +VERSION="264" 1.8 +CATEGORY="system-tools" 1.9 +SHORT_DESC="Get users, hosts, and groups from LDAP." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE.tgz" 1.12 +WEB_SITE="http://www.padl.com/OSS/nss_ldap.html" 1.13 +WGET_URL="http://www.padl.com/download/$TARBALL" 1.14 + 1.15 +# Rules to configure and make the package. 1.16 +compile_rules() 1.17 +{ 1.18 + cd $src 1.19 + ./configure --prefix=/usr --infodir=/usr/share/info \ 1.20 + --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && 1.21 + make && 1.22 + make DESTDIR=$PWD/_pkg install 1.23 +} 1.24 + 1.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.26 +genpkg_rules() 1.27 +{ 1.28 + mkdir -p $fs/usr $fs/etc 1.29 + cp -a $_pkg/usr/lib $fs/usr 1.30 + cp -a $_pkg/etc $fs 1.31 +} 1.32 + 1.33 +post_install() 1.34 +{ 1.35 + if [ -s $1/etc/openldap/slapd.conf ]; then 1.36 + suffix=$(awk '/^suffix/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g') 1.37 + rootdn=$(awk '/^rootdn/ { print $2 }' < $1/etc/openldap/slapd.conf | sed 's/"//g') 1.38 + rootpw=$(awk '/^rootpw/ { print $2 }' < $1/etc/openldap/slapd.conf) 1.39 + sed -i "s|binddn .*|binddn $rootdn|" \ 1.40 + -i "s|bindpw .*|bindpw $rootpw|" $1/etc/ldap.conf 1.41 + sed -i "s|dc=padl,dc=com|$suffix|g" $1/etc/ldap.conf 1.42 + cat <<EOT 1.43 +------ 1.44 +Suffix login DN and password are found in /etc/openldap/slapd.conf with suffix, rootdn and rootpw keywords: 1.45 +$(grep ^suffix /etc/openldap/slapd.conf) 1.46 +$(grep ^rootdn /etc/openldap/slapd.conf) 1.47 +$(grep ^rootpw /etc/openldap/slapd.conf) 1.48 +------ 1.49 +EOT 1.50 + fi 1.51 +}