wok-6.x view phppgadmin/receipt @ rev 10943
asterisk: store ilbc sources in src cache (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 29 18:23:58 2011 +0200 (2011-08-29) |
parents | 51ea0235bee6 |
children | 78cb1e930abd |
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 }