wok-next view phppgadmin/receipt @ rev 1862
Add wifidog (gateway side)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 15 23:07:14 2008 +0000 (2008-12-15) |
parents | 2b4792182cf0 |
children | bd6010223726 |
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 # Configure lighttpd server
36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
37 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then
38 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
39 if [ -z "$1" ]; then
40 # Start Web server.
41 /etc/init.d/lighttpd stop
42 /etc/init.d/lighttpd start
43 fi
44 fi
45 fi
46 # Configure apache server
47 if [ -f $1/etc/apache/httpd.conf ]; then
48 if [ ! -f $1/etc/apache/conf.d/phppgadmin ]; then
49 cat > $1/etc/apache/conf.d/phppgadmin <<EOT
50 <IfModule mod_alias.c>
51 Alias /phppgadmin /usr/share/phppgadmin
52 </IfModule>
53 <DirectoryMatch /usr/share/phppgadmin/>
54 DirectoryIndex index.php
55 Options +FollowSymLinks
56 AllowOverride None
57 Order allow,deny
58 Allow from all
59 </DirectoryMatch>
60 EOT
61 if [ -z "$1" ]; then
62 # Start Web server.
63 /etc/init.d/apache stop
64 /etc/init.d/apache start
65 fi
66 fi
67 fi
68 cat << EOT
69 ------
70 User 'postgres' can login on localhost without passwd after:
71 # /etc/init.d/postgresql start
72 ------
73 EOT
74 }
76 repack_cleanup()
77 {
78 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
79 }