aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-04-08 11:03:51 -0500
committerMatt Smith <mcs@darkregion.net>2011-04-08 11:03:51 -0500
commit02eb37f59a022e9f1563d1f766a9cbbfe2bec863 (patch)
tree020b29a5a08fcf2e6d25c764fb07ad77be0b347e
parent9f1962e5b670dece0c31d8431df013dbe87c4a60 (diff)
downloadaports-02eb37f59a022e9f1563d1f766a9cbbfe2bec863.tar.bz2
aports-02eb37f59a022e9f1563d1f766a9cbbfe2bec863.tar.xz
testing/phppgadmin: new aport
A Web-based PHP tool for administering PostgreSQL http://phppgadmin.sourceforge.net/
-rw-r--r--testing/phppgadmin/APKBUILD68
-rw-r--r--testing/phppgadmin/phppgadmin.apache2.conf7
-rw-r--r--testing/phppgadmin/phppgadmin.post-install16
3 files changed, 91 insertions, 0 deletions
diff --git a/testing/phppgadmin/APKBUILD b/testing/phppgadmin/APKBUILD
new file mode 100644
index 0000000000..f6df49ad37
--- /dev/null
+++ b/testing/phppgadmin/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=phppgadmin
+_pkgname=phpPgAdmin
+pkgver=5.0.2
+pkgrel=0
+pkgdesc="A Web-based PHP tool for administering PostgreSQL"
+url="http://phppgadmin.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="php php-pgsql php-zlib php-ctype postgresql"
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/phppgadmin/$_pkgname-$pkgver.tar.gz
+ phppgadmin.apache2.conf
+ "
+
+_builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname "$pkgdir"/etc/$pkgname \
+ || return 1
+
+ # copy phppgadmin
+ cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ \
+ || return 1
+
+ # install the config
+ install -m440 \
+ "$pkgdir"/usr/share/webapps/$pkgname/conf/config.inc.php-dist \
+ "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/conf/ || return 1
+ ln -fs /etc/phppgadmin/ "$pkgdir"/usr/share/webapps/$pkgname/conf \
+ || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+doc() {
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ _docs="CREDITS DEVELOPERS FAQ HISTORY INSTALL LICENSE TODO \
+ TRANSLATORS help"
+ for _doc in $_docs; do
+ mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/ || return 1
+ done
+}
+
+md5sums="dfdbb5860847123413596292931a44f9 phpPgAdmin-5.0.2.tar.gz
+670eec89bbe794a50d36c80f02608708 phppgadmin.apache2.conf"
diff --git a/testing/phppgadmin/phppgadmin.apache2.conf b/testing/phppgadmin/phppgadmin.apache2.conf
new file mode 100644
index 0000000000..b69e01b22d
--- /dev/null
+++ b/testing/phppgadmin/phppgadmin.apache2.conf
@@ -0,0 +1,7 @@
+Alias /phppgadmin "/usr/share/webapps/phppgadmin"
+<Directory "/usr/share/webapps/phppgadmin">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/testing/phppgadmin/phppgadmin.post-install b/testing/phppgadmin/phppgadmin.post-install
new file mode 100644
index 0000000000..f9650a192a
--- /dev/null
+++ b/testing/phppgadmin/phppgadmin.post-install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* phppgadmin has been installed to:" >&2
+echo "* /usr/share/webapps/phppgadmin" >&2
+echo "* phppgadmin config file has been installed to:" >&2
+echo "* /etc/phppgadmin/config.inc.php" >&2
+echo "* If you use apache2:" >&2
+echo "* 1) Change the ownership of the config directory:" >&2
+echo "* chown -R apache:apache /etc/phppgadmin" >&2
+echo "* 2) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/phppgadmin.conf" >&2
+echo "* 3) Restart apache2 when done." >&2
+echo "*" >&2
+
+exit 0