aboutsummaryrefslogtreecommitdiffstats
path: root/main/phpmyadmin
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-04-14 03:45:59 -0500
committerMatt Smith <mcs@darkregion.net>2011-04-14 03:45:59 -0500
commit3804cec5cbb186a283b6a941c3e3b95cba6dde33 (patch)
tree6cc7890413105163739041badf86f892b9425e75 /main/phpmyadmin
parent2f80e3b0d7f5f97141be08ec22cbfc9e986da7c1 (diff)
downloadaports-3804cec5cbb186a283b6a941c3e3b95cba6dde33.tar.bz2
aports-3804cec5cbb186a283b6a941c3e3b95cba6dde33.tar.xz
main/phpmyadmin: moved from testing
Diffstat (limited to 'main/phpmyadmin')
-rw-r--r--main/phpmyadmin/APKBUILD88
-rw-r--r--main/phpmyadmin/phpmyadmin.apache2.conf7
-rw-r--r--main/phpmyadmin/phpmyadmin.post-install16
3 files changed, 111 insertions, 0 deletions
diff --git a/main/phpmyadmin/APKBUILD b/main/phpmyadmin/APKBUILD
new file mode 100644
index 0000000000..113a70de35
--- /dev/null
+++ b/main/phpmyadmin/APKBUILD
@@ -0,0 +1,88 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=phpmyadmin
+pkgver=3.3.10
+pkgrel=2
+pkgdesc="A Web-based PHP tool for administering MySQL"
+url="http://www.phpmyadmin.net/"
+arch="noarch"
+license="GPL"
+depends="php php-mysql php-zip php-zlib php-bz2 php-ctype php-gd php-mcrypt mysql"
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+_fullpkgname=phpMyAdmin-$pkgver-all-languages
+source="http://downloads.sourceforge.net/$pkgname/$_fullpkgname.tar.gz
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$_fullpkgname
+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 phpmyadmin
+ cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ \
+ || return 1
+
+ # install the sample config
+ install -m660 \
+ "$pkgdir"/usr/share/webapps/$pkgname/config.sample.inc.php \
+ "$pkgdir"/etc/$pkgname/config.inc.php \
+ || return 1
+ ln -fs /etc/$pkgname/config.inc.php \
+ "$pkgdir"/usr/share/webapps/$pkgname/config.inc.php \
+ || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+
+ # copy some contribs over
+ mkdir -p "$pkgdir"/usr/share/$pkgname/contrib || return 1
+ _contribs="htaccess swekey.sample.conf"
+ for _contrib in $_contribs; do
+ mv "$pkgdir"/usr/share/webapps/$pkgname/contrib/$_contrib \
+ "$pkgdir"/usr/share/$pkgname/contrib/ \
+ || return 1
+ done
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/contrib || return 1
+
+ # copy sample config
+ mv "$pkgdir"/usr/share/webapps/$pkgname/config.sample.inc.php \
+ "$pkgdir"/usr/share/$pkgname/ || return 1
+}
+
+doc() {
+ cd "$_builddir"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+
+ _docs="CREDITS ChangeLog Documentation.html Documentation.txt \
+ INSTALL LICENSE README README.VENDOR RELEASE-DATE-$pkgver \
+ TODO translators.html documentation-gsoc"
+ for _doc in $_docs; do
+ mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/ \
+ || return 1
+ done
+}
+
+md5sums="2e93375a92a86ef36e561b0087f6b8e3 phpMyAdmin-3.3.10-all-languages.tar.gz
+2d144825122042b4a2536ad789d66e8e phpmyadmin.apache2.conf"
diff --git a/main/phpmyadmin/phpmyadmin.apache2.conf b/main/phpmyadmin/phpmyadmin.apache2.conf
new file mode 100644
index 0000000000..1c1a5f6498
--- /dev/null
+++ b/main/phpmyadmin/phpmyadmin.apache2.conf
@@ -0,0 +1,7 @@
+Alias /phpmyadmin "/usr/share/webapps/phpmyadmin"
+<Directory "/usr/share/webapps/phpmyadmin">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/main/phpmyadmin/phpmyadmin.post-install b/main/phpmyadmin/phpmyadmin.post-install
new file mode 100644
index 0000000000..e3dbc3524a
--- /dev/null
+++ b/main/phpmyadmin/phpmyadmin.post-install
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* phpmyadmin has been installed to:" >&2
+echo "* /usr/share/webapps/phpmyadmin" >&2
+echo "* phpmyadmin config file has been installed to:" >&2
+echo "* /etc/phpmyadmin/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/phpmyadmin" >&2
+echo "* 2) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/phpmyadmin.conf" >&2
+echo "* 3) Restart apache2 when done." >&2
+echo "*" >&2
+
+exit 0