wok view phppgadmin/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="phppgadmin"
4 VERSION="4.2"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of postgresql over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="phpPgAdmin"
9 TARBALL="$SOURCE-$VERSION.tar.bz2"
10 WEB_SITE="http://$PACKAGE.sourceforge.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 DEPENDS="php-pgsql"
13 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications
19 cp -a $src/. $fs/usr/share/phppgadmin
20 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
21 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
22 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
23 cp stuff/phppgadmin.desktop $fs/usr/share/applications
24 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
25 chmod 700 $fs/etc/phppgadmin
26 chmod 600 $fs/etc/phppgadmin/*
27 }
29 post_install()
30 {
31 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
32 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
33 etc/phppgadmin/config.inc.php
34 EOT
35 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
36 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 cat << EOT
46 ------
47 User 'postgres' can login on localhost without passwd after:
48 # /etc/init.d/postgresql start
49 ------
50 EOT
51 }
53 repack_cleanup()
54 {
55 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
56 }