testing/pdns-gui: new aport

Web-based GUI for administering PowerDNS
http://code.google.com/p/pdns-gui/
This commit is contained in:
Matt Smith 2011-04-05 07:05:02 -05:00
parent 2bf9528b2e
commit 884ad269bd
4 changed files with 136 additions and 0 deletions

View File

@ -0,0 +1,81 @@
--- ./batch/install.sh.orig
+++ ./batch/install.sh
@@ -1,10 +1,11 @@
-#!/bin/bash
+#!/bin/sh
-abspath=$(cd ${0%/*} && pwd -P)
+abspath=${0%/*}
+php=$(which php)
-if [[ `which php` == "" ]]; then
+if [ -z "$php" ]; then
echo "Error: can't locate PHP CLI interpreter"
exit 1
fi
-php -q $abspath/install.php
+$php -q $abspath/install.php
--- ./batch/install.php.orig
+++ ./batch/install.php
@@ -110,7 +110,7 @@
echo "\n\nAnd make sure 'mod_rewrite' is enabled.\n\n";
/**
* Interactively prompts for input without echoing to the terminal.
- * Requires a bash shell or Windows and won't work with
+ * Requires a sh shell or Windows and won't work with
* safe_mode settings (Uses `shell_exec`)
*/
function prompt_silent($prompt = "Enter Password:") {
@@ -125,12 +125,12 @@
unlink($vbscript);
return $password;
} else {
- $command = "/usr/bin/env bash -c 'echo OK'";
+ $command = "/usr/bin/env sh -c 'echo OK'";
if (rtrim(shell_exec($command)) !== 'OK') {
- trigger_error("Can't invoke bash");
+ trigger_error("Can't invoke sh");
return;
}
- $command = "/usr/bin/env bash -c 'read -s -p \""
+ $command = "/usr/bin/env sh -c 'read -s -p \""
. addslashes($prompt)
. "\" mypassword && echo \$mypassword'";
$password = rtrim(shell_exec($command));
--- ./batch/upgrade.sh.orig
+++ ./batch/upgrade.sh
@@ -1,10 +1,11 @@
-#!/bin/bash
+#!/bin/sh
-abspath=$(cd ${0%/*} && pwd -P)
+abspath=${0%/*}
+php=$(which php)
-if [[ `which php` == "" ]]; then
+if [ -z "$php" ]; then
echo "Error: can't locate PHP CLI interpreter"
exit 1
fi
-php -q $abspath/upgrade.php
+$php -q $abspath/upgrade.php
--- ./batch/dev/refresh.sh.orig
+++ ./batch/dev/refresh.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
echo ""
echo ""
@@ -15,8 +15,7 @@
echo -n " Do you want to continue [no]: "
read confirm
-if [[ "$confirm" != "YES" ]]
-then
+if [ "$confirm" != "YES" ]; then
exit 0
fi

41
testing/pdns-gui/APKBUILD Normal file
View File

@ -0,0 +1,41 @@
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=pdns-gui
pkgver=0.3.3
pkgrel=0
pkgdesc="Web-based GUI for administering PowerDNS"
url="http://code.google.com/p/pdns-gui/"
arch="noarch"
license="GPL"
depends="mysql php php-cli php-mysql php-xsl pdns pdns-backend-mysql"
depends_dev=
makedepends="$depends_dev"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages=
source="http://$pkgname.googlecode.com/files/$pkgname.$pkgver.tgz
0010-replace-bash-with-sh.patch
"
_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() {
mkdir -p "$pkgdir"/var/www/$pkgname || return 1
cp -a "$_builddir"/* "$pkgdir"/var/www/$pkgname/ || return 1
rm "$pkgdir"/var/www/$pkgname/INSTALL || return 1
}
md5sums="caa45c5408764ccd98cfffd69e5e976f pdns-gui.0.3.3.tgz
98acdea457a4805c77cea373a6d57029 0010-replace-bash-with-sh.patch"

View File

@ -0,0 +1,8 @@
#!/bin/sh
echo -e "\npdns-gui has been installed in: /var/www/pdns-gui"
echo -e "Be sure to set the correct ownership as per your webserver, and
echo -e "finish installing pdns-gui by running the following script:"
echo -e " /var/www/pdns-gui/batch/install.sh\n"
exit 0

View File

@ -0,0 +1,6 @@
#!/bin/sh
echo -e "\nTo finish upgrading pdns-gui, run the following script:"
echo -e "/var/www/pdns-gui/batch/upgrade.sh\n"
exit 0