aboutsummaryrefslogtreecommitdiffstats
path: root/main/phpmyadmin/APKBUILD
blob: ca792534514c63017ce732bd28d0cd1cb432ad1e (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=phpmyadmin
pkgver=3.4.11.1
pkgrel=0
pkgdesc="A Web-based PHP tool for administering MySQL"
url="http://www.phpmyadmin.net/"
arch="noarch"
license="GPL"
depends="php php-mysql php-zip php-zlib php-bz2 php-ctype php-gd php-mcrypt mysql"
depends_dev=
makedepends="$depends_dev"
install="$pkgname.post-install"
subpackages="$pkgname-doc"
_fullpkgname=phpMyAdmin-$pkgver-all-languages
source="http://downloads.sourceforge.net/$pkgname/$_fullpkgname.tar.gz
	$pkgname.apache2.conf
	"

_builddir="$srcdir"/$_fullpkgname
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 phpmyadmin
	cp -ra "$_builddir"/* "$pkgdir"/usr/share/webapps/$pkgname/ \
		|| return 1

	# install the sample config
	install -m660  \
		"$pkgdir"/usr/share/webapps/$pkgname/config.sample.inc.php \
		"$pkgdir"/etc/$pkgname/config.inc.php \
		|| return 1
	ln -fs /etc/$pkgname/config.inc.php \
		"$pkgdir"/usr/share/webapps/$pkgname/config.inc.php \
		|| return 1

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

	# copy some contribs over
	mkdir -p "$pkgdir"/usr/share/$pkgname/contrib || return 1
	_contribs="htaccess swekey.sample.conf"
	for _contrib in $_contribs; do
		mv "$pkgdir"/usr/share/webapps/$pkgname/contrib/$_contrib \
			"$pkgdir"/usr/share/$pkgname/contrib/ \
			|| return 1
	done
	rm -rf "$pkgdir"/usr/share/webapps/$pkgname/contrib || return 1

	# copy sample config
	mv "$pkgdir"/usr/share/webapps/$pkgname/config.sample.inc.php \
		"$pkgdir"/usr/share/$pkgname/ || return 1
}

doc() {
	cd "$_builddir"
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1

	_docs="CREDITS ChangeLog Documentation.html Documentation.txt \
		INSTALL LICENSE README README.VENDOR RELEASE-DATE-$pkgver \
		TODO"
	for _doc in $_docs; do
		mv "$pkgdir"/usr/share/webapps/$pkgname/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/ \
			|| return 1
	done
}

md5sums="e54cedac04ef1743eae381c9affd2fc1  phpMyAdmin-3.4.11.1-all-languages.tar.gz
2d144825122042b4a2536ad789d66e8e  phpmyadmin.apache2.conf"