wok-next annotate phppgadmin/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents c4e53a39395a
children
rev   line source
pascal@1149 1 # SliTaz package receipt.
pascal@1149 2
pascal@1149 3 PACKAGE="phppgadmin"
pascal@16788 4 VERSION="5.1"
pascal@1149 5 CATEGORY="misc"
al@21020 6 SHORT_DESC="Administration of postgresql over the Web"
pascal@1149 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15198 8 LICENSE="GPL2"
al@21020 9 WEB_SITE="http://phppgadmin.sourceforge.net/doku.php"
al@21020 10
pascal@1149 11 SOURCE="phpPgAdmin"
pascal@1149 12 TARBALL="$SOURCE-$VERSION.tar.bz2"
pascal@1149 13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@15198 14
al@21020 15 genpkg_rules() {
pascal@1244 16 mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications
pascal@1149 17 cp -a $src/. $fs/usr/share/phppgadmin
pascal@1149 18 mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin
pascal@1149 19 ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf
slaxemulator@7008 20 mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php
pascal@1152 21 sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php
al@21020 22 cp $stuff/phppgadmin.desktop $fs/usr/share/applications
pascal@1149 23 chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin
pascal@1149 24 chmod 700 $fs/etc/phppgadmin
pascal@1149 25 chmod 600 $fs/etc/phppgadmin/*
al@21020 26 DEPENDS="php-pgsql"
al@21020 27 CONFIG_FILES="/etc/phppgadmin/config.inc.php"
pascal@1149 28 }
pascal@1149 29
al@21020 30 post_install() {
pascal@1314 31 # Configure lighttpd server
pascal@18730 32 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 33 if ! grep -q /usr/share/phppgadmin/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 34 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 35 if [ -z "$1" ]; then
pascal@1149 36 # Start Web server.
pascal@1149 37 /etc/init.d/lighttpd stop
pascal@1149 38 /etc/init.d/lighttpd start
pascal@1149 39 fi
pascal@1149 40 fi
pascal@1149 41 fi
pascal@1314 42 # Configure apache server
pascal@18730 43 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 44 if [ ! -f "$1/etc/apache/conf.d/phppgadmin" ]; then
pascal@18730 45 cat > "$1/etc/apache/conf.d/phppgadmin" <<EOT
pascal@1314 46 <IfModule mod_alias.c>
pascal@1314 47 Alias /phppgadmin /usr/share/phppgadmin
pascal@1314 48 </IfModule>
pascal@1314 49 <DirectoryMatch /usr/share/phppgadmin/>
pascal@1314 50 DirectoryIndex index.php
pascal@1314 51 Options +FollowSymLinks
pascal@1314 52 AllowOverride None
pascal@1314 53 Order allow,deny
pascal@1314 54 Allow from all
pascal@1314 55 </DirectoryMatch>
pascal@1314 56 EOT
pascal@1314 57 if [ -z "$1" ]; then
pascal@1314 58 # Start Web server.
pascal@1314 59 /etc/init.d/apache stop
pascal@1314 60 /etc/init.d/apache start
pascal@1314 61 fi
pascal@1314 62 fi
pascal@1314 63 fi
al@21020 64
al@21020 65 [ -n "$quiet" ] || cat << EOT
al@21020 66
al@21020 67 .--------------------------------------------------------------.
al@21020 68 | User 'postgres' can login on localhost without passwd after: |
al@21020 69 | # /etc/init.d/postgresql start |
al@21020 70 '--------------------------------------------------------------'
pascal@1311 71 EOT
pascal@1149 72 }