wok-next view phppgadmin/receipt @ rev 16092
Add ffmpeg-compat (needed to build libvalhalla)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Mar 16 14:14:43 2014 +0100 (2014-03-16) |
parents | 63dadb73ee17 |
children | d51b2411e55e |
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 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"
15 DEPENDS="php-pgsql"
17 # Rules to gen a SliTaz package suitable for Tazpkg.
18 genpkg_rules()
19 {
20 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications
21 cp -a $src/. $fs/usr/share/phppgadmin
22 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
23 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
24 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php
25 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
26 cp stuff/phppgadmin.desktop $fs/usr/share/applications
27 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
28 chmod 700 $fs/etc/phppgadmin
29 chmod 600 $fs/etc/phppgadmin/*
30 }
32 post_install()
33 {
34 # Configure lighttpd server
35 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
36 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
45 # Configure apache server
46 if [ -f $1/etc/apache/httpd.conf ]; then
47 if [ ! -f $1/etc/apache/conf.d/phppgadmin ]; then
48 cat > $1/etc/apache/conf.d/phppgadmin <<EOT
49 <IfModule mod_alias.c>
50 Alias /phppgadmin /usr/share/phppgadmin
51 </IfModule>
52 <DirectoryMatch /usr/share/phppgadmin/>
53 DirectoryIndex index.php
54 Options +FollowSymLinks
55 AllowOverride None
56 Order allow,deny
57 Allow from all
58 </DirectoryMatch>
59 EOT
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/apache stop
63 /etc/init.d/apache start
64 fi
65 fi
66 fi
67 cat << EOT
68 ------
69 User 'postgres' can login on localhost without passwd after:
70 # /etc/init.d/postgresql start
71 ------
72 EOT
73 }