aboutsummaryrefslogtreecommitdiffstats
path: root/community/bareos-webui/APKBUILD
blob: 243d34e824266ec23838de5a89c483f04b546d79 (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=16.2.6
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="21ba3a4360c091e2c1aff8ebaa37f32e174a8f2133fc878b27ab9bd5bdbf2b804049f644a0702e525cad0820fb301c2fbd77203082115db8f07fbc698a004c96  bareos-webui-16.2.6.tar.gz
f015fed04d1ab2d1410d3abe37329d2b48ecc54cd5fa0a0dd560c83ce0b9f04383219e6fa77d6a42752aeec8c26f9a27d53048edf0672435ef1e0cadaf2bae17  nginx-conf.patch"