wok-next view phppgadmin/receipt @ rev 21084
Add librefox
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Dec 25 14:44:32 2018 +0200 (2018-12-25) |
parents | c4e53a39395a |
children |
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 WEB_SITE="http://phppgadmin.sourceforge.net/doku.php"
11 SOURCE="phpPgAdmin"
12 TARBALL="$SOURCE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
15 genpkg_rules() {
16 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications
17 cp -a $src/. $fs/usr/share/phppgadmin
18 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
19 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
20 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php
21 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
22 cp $stuff/phppgadmin.desktop $fs/usr/share/applications
23 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
24 chmod 700 $fs/etc/phppgadmin
25 chmod 600 $fs/etc/phppgadmin/*
26 DEPENDS="php-pgsql"
27 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
28 }
30 post_install() {
31 # Configure lighttpd server
32 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
33 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
34 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
35 if [ -z "$1" ]; then
36 # Start Web server.
37 /etc/init.d/lighttpd stop
38 /etc/init.d/lighttpd start
39 fi
40 fi
41 fi
42 # Configure apache server
43 if [ -f "$1/etc/apache/httpd.conf" ]; then
44 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]; then
45 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT
46 <IfModule mod_alias.c>
47 Alias /phppgadmin /usr/share/phppgadmin
48 </IfModule>
49 <DirectoryMatch /usr/share/phppgadmin/>
50 DirectoryIndex index.php
51 Options +FollowSymLinks
52 AllowOverride None
53 Order allow,deny
54 Allow from all
55 </DirectoryMatch>
56 EOT
57 if [ -z "$1" ]; then
58 # Start Web server.
59 /etc/init.d/apache stop
60 /etc/init.d/apache start
61 fi
62 fi
63 fi
65 [ -n "$quiet" ] || cat << EOT
67 .--------------------------------------------------------------.
68 | User 'postgres' can login on localhost without passwd after: |
69 | # /etc/init.d/postgresql start |
70 '--------------------------------------------------------------'
71 EOT
72 }