diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-09-23 14:50:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-09-23 14:50:25 +0000 |
commit | a9b8bfa9d6c505bda152e58788b3106eaf32c7bb (patch) | |
tree | 71082121491a1eb5deef4865b5b54485a7fa723f /community/phpmyadmin | |
parent | 6c5c1e1eda5fc81d7179877e6aca7faac9cff94e (diff) | |
download | aports-a9b8bfa9d6c505bda152e58788b3106eaf32c7bb.tar.bz2 aports-a9b8bfa9d6c505bda152e58788b3106eaf32c7bb.tar.xz |
community/phpmyadmin: move form main
We don't want maintain this for more than 6 months due to the amount of
security issues.
Diffstat (limited to 'community/phpmyadmin')
-rw-r--r-- | community/phpmyadmin/APKBUILD | 83 | ||||
-rw-r--r-- | community/phpmyadmin/phpmyadmin.apache2.conf | 7 | ||||
-rw-r--r-- | community/phpmyadmin/phpmyadmin.post-install | 16 |
3 files changed, 106 insertions, 0 deletions
diff --git a/community/phpmyadmin/APKBUILD b/community/phpmyadmin/APKBUILD new file mode 100644 index 0000000000..a8cca0ffd7 --- /dev/null +++ b/community/phpmyadmin/APKBUILD @@ -0,0 +1,83 @@ +# Contributor: Matt Smith <mcs@darkregion.net> +# Maintainer: Matt Smith <mcs@darkregion.net> +_php=php5 +pkgname=phpmyadmin +pkgver=4.6.4 +pkgrel=0 +pkgdesc="A Web-based PHP tool for administering MySQL" +url="http://www.phpmyadmin.net/" +arch="noarch" +license="GPL2 MIT BSD" +depends="${_php} ${_php}-mysqli ${_php}-zip ${_php}-zlib ${_php}-bz2 + ${_php}-ctype ${_php}-gd ${_php}-mcrypt ${_php}-json" +depends_dev= +makedepends="$depends_dev" +install="$pkgname.post-install" +subpackages="$pkgname-doc" +_fullpkgname=phpMyAdmin-$pkgver-all-languages +source="https://files.phpmyadmin.net/phpMyAdmin/$pkgver/$_fullpkgname.tar.xz + $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 -r "$_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 -sf /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 sample config + mkdir -p "$pkgdir"/usr/share/$pkgname/ || return 1 + 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="ChangeLog LICENSE README RELEASE-DATE-$pkgver" + for _doc in $_docs; do + mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \ + "$subpkgdir"/usr/share/doc/$pkgname/ \ + || return 1 + done +} + +md5sums="c6314ea1e8652a053bcad62f8ed94682 phpMyAdmin-4.6.4-all-languages.tar.xz +2d144825122042b4a2536ad789d66e8e phpmyadmin.apache2.conf" +sha256sums="f2ea32a2971efcab073ad41b6512475af1b6da70cf800a5586a12cf49797d319 phpMyAdmin-4.6.4-all-languages.tar.xz +4fbc1d0338ed7234a3d74f71910a24e467c8a0ec1dad31324e954741f93bd2d3 phpmyadmin.apache2.conf" +sha512sums="80ee0180c283c6ea139410289f9aa6535077f68812014dd8c7e334bdae0f49171a47b50274172a153d81e5f3145f906fdcda52751ba703fed8158482a924c6b2 phpMyAdmin-4.6.4-all-languages.tar.xz +c6af2960b95924c31cc05d90e7282ba9be6cb6eabb134b8bb627230a4253c017eca75132420a356acd6aecdce146e29666ed90fc90749820060a64478d3e2105 phpmyadmin.apache2.conf" diff --git a/community/phpmyadmin/phpmyadmin.apache2.conf b/community/phpmyadmin/phpmyadmin.apache2.conf new file mode 100644 index 0000000000..1c1a5f6498 --- /dev/null +++ b/community/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/community/phpmyadmin/phpmyadmin.post-install b/community/phpmyadmin/phpmyadmin.post-install new file mode 100644 index 0000000000..e3dbc3524a --- /dev/null +++ b/community/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 |