wok-6.x view phpldapadmin/receipt @ rev 1311
phpldapadmin, phppgadmin: add login tip
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 27 08:57:45 2008 +0000 (2008-08-27) |
parents | 6bfa3b761dd2 |
children | 32fa0b9984a6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="phpldapadmin"
4 VERSION="1.1.0.5"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of LDAP over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://$PACKAGE.sourceforge.net/"
10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
11 DEPENDS="php-ldap"
12 CONFIG_FILES="/etc/phpldapadmin/config.php"
14 # Rules to gen a SliTaz package suitable for Tazpkg.
15 genpkg_rules()
16 {
17 mkdir -p $fs/usr/share/phpldapadmin $fs/etc $fs/usr/share/applications
18 cp -a $src/. $fs/usr/share/phpldapadmin
19 mv $fs/usr/share/phpldapadmin/config $fs/etc/phpldapadmin
20 ln -s /etc/phpldapadmin $fs/usr/share/phpldapadmin/config
21 mv $fs/etc/phpldapadmin/config.php.example $fs/etc/phpldapadmin/config.php
22 cp stuff/phpldapadmin.desktop $fs/usr/share/applications
23 chown -R www.www $fs/usr/share/phpldapadmin $fs/etc/phpldapadmin
24 chmod 700 $fs/etc/phpldapadmin
25 chmod 600 $fs/etc/phpldapadmin/config.php
26 }
28 post_install()
29 {
30 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
31 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
32 etc/phpldapadmin/config.php
33 EOT
34 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
35 if ! grep -q /usr/share/phpldapadmin/ $1/etc/lighttpd/lighttpd.conf; then
36 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpldapadmin/" => "/usr/share/phpldapadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
37 if [ -z "$1" ]; then
38 # Start Web server.
39 /etc/init.d/lighttpd stop
40 /etc/init.d/lighttpd start
41 fi
42 fi
43 fi
44 cat <<EOT
45 ------
46 Login DN and password are found in /etc/openldap/slapd.conf with rootdn and rootpw keywords:
47 $(grep ^rootdn /etc/openldap/slapd.conf)
48 $(grep ^rootpw /etc/openldap/slapd.conf)
49 ------
50 EOT
51 }
53 repack_cleanup()
54 {
55 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
56 }