aboutsummaryrefslogtreecommitdiffstats
path: root/community/racktables/APKBUILD
blob: bc3800fa4f6059583bee60f36a293046acf39f1a (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=racktables
_realname=RackTables
pkgver=0.20.12
pkgrel=0
pkgdesc="Server room asset management"
url="http://racktables.org"
arch="noarch"
license="GPL2"
_php=php5
depends="$_php ${_php}-bcmath ${_php}-gd ${_php}-mysql ${_php}-pdo_mysql
	${_php}-json"
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc"
pkggroups="www-data"
source="https://github.com/RackTables/racktables/archive/RackTables-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$_realname-$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() {
	cd "$_builddir"
	return 0
}

package() {
	cd "$_builddir"
	export prefix="/usr/share/webapps"
	export datadir="${prefix}"
	export docdir="/usr/share/doc/RackTables"
	make DESTDIR="${pkgdir}" install
	make DESTDIR="${pkgdir}" install-docs
	mkdir -p "$pkgdir"/etc/racktables
	chown :www-data "$pkgdir"/etc/racktables
	chmod 770 "$pkgdir"/etc/racktables
	sed -i "s%<?php%<?php\n\n\$racktables_confdir = '/etc/racktables';%" \
	 "$pkgdir"/usr/share/webapps/RackTables/wwwroot/index.php || return 1
}

md5sums="bf423115c059504d3ca0f91f508272a5  RackTables-0.20.12.tar.gz"
sha256sums="818753857169e4affd9aa11e30bbdd7aeedc6f6b34f64a63f713f0df36f9b283  RackTables-0.20.12.tar.gz"
sha512sums="dd5012fc3b5c26e078053dc41c912f50aea6e8d6b92eeb6ccd92fbd1661e523fbffc5c8ce439027f3cd4eadf35a088e4ae335974a9b9b02212af148cb3f0fc72  RackTables-0.20.12.tar.gz"