# SliTaz package receipt. PACKAGE="phppgadmin" VERSION="5.0" CATEGORY="misc" SHORT_DESC="Administration of postgresql over the Web." MAINTAINER="pascal.bellard@slitaz.org" SOURCE="phpPgAdmin" TARBALL="$SOURCE-$VERSION.tar.bz2" WEB_SITE="http://$PACKAGE.sourceforge.net/" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" DEPENDS="php-pgsql" CONFIG_FILES="/etc/phppgadmin/config.inc.php" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/share/phppgadmin $fs/etc $fs/usr/share/applications cp -a $src/. $fs/usr/share/phppgadmin mv $fs/usr/share/phppgadmin/conf $fs/etc/phppgadmin ln -s /etc/phppgadmin $fs/usr/share/phppgadmin/conf mv -f $fs/etc/phppgadmin/config.inc.php-dist $fs/etc/phppgadmin/config.inc.php sed -i -e "s/conf\['extra_login_security'\] = true/conf['extra_login_security'] = false/" $fs/etc/phppgadmin/config.inc.php cp stuff/phppgadmin.desktop $fs/usr/share/applications chown -R www.www $fs/usr/share/phppgadmin $fs/etc/phppgadmin chmod 700 $fs/etc/phppgadmin chmod 600 $fs/etc/phppgadmin/* } post_install() { # Configure lighttpd server if [ -f $1/etc/lighttpd/lighttpd.conf ]; then if ! grep -q /usr/share/phppgadmin/ $1/etc/lighttpd/lighttpd.conf; then sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phppgadmin/" => "/usr/share/phppgadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf if [ -z "$1" ]; then # Start Web server. /etc/init.d/lighttpd stop /etc/init.d/lighttpd start fi fi fi # Configure apache server if [ -f $1/etc/apache/httpd.conf ]; then if [ ! -f $1/etc/apache/conf.d/phppgadmin ]; then cat > $1/etc/apache/conf.d/phppgadmin < Alias /phppgadmin /usr/share/phppgadmin DirectoryIndex index.php Options +FollowSymLinks AllowOverride None Order allow,deny Allow from all EOT if [ -z "$1" ]; then # Start Web server. /etc/init.d/apache stop /etc/init.d/apache start fi fi fi cat << EOT ------ User 'postgres' can login on localhost without passwd after: # /etc/init.d/postgresql start ------ EOT }