aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/poweradmin
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2014-10-27 17:27:39 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2014-10-27 17:28:00 +0100
commita941a7da4c213a038bd20a3e7a24fadbeb517d47 (patch)
treec89198e67384d611c307874c7c9de4f8c39ba939 /unmaintained/poweradmin
parentfbb5ea41156ebe8bb8d652b4e5d9f7b20bd9422d (diff)
downloadaports-a941a7da4c213a038bd20a3e7a24fadbeb517d47.tar.bz2
aports-a941a7da4c213a038bd20a3e7a24fadbeb517d47.tar.xz
testing/powerdns: unmaintained
Diffstat (limited to 'unmaintained/poweradmin')
-rw-r--r--unmaintained/poweradmin/0010-fix-installer-config.patch31
-rw-r--r--unmaintained/poweradmin/0020-fix-for-mysql55.patch20
-rw-r--r--unmaintained/poweradmin/APKBUILD81
-rw-r--r--unmaintained/poweradmin/poweradmin.apache2.conf7
-rw-r--r--unmaintained/poweradmin/poweradmin.post-install30
5 files changed, 169 insertions, 0 deletions
diff --git a/unmaintained/poweradmin/0010-fix-installer-config.patch b/unmaintained/poweradmin/0010-fix-installer-config.patch
new file mode 100644
index 0000000000..11dd435163
--- /dev/null
+++ b/unmaintained/poweradmin/0010-fix-installer-config.patch
@@ -0,0 +1,31 @@
+--- ./install/index.php.orig
++++ ./install/index.php
+@@ -287,11 +287,27 @@
+ "\$db_port\t\t= '" . $_POST['db_port'] . "';\n" .
+ "\$db_type\t\t= '" . $_POST['db_type'] . "';\n" .
+ "\n" .
+- "\$iface_lang\t\t= '" . $_POST['language'] . "';\n" .
++ "\$iface_lang\t\t= '" . $_POST['language'] . "';\n" .
++ "\$iface_style\t\t= ". "'example';\n" .
++ "\$iface_rowamount\t=". "50;\n" .
++ "\$iface_expire\t\t=". "1800;\n" .
++ "\$iface_zonelist_serial\t=". "false;\n" .
++ "\$iface_title\t\t=". "'Poweradmin';\n" .
+ "\n" .
+ "\$dns_hostmaster\t\t= '" . $_POST['dns_hostmaster'] . "';\n" .
+ "\$dns_ns1\t\t= '" . $_POST['dns_ns1'] . "';\n" .
+ "\$dns_ns2\t\t= '" . $_POST['dns_ns2'] . "';\n" .
++ "\n" .
++ "// See <http://www.php.net/manual/en/timezones.php> for help.\n" .
++ "//\$timezone\t\t=". "'UTC';\n" .
++ "\n" .
++ "/* Syslog usage - writes authentication attempts to syslog\n" .
++ " This facility could be used in combination with fail2ban to\n" .
++ " ban IPs with break-in attempts\n" .
++ "*/\n" .
++ "\$syslog_use = false;\n" .
++ "\$syslog_ident = 'poweradmin';\n" .
++ "\$syslog_facility = LOG_USER;\n" .
+ "\n?>\n";
+
+ if (is_writeable($local_config_file)) {
diff --git a/unmaintained/poweradmin/0020-fix-for-mysql55.patch b/unmaintained/poweradmin/0020-fix-for-mysql55.patch
new file mode 100644
index 0000000000..dbf59973c5
--- /dev/null
+++ b/unmaintained/poweradmin/0020-fix-for-mysql55.patch
@@ -0,0 +1,20 @@
+--- ./docs/powerdns-mysql-db-structure.sql.orig
++++ ./docs/powerdns-mysql-db-structure.sql
+@@ -7,7 +7,7 @@
+ notified_serial INT DEFAULT NULL,
+ account VARCHAR(40) DEFAULT NULL,
+ primary key (id)
+-)type=InnoDB;
++) Engine=InnoDB;
+
+ CREATE UNIQUE INDEX name_index ON domains(name);
+
+@@ -21,7 +21,7 @@
+ prio INT DEFAULT NULL,
+ change_date INT DEFAULT NULL,
+ primary key(id)
+-)type=InnoDB;
++) Engine=InnoDB;
+
+ CREATE INDEX rec_name_index ON records(name);
+ CREATE INDEX nametype_index ON records(name,type);
diff --git a/unmaintained/poweradmin/APKBUILD b/unmaintained/poweradmin/APKBUILD
new file mode 100644
index 0000000000..2ec8077ed1
--- /dev/null
+++ b/unmaintained/poweradmin/APKBUILD
@@ -0,0 +1,81 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=poweradmin
+pkgver=2.1.5.999
+pkgrel=0
+pkgdesc="A Web-based PHP tool for administering PowerDNS"
+url="https://www.poweradmin.org/"
+arch="noarch"
+license="GPL"
+depends="php php-gettext php-mcrypt php-pear php-pear-mdb2 pdns"
+# user needs to select either mysql or pgsql:
+# - mysql php-mysql php-pear-mdb2-driver-mysql
+# - postgresql php-pgsql php-pear-mdb2-driver-pgsql
+depends_dev=
+makedepends="$depends_dev wget"
+install="$pkgname.post-install"
+subpackages="$pkgname-doc"
+source="https://www.poweradmin.org/download/poweradmin.nightly.tgz
+ 0010-fix-installer-config.patch
+ 0020-fix-for-mysql55.patch
+ $pkgname.apache2.conf
+ "
+
+_builddir="$srcdir"/$pkgname-nightly
+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() {
+ # copy poweradmin
+ mkdir -p "$pkgdir"/usr/share/webapps/$pkgname || return 1
+ cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ || return 1
+
+ # install empty config file (for the web installer)
+ mkdir -p "$pkgdir"/etc/$pkgname || return 1
+ touch "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ chmod 660 "$pkgdir"/etc/$pkgname/config.inc.php || return 1
+ ln -fs /etc/$pkgname/config.inc.php "$pkgdir"/usr/share/webapps/$pkgname/inc/config.inc.php || return 1
+
+ # share files
+ _shares="i18n-template-db.pot i18n-template-php.pot \
+ poweradmin-mysql-db-structure.sql poweradmin-pgsql-db-structure.sql \
+ powerdns-mysql-db-structure.sql powerdns-pgsql-db-structure.sql \
+ powerdns-sqlite-db-structure.sql"
+ for _share in $_shares; do
+ install -Dm644 \
+ "$pkgdir"/usr/share/webapps/$pkgname/docs/$_share \
+ "$pkgdir"/usr/share/$pkgname/$_share || return 1
+ done
+ mv "$pkgdir"/usr/share/webapps/$pkgname/inc/config-me.inc.php \
+ "$pkgdir"/usr/share/$pkgname/config-me.inc.php || return 1
+
+ # install the apache2 config
+ install -Dm644 "$srcdir"/$pkgname.apache2.conf \
+ "$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
+}
+
+doc() {
+ _docs="CHANGELOG LICENSE README"
+ for _doc in $_docs; do
+ install -Dm644 \
+ "$pkgdir"/usr/share/webapps/$pkgname/docs/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+ rm -rf "$pkgdir"/usr/share/webapps/$pkgname/docs || return 1
+}
+
+md5sums="323f19990f3b0263f16db1dc18e0d42d poweradmin.nightly.tgz
+f2936b9362269f5ed08dc853d49576cb 0010-fix-installer-config.patch
+15638562a494a7ee3043e32476a47c94 0020-fix-for-mysql55.patch
+a74d64fc95f48c64927dd10df214127a poweradmin.apache2.conf"
diff --git a/unmaintained/poweradmin/poweradmin.apache2.conf b/unmaintained/poweradmin/poweradmin.apache2.conf
new file mode 100644
index 0000000000..56355e3882
--- /dev/null
+++ b/unmaintained/poweradmin/poweradmin.apache2.conf
@@ -0,0 +1,7 @@
+Alias /poweradmin "/usr/share/webapps/poweradmin"
+<Directory "/usr/share/webapps/poweradmin">
+ AllowOverride All
+ Options FollowSymlinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/unmaintained/poweradmin/poweradmin.post-install b/unmaintained/poweradmin/poweradmin.post-install
new file mode 100644
index 0000000000..b317e03851
--- /dev/null
+++ b/unmaintained/poweradmin/poweradmin.post-install
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+echo "*" >&2
+echo "* Poweradmin has been installed to:" >&2
+echo "* /usr/share/webapps/poweradmin" >&2
+echo "* An empty Poweradmin config file has been installed to:" >&2
+echo "* /etc/poweradmin/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/poweradmin" >&2
+echo "* 2) See if you need to modify the apache2 config:" >&2
+echo "* /etc/apache2/conf.d/poweradmin.conf" >&2
+echo "* 3) Restart apache2 when done." >&2
+echo "*" >&2
+echo "* Installation Steps:" >&2
+echo "* 1) Install the database packages you need for Poweradmin:" >&2
+echo "* For MySQL: apk add mysql php-mysql php-pear-mdb2-driver-mysql" >&2
+echo "* For PgSQL: apk add postgresql php-pgsql php-pear-mdb2-driver-pgsql" >&2
+echo "* 2) Point your browser to the install directory, e.g." >&2
+echo "* http://server_ip/poweradmin/install" >&2
+echo "* and follow the instructions on the screen." >&2
+echo "* 3) Remove the 'install' directory from the Poweradmin directory:" >&2
+echo "* rm /usr/share/webapps/poweradmin/install -rf" >&2
+echo "* 4) Point your browser to Poweradmin, e.g." >&2
+echo "* http://server_ip/poweradmin/" >&2
+echo "* and login using the username 'admin' and the password you provided" >&2
+echo "* during the installation process of Step 1 (above)." >&2
+echo "*" >&2
+
+exit 0