wok-next annotate phppgadmin/receipt @ rev 1862
Add wifidog (gateway side)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 15 23:07:14 2008 +0000 (2008-12-15) |
parents | 2b4792182cf0 |
children | bd6010223726 |
rev | line source |
---|---|
pascal@1149 | 1 # SliTaz package receipt. |
pascal@1149 | 2 |
pascal@1149 | 3 PACKAGE="phppgadmin" |
pascal@1149 | 4 VERSION="4.2" |
pascal@1149 | 5 CATEGORY="misc" |
pascal@1149 | 6 SHORT_DESC="Administration of postgresql over the Web." |
pascal@1149 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1149 | 8 SOURCE="phpPgAdmin" |
pascal@1149 | 9 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@1149 | 10 WEB_SITE="http://$PACKAGE.sourceforge.net/" |
pascal@1149 | 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@1149 | 12 DEPENDS="php-pgsql" |
pascal@1212 | 13 CONFIG_FILES="/etc/phppgadmin/config.inc.php" |
pascal@1149 | 14 |
pascal@1149 | 15 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1149 | 16 genpkg_rules() |
pascal@1149 | 17 { |
pascal@1244 | 18 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications |
pascal@1149 | 19 cp -a $src/. $fs/usr/share/phppgadmin |
pascal@1149 | 20 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin |
pascal@1149 | 21 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf |
pascal@1152 | 22 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php |
pascal@1244 | 23 cp stuff/phppgadmin.desktop $fs/usr/share/applications |
pascal@1149 | 24 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin |
pascal@1149 | 25 chmod 700 $fs/etc/phppgadmin |
pascal@1149 | 26 chmod 600 $fs/etc/phppgadmin/* |
pascal@1149 | 27 } |
pascal@1149 | 28 |
pascal@1149 | 29 post_install() |
pascal@1149 | 30 { |
pascal@1152 | 31 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ |
pascal@1152 | 32 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT |
pascal@1152 | 33 etc/phppgadmin/config.inc.php |
pascal@1152 | 34 EOT |
pascal@1314 | 35 # Configure lighttpd server |
pascal@1149 | 36 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1149 | 37 if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1149 | 38 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@1149 | 39 if [ -z "$1" ]; then |
pascal@1149 | 40 # Start Web server. |
pascal@1149 | 41 /etc/init.d/lighttpd stop |
pascal@1149 | 42 /etc/init.d/lighttpd start |
pascal@1149 | 43 fi |
pascal@1149 | 44 fi |
pascal@1149 | 45 fi |
pascal@1314 | 46 # Configure apache server |
pascal@1314 | 47 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1314 | 48 if [ ! -f $1/etc/apache/conf.d/phppgadmin ]; then |
pascal@1314 | 49 cat > $1/etc/apache/conf.d/phppgadmin <<EOT |
pascal@1314 | 50 <IfModule mod_alias.c> |
pascal@1314 | 51 Alias /phppgadmin /usr/share/phppgadmin |
pascal@1314 | 52 </IfModule> |
pascal@1314 | 53 <DirectoryMatch /usr/share/phppgadmin/> |
pascal@1314 | 54 DirectoryIndex index.php |
pascal@1314 | 55 Options +FollowSymLinks |
pascal@1314 | 56 AllowOverride None |
pascal@1314 | 57 Order allow,deny |
pascal@1314 | 58 Allow from all |
pascal@1314 | 59 </DirectoryMatch> |
pascal@1314 | 60 EOT |
pascal@1314 | 61 if [ -z "$1" ]; then |
pascal@1314 | 62 # Start Web server. |
pascal@1314 | 63 /etc/init.d/apache stop |
pascal@1314 | 64 /etc/init.d/apache start |
pascal@1314 | 65 fi |
pascal@1314 | 66 fi |
pascal@1314 | 67 fi |
pascal@1311 | 68 cat << EOT |
pascal@1311 | 69 ------ |
pascal@1311 | 70 User 'postgres' can login on localhost without passwd after: |
pascal@1311 | 71 # /etc/init.d/postgresql start |
pascal@1311 | 72 ------ |
pascal@1311 | 73 EOT |
pascal@1149 | 74 } |
pascal@1149 | 75 |
pascal@1152 | 76 repack_cleanup() |
pascal@1152 | 77 { |
pascal@1152 | 78 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) |
pascal@1152 | 79 } |