aboutsummaryrefslogtreecommitdiffstats
path: root/testing/homer-api/APKBUILD
blob: 5af455d5ac381714a1644051f5e71eeec4e04a87 (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
60
61
62
63
64
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=homer-api
pkgver=5.0.6
pkgrel=3
pkgdesc="HOMER API"
url="https://github.com/sipcapture/homer-api"
arch="noarch"
license="GPL"
depends="homer-db php5-pdo_mysql"
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc homer-db"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/homer-api/archive/$pkgver.tar.gz
        rotation-ini-path.patch"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	local file
	local appdir=$pkgdir/usr/share/webapps/homer

	mkdir -p "$appdir" \
		"$pkgdir"/etc/homer \
		"$pkgdir"/usr/share/doc/homer-api

	mv api "$appdir"

	for file in configuration preferences; do
		mv "$appdir"/api/${file}_example.php "$pkgdir"/etc/homer/$file.php
		ln -s /etc/homer/$file.php "$appdir"/api
	done

	cp -R examples "$pkgdir"/usr/share/doc/homer-api
}

db() {
	depends="perl perl-dbi perl-dbd-mysql"

	cd "$builddir"
	mkdir -p \
		"$subpkgdir"/etc/periodic/daily \
		"$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/share/homer-db

	install -D -m 644 scripts/rotation.ini \
		"$subpkgdir"/etc/homer/rotation.ini
	cp -p sql/* "$subpkgdir"/usr/share/homer-db

	cp -p scripts/homer_* "$subpkgdir"/usr/bin
	ln -s /usr/bin/homer_rotate "$subpkgdir"/etc/periodic/daily
}

md5sums="16762b9eabfee68a5953b6df87f2c6e6  homer-api-5.0.6.tar.gz
5e336b2b7eedfa20961dba21019e97cf  rotation-ini-path.patch"
sha256sums="abe4ab89fe5d0d09d7b89f91316f6ae39a51195903099e73d7dff95d5bd23672  homer-api-5.0.6.tar.gz
5b51667f7e4f22e271445f8ed6f52d2a443b5b10ad3e0947a2476b9f45417079  rotation-ini-path.patch"
sha512sums="620185c19bd348ba68bad3a1992b7d673d29dcfb8a0aeea437a2d31e90f0a21cf6f46a43f0041a583a14d9403e1d8574c6040da1dba397ec2d955b8aba9010d8  homer-api-5.0.6.tar.gz
b7a072cee1d64ec712fb4e9b7ac4191581f9babaf92c3088b8c6bbcc6e72d3f588015894835d7cdab281ba6963dcb15e8f9197fc9ee138cb329104beac5654e7  rotation-ini-path.patch"