wok-4.x view phppgadmin/receipt @ rev 11823
fcitx-zm: add WEB_SITE
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 26 20:56:00 2012 +0100 (2012-02-26) |
parents | 51ea0235bee6 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="phppgadmin"
4 VERSION="5.0"
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 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php
23 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
24 cp stuff/phppgadmin.desktop $fs/usr/share/applications
25 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
26 chmod 700 $fs/etc/phppgadmin
27 chmod 600 $fs/etc/phppgadmin/*
28 }
30 post_install()
31 {
32 # Configure lighttpd server
33 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
34 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then
35 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
36 if [ -z "$1" ]; then
37 # Start Web server.
38 /etc/init.d/lighttpd stop
39 /etc/init.d/lighttpd start
40 fi
41 fi
42 fi
43 # Configure apache server
44 if [ -f $1/etc/apache/httpd.conf ]; then
45 if [ ! -f $1/etc/apache/conf.d/phppgadmin ]; then
46 cat > $1/etc/apache/conf.d/phppgadmin <<EOT
47 <IfModule mod_alias.c>
48 Alias /phppgadmin /usr/share/phppgadmin
49 </IfModule>
50 <DirectoryMatch /usr/share/phppgadmin/>
51 DirectoryIndex index.php
52 Options +FollowSymLinks
53 AllowOverride None
54 Order allow,deny
55 Allow from all
56 </DirectoryMatch>
57 EOT
58 if [ -z "$1" ]; then
59 # Start Web server.
60 /etc/init.d/apache stop
61 /etc/init.d/apache start
62 fi
63 fi
64 fi
65 cat << EOT
66 ------
67 User 'postgres' can login on localhost without passwd after:
68 # /etc/init.d/postgresql start
69 ------
70 EOT
71 }