aboutsummaryrefslogtreecommitdiffstats
path: root/testing/phppgadmin/APKBUILD
blob: f6df49ad37e784ef22ed598ba8ef596ab35315f4 (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
64
65
66
67
68
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=phppgadmin
_pkgname=phpPgAdmin
pkgver=5.0.2
pkgrel=0
pkgdesc="A Web-based PHP tool for administering PostgreSQL"
url="http://phppgadmin.sourceforge.net/"
arch="all"
license="GPL"
depends="php php-pgsql php-zlib php-ctype postgresql"
depends_dev=
makedepends="$depends_dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/phppgadmin/$_pkgname-$pkgver.tar.gz
	phppgadmin.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() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/share/webapps/$pkgname "$pkgdir"/etc/$pkgname \
		|| return 1

	# copy phppgadmin
	cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ \
		|| return 1

	# install the config
	install -m440 \
		"$pkgdir"/usr/share/webapps/$pkgname/conf/config.inc.php-dist \
		"$pkgdir"/etc/$pkgname/config.inc.php || return 1
	rm -rf "$pkgdir"/usr/share/webapps/$pkgname/conf/ || return 1
	ln -fs /etc/phppgadmin/ "$pkgdir"/usr/share/webapps/$pkgname/conf \
		|| return 1

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

doc() {
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
	_docs="CREDITS DEVELOPERS FAQ HISTORY INSTALL LICENSE TODO \
	    TRANSLATORS help"
	for _doc in $_docs; do
		mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/ || return 1
	done
}

md5sums="dfdbb5860847123413596292931a44f9  phpPgAdmin-5.0.2.tar.gz
670eec89bbe794a50d36c80f02608708  phppgadmin.apache2.conf"