wok view phppgadmin/receipt @ rev 23696

Up libtcplay (3.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Apr 27 09:29:39 2020 +0000 (2020-04-27)
parents 9e01bc6321ea
children 5ea0ce1cecc0
line source
1 # SliTaz package receipt.
3 PACKAGE="phppgadmin"
4 VERSION="7.12.1"
5 CATEGORY="misc"
6 SHORT_DESC="Administration of postgresql over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://github.com/phppgadmin/phppgadmin/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}archive/REL_${VERSION//./-}.tar.gz"
14 DEPENDS="php-pgsql"
16 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
18 HOST_ARCH="any"
20 # Rules to gen a SliTaz package suitable for Tazpkg.
21 genpkg_rules()
22 {
23 mkdir -p $fs/usr/share/phppgadmin
24 mkdir -p $fs/etc
25 mkdir -p $fs/usr/share/applications
27 cp -a $src/. $fs/usr/share/phppgadmin
28 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
29 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
30 mv -f $fs/etc/phppgadmin/config.inc.php-dist \
31 $fs/etc/phppgadmin/config.inc.php
32 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
33 cp stuff/phppgadmin.desktop $fs/usr/share/applications
34 chown -R www.www $fs/usr/share/phppgadmin
35 chown -R www.www $fs/etc/phppgadmin
36 chmod 700 $fs/etc/phppgadmin
37 chmod 600 $fs/etc/phppgadmin/*
38 }
40 post_install()
41 {
42 # Configure lighttpd server
43 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]
44 then
45 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"
46 then
47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
48 if [ -z "$1" ]
49 then
50 # Start Web server.
51 /etc/init.d/lighttpd stop
52 /etc/init.d/lighttpd start
53 fi
54 fi
55 fi
57 # Configure apache server
58 if [ -f "$1/etc/apache/httpd.conf" ]
59 then
60 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]
61 then
62 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT
63 <IfModule mod_alias.c>
64 Alias /phppgadmin /usr/share/phppgadmin
65 </IfModule>
66 <DirectoryMatch /usr/share/phppgadmin/>
67 DirectoryIndex index.php
68 Options +FollowSymLinks
69 AllowOverride None
70 Order allow,deny
71 Allow from all
72 </DirectoryMatch>
73 EOT
74 if [ -z "$1" ]
75 then
76 # Start Web server.
77 /etc/init.d/apache stop
78 /etc/init.d/apache start
79 fi
80 fi
81 fi
82 cat << EOT
83 ------
84 User 'postgres' can login on localhost without passwd after:
85 # /etc/init.d/postgresql start
86 ------
87 EOT
88 }