wok-next view phppgadmin/receipt @ rev 4581
Fix: udev permissions rules for USB devices (printer, camera) - issue 134 (Thanks Rohit)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Dec 09 22:40:37 2009 +0100 (2009-12-09) |
parents | bd6010223726 |
children | 51ea0235bee6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="phppgadmin"
4 VERSION="4.2.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 # 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
64 cat << EOT
65 ------
66 User 'postgres' can login on localhost without passwd after:
67 # /etc/init.d/postgresql start
68 ------
69 EOT
70 }