aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos-webui/APKBUILD
blob: 5822fbe9cce4f0dff6cea4ea74c35a56632fe6b5 (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
# Contributor: Pedro Filipe <xpecex@outlook.com>
# 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.5
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="904ebc549bd2bf0837fca2ecda8c1ff561628c568dda4eca96f40a2e6956db026e6c8a5cd55d129100696fcadd08bc3ff1f4c0d2ce0867c14ffce269c8a097a8  bareos-webui-17.2.5.tar.gz
f015fed04d1ab2d1410d3abe37329d2b48ecc54cd5fa0a0dd560c83ce0b9f04383219e6fa77d6a42752aeec8c26f9a27d53048edf0672435ef1e0cadaf2bae17  nginx-conf.patch"