summaryrefslogtreecommitdiffstats
path: root/testing/pdns-gui/APKBUILD
blob: 4812790124eec313dc41d62fce5f372ee5a54fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=pdns-gui
pkgver=0.3.3
pkgrel=1
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
	0020-update-for-mysql55.patch
	0030-remove-zend.ze1_compatibility_mode-option.patch
	0040-alpine-default-htaccess-fix.patch
	$pkgname.apache2.conf
	"

_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() {
	# copy pdns-gui
	mkdir -p "$pkgdir"/usr/share/webapps/$pkgname || return 1
	cp -a "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ || return 1

	# move log directory
	mkdir -p "$pkgdir"/var/log/$pkgname || return 1
	chmod 2755 "$pkgdir"/var/log/$pkgname || return 1
	rm -rf "$pkgdir"/usr/share/webapps/$pkgname/log || return 1
	ln -fs /var/log/$pkgname "$pkgdir"/usr/share/webapps/$pkgname/log \
		|| return 1

	# remove the install file
	rm "$pkgdir"/usr/share/webapps/$pkgname/INSTALL || return 1

	# install the apache2 config
	install -Dm644 "$srcdir"/$pkgname.apache2.conf \
		"$pkgdir"/etc/apache2/conf.d/$pkgname.conf || return 1
}

md5sums="caa45c5408764ccd98cfffd69e5e976f  pdns-gui.0.3.3.tgz
98acdea457a4805c77cea373a6d57029  0010-replace-bash-with-sh.patch
21683d18b30aef6082803339413f8c42  0020-update-for-mysql55.patch
8865c965b6c81dbf2d9de5f8956b0ae0  0030-remove-zend.ze1_compatibility_mode-option.patch
d621eecb4f688640cb514aff1ea8ef7d  0040-alpine-default-htaccess-fix.patch
2a4d9133e4ac0c22ed7bd408052b5de0  pdns-gui.apache2.conf"