wok view phppgadmin/receipt @ rev 23372
updated perl-module-runtime (0.014 -> 0.016)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 31 13:39:48 2020 +0100 (2020-03-31) |
parents | 77efaea34489 |
children | fea693604883 |
line source
1 # SliTaz package receipt.
3 PACKAGE="phppgadmin"
4 VERSION="5.1"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of postgresql over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="phpPgAdmin"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://$PACKAGE.sourceforge.net/"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
13 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
14 HOST_ARCH="any"
16 DEPENDS="php-pgsql"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications
22 cp -a $src/. $fs/usr/share/phppgadmin
23 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
24 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
25 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php
26 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
27 cp stuff/phppgadmin.desktop $fs/usr/share/applications
28 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
29 chmod 700 $fs/etc/phppgadmin
30 chmod 600 $fs/etc/phppgadmin/*
31 }
33 post_install()
34 {
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 }