From 4e5e9ddc3d8feadab6635241382cccbc86ea217a Mon Sep 17 00:00:00 2001 From: "Adrian Chaves Fernandez (Gallaecio)" Date: Wed, 19 Oct 2011 18:23:15 +0000 Subject: [PATCH] Using Arch Linux PhpPgAdmin, is packaged with better practices. --- phppgadmin/PKGBUILD | 48 +++++++++++++++++++++-------------- phppgadmin/phppgadmin.install | 4 +++ 2 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 phppgadmin/phppgadmin.install diff --git a/phppgadmin/PKGBUILD b/phppgadmin/PKGBUILD index e75f25467..bfc6f0084 100644 --- a/phppgadmin/PKGBUILD +++ b/phppgadmin/PKGBUILD @@ -1,31 +1,41 @@ # # Apps Packages for Chakra, part of chakra-project.org # -# Maintainer: Adrián Chaves Fernández (Gallaecio) - -# include global config -source ../_buildscripts/${current_repo}-${_arch}-cfg.conf +# Maintainer: Adrián Chaves Fernández (Gallaecio) +# Contributor: wizzomafizzo +# Contributor: Benjamin Andresen pkgname=phppgadmin -_pkgname=phpPgAdmin pkgver=5.0.2 -pkgrel=2 -pkgdesc="Web-based administration tool for PostgreSQL." +pkgrel=3 +pkgdesc="A web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies and hosting services" arch=('any') url="http://sourceforge.net/projects/phppgadmin" -license=('GPL2') -depends=('php' 'postgresql') -backup=('srv/http/phppgadmin/conf/config.inc.php' - 'srv/http/phppgadmin/.htaccess') -changelog=ChangeLog -source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$_pkgname-$pkgver.tar.gz) +license=('GPL') +depends=('php' 'postgresql' 'php-pgsql') +backup=('etc/webapps/phppgadmin/config.inc.php' + 'etc/webapps/phppgadmin/.htaccess') +install=phppgadmin.install +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/phpPgAdmin-$pkgver.tar.gz) md5sums=('dfdbb5860847123413596292931a44f9') build() { - mkdir -p $pkgdir/srv/http/phppgadmin - cd $pkgdir/srv/http/phppgadmin - - cp -ra $srcdir/$_pkgname-$pkgver/* . && \ - cp ./conf/config.inc.php-dist ./conf/config.inc.php && \ - echo "deny from all" >> .htaccess + _instdir=$pkgdir/usr/share/webapps/phppgadmin + mkdir -p ${_instdir} $pkgdir/etc/webapps/phppgadmin + cd ${_instdir} + cp -ra $srcdir/phpPgAdmin-$pkgver/* . + cp ./conf/config.inc.php-dist $pkgdir/etc/webapps/phppgadmin/config.inc.php + echo "deny from all" >$pkgdir/etc/webapps/phppgadmin/.htaccess + ln -s /etc/webapps/phppgadmin/.htaccess ${_instdir}/.htaccess + ln -s /etc/webapps/phppgadmin/config.inc.php ${_instdir}/config.inc.php + cat >$pkgdir/etc/webapps/phppgadmin/apache.example.conf < + AllowOverride All + Options FollowSymlinks + Order allow,deny + Allow from all + +EOF } diff --git a/phppgadmin/phppgadmin.install b/phppgadmin/phppgadmin.install new file mode 100644 index 000000000..6c4319660 --- /dev/null +++ b/phppgadmin/phppgadmin.install @@ -0,0 +1,4 @@ +post_upgrade() { + echo "Don't forget to add ':/usr/share/webapps/:/etc/webapps/' to php.ini/open_basedir," + echo "adjust webserver configuration and enable pgsql php extension" +}