aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos-webui/APKBUILD
blob: cc7aa2173fa6b1325154dd46c30024bd8d06458c (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
_php=php7
pkgname=bareos-webui
pkgver=17.2.4
pkgrel=0
pkgdesc="Bareos Web User Interface"
url="http://www.bareos.org/en/bareos-webui.html"
arch="noarch"
options="!check"
license="AGPL-3.0"
depends="$_php-bz2 $_php-ctype $_php-curl $_php-dom $_php-fileinfo $_php-gettext $_php-gd
	$_php-iconv $_php-intl $_php-json $_php-mbstring $_php-openssl $_php-session
	$_php-simplexml $_php-xml $_php-xmlreader $_php-xmlwriter $_php-zip
	"
makedepends="apache2-dev findutils gettext"
subpackages="$pkgname-apache2 $pkgname-nginx"
source="$pkgname-$pkgver.tar.gz::https://github.com/bareos/$pkgname/archive/Release/$pkgver.tar.gz
	nginx-conf.patch"
builddir="$srcdir"/$pkgname-Release-$pkgver

prepare() {
	default_prepare
	sed -i -e "s/mod_php5/mod_$_php/" "$builddir"/install/apache/$pkgname.conf
	sed -i -e "s/-dir//" "$builddir"/install/directors.ini
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--with-httpd-conf=/etc/apache2/conf.d
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	mv "$pkgdir"/etc/bareos/bareos-dir.d/console/admin.conf.example \
		"$pkgdir"/etc/bareos/bareos-dir.d/console/admin.conf
}

apache2() {
	pkgdesc="$pkgdesc (apache2 configuration files)"
	depends="$pkgname $_php-apache2"
	mkdir -p "$subpkgdir"/etc/
	mv "$pkgdir"/etc/apache2 "$subpkgdir"/etc/
}

nginx() {
	pkgdesc="$pkgdesc (nginx configuration files)"
	depends="$pkgname nginx"
	install -Dm644 "$builddir"/install/nginx/$pkgname.conf "$subpkgdir"/etc/nginx/conf.d/$pkgname.conf
}

sha512sums="6b5ebb64285d08d18341dcd3c020785949c36d32f825061c757f91763b4c934805f84321f005987fcca2544a95644920ef44fa6773e663e70a032448289812cf  bareos-webui-17.2.4.tar.gz
f015fed04d1ab2d1410d3abe37329d2b48ecc54cd5fa0a0dd560c83ce0b9f04383219e6fa77d6a42752aeec8c26f9a27d53048edf0672435ef1e0cadaf2bae17  nginx-conf.patch"