aboutsummaryrefslogtreecommitdiffstats
path: root/testing/homer-api/APKBUILD
blob: b7fda17bcce3e3028bdb51dbb545b5906a848ac2 (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=homer-api
pkgver=5.0.1
pkgrel=2
pkgdesc="HOMER API"
url="https://github.com/sipcapture/homer-api"
arch="noarch"
license="GPL"
depends="perl perl-dbi perl-dbd-mysql php5-pdo_mysql"
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/homer-api/archive/v$pkgver-api.tar.gz
	homer-move-config2etc.patch
	"


_builddir="$srcdir"/$pkgname-$pkgver-api

prepare() {
	cd "$_builddir"
	patch -p1 < ../homer-move-config2etc.patch
}

build() {
	cd "$_builddir"
	return 0
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/share/webapps/homer-ui/api \
		"$pkgdir"/etc/homer \
		"$pkgdir"/etc/periodic/hourly \
		"$pkgdir"/usr/share/homer-api/scripts \
		"$pkgdir"/usr/share/homer-api/sql \
		"$pkgdir"/usr/share/doc/homer-api
	mv ./api/* "$pkgdir"/usr/share/webapps/homer-ui/api
	mv "$pkgdir"/usr/share/webapps/homer-ui/api/preferences.php \
		"$pkgdir"/etc/homer/preferences.php
	mv "$pkgdir"/usr/share/webapps/homer-ui/api/configuration.php \
		"$pkgdir"/etc/homer/configuration.php
	install -D -m755 scripts/homer_rotate "$pkgdir"/etc/periodic/daily/homer_rotate
	install -D -m755 scripts/homer_mysql_new_table.pl \
		"$pkgdir"/usr/share/homer-api/scripts/homer_mysql_new_table.pl
	install -D -m755 scripts/homer_mysql_partrotate_unixtimestamp.pl \
		"$pkgdir"/usr/share/homer-api/scripts/homer_mysql_partrotate_unixtimestamp.pl
	cp sql/* "$pkgdir"/usr/share/homer-api/sql
	cp -R examples "$pkgdir"/usr/share/doc/homer-api
}

md5sums="c578e47b5c31ad723d4fa5a34c455f47  homer-api-5.0.1.tar.gz
726d5c5d8b9ad1b36966a0f6d651f364  homer-move-config2etc.patch"
sha256sums="092d691f480e5a9331d1e430f0d53328580ea5d7815583e898fa418db56847ad  homer-api-5.0.1.tar.gz
e0eebbbaa8457c74eed2465b8e2eb3354fb0c327f3385a969ee59aa9c5bc0c5e  homer-move-config2etc.patch"
sha512sums="5400df095e5148dfdb7a8bcbf251ed3fc6c6e6d7c38a1a839f5fb516345b0317f01c87f4879136416241d371debd4d1d0b2b521fadec9bf1d4f2f459865cb258  homer-api-5.0.1.tar.gz
c8966b28da2536678bbec624926fa5e78b4ec3612186c5b7a1d5744b26521ef13e70f6df6ad747cb1627cfb8a7e6d7bfaed0ef03690b6a63663399ce5a6a0c8a  homer-move-config2etc.patch"