diff --git a/srcpkgs/phpMyAdmin/INSTALL.msg b/srcpkgs/phpMyAdmin/INSTALL.msg
new file mode 100644
index 00000000000..26f39da6a9c
--- /dev/null
+++ b/srcpkgs/phpMyAdmin/INSTALL.msg
@@ -0,0 +1,2 @@
+phpMyAdmin has been installed to:
+ /usr/share/webapps/phpmyadmin
diff --git a/srcpkgs/phpMyAdmin/files/apache.conf b/srcpkgs/phpMyAdmin/files/apache.conf
new file mode 100644
index 00000000000..8972b18f39a
--- /dev/null
+++ b/srcpkgs/phpMyAdmin/files/apache.conf
@@ -0,0 +1,11 @@
+# phpMyAdmin default Apache configuration
+
+Alias /phpmyadmin "/usr/share/webapps/phpmyadmin"
+
+
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+
+
diff --git a/srcpkgs/phpMyAdmin/files/lighttpd.conf b/srcpkgs/phpMyAdmin/files/lighttpd.conf
new file mode 100644
index 00000000000..8c3b049f447
--- /dev/null
+++ b/srcpkgs/phpMyAdmin/files/lighttpd.conf
@@ -0,0 +1,27 @@
+# Alias for phpMyAdmin directory
+alias.url += (
+ "/phpmyadmin" => "/usr/share/webapps/phpmyadmin",
+)
+
+# Disallow access to libraries
+$HTTP["url"] =~ "^/phpmyadmin/libraries" {
+ url.access-deny = ( "" )
+}
+$HTTP["url"] =~ "^/phpmyadmin/setup/lib" {
+ url.access-deny = ( "" )
+}
+
+# Limit access to setup script
+$HTTP["url"] =~ "^/phpmyadmin/setup" {
+ auth.backend = "htpasswd"
+ auth.backend.htpasswd.userfile = "/etc/phpmyadmin/htpasswd.setup"
+ auth.require = (
+ "/" => (
+ "method" => "basic",
+ "realm" => "phpMyAdmin Setup",
+ "require" => "valid-user"
+ )
+ )
+}
+
+
diff --git a/srcpkgs/phpMyAdmin/template b/srcpkgs/phpMyAdmin/template
new file mode 100644
index 00000000000..81a3012d4bd
--- /dev/null
+++ b/srcpkgs/phpMyAdmin/template
@@ -0,0 +1,24 @@
+# Template file for 'phpMyAdmin'
+pkgname=phpMyAdmin
+version=4.4.14.1
+revision=1
+create_wrksrc=yes
+noarch=yes
+build_style=fetch
+depends="php php-mysql"
+short_desc="Web-based MySQL administration tool"
+maintainer="Steve Prybylski "
+license="GPL-2"
+homepage="http://www.phpmyadmin.net"
+distfiles="https://files.phpmyadmin.net/phpMyAdmin/${version}/phpMyAdmin-${version}-all-languages.tar.gz>${pkgname}-${version}.tar.gz"
+checksum=d522758817c14e7f6a518565f3282526de75a025c74c9ed35f6858444ba60faa
+
+do_install() {
+ tar -zxvf ${pkgname}-${version}.tar.gz
+ vmkdir usr/share/webapps
+ vcopy ${pkgname}-${version}-all-languages usr/share/webapps/phpmyadmin
+
+ vinstall ${FILESDIR}/apache.conf 644 /etc/phpmyadmin/
+ vinstall ${FILESDIR}/lighttpd.conf 644 /etc/phpmyadmin/
+}
+