aboutsummaryrefslogtreecommitdiffstats
path: root/testing/homer-api
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2016-01-12 09:26:13 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2016-01-12 09:33:55 +0000
commit3bb984430873d0e90dcbb1d4b43c6185622d3acc (patch)
tree5142e5220816dd00473950ec86c6d65e27f1a04f /testing/homer-api
parent6873064833927f29dd36c684f8406bab46f51cfd (diff)
downloadaports-3bb984430873d0e90dcbb1d4b43c6185622d3acc.tar.bz2
aports-3bb984430873d0e90dcbb1d4b43c6185622d3acc.tar.xz
testing/homer-api: new aport
HOMER API, a robust, carrier-grade, scalable SIP Capture system and Monitoring Application
Diffstat (limited to 'testing/homer-api')
-rw-r--r--testing/homer-api/APKBUILD55
-rw-r--r--testing/homer-api/homer-move-config2etc.patch33
2 files changed, 88 insertions, 0 deletions
diff --git a/testing/homer-api/APKBUILD b/testing/homer-api/APKBUILD
new file mode 100644
index 0000000000..288db5cc81
--- /dev/null
+++ b/testing/homer-api/APKBUILD
@@ -0,0 +1,55 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=homer-api
+pkgver=5.0.1
+pkgrel=0
+pkgdesc="HOMER API"
+url="https://github.com/sipcapture/homer-api"
+arch="noarch"
+license="GPL"
+depends="perl perl-dbi perl-dbd-mysql"
+depends_dev=
+makedepends="$depends_dev"
+install=
+subpackages=
+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
+ 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
+}
+
+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"
diff --git a/testing/homer-api/homer-move-config2etc.patch b/testing/homer-api/homer-move-config2etc.patch
new file mode 100644
index 0000000000..2fe0c493f0
--- /dev/null
+++ b/testing/homer-api/homer-move-config2etc.patch
@@ -0,0 +1,33 @@
+--- a/api/configuration.php
++++ b/api/configuration.php
+@@ -25,7 +25,7 @@
+
+ /* INCLUDE preferences */
+
+-include_once("preferences.php");
++include_once("/etc/homer/preferences.php");
+
+ endif;
+
+--- a/api/index.php
++++ b/api/index.php
+@@ -30,7 +30,7 @@
+ define('ROOT', realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR));
+ define('_HOMEREXEC', "1");
+
+-require_once("configuration.php");
++require_once("/etc/homer/configuration.php");
+
+ date_default_timezone_set(HOMER_TIMEZONE);
+ ini_set('date.timezone', HOMER_TIMEZONE);
+--- a/scripts/homer_rotate
++++ b/scripts/homer_rotate
+@@ -5,7 +5,7 @@
+ # Set correct bin path if we are running as a cron job
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+-bin_dir=`dirname $0`
++bin_dir=/usr/share/homer-api/scripts
+ new_table="$bin_dir/homer_mysql_new_table.pl"
+ programm="$bin_dir/homer_mysql_partrotate_unixtimestamp.pl"
+