diff options
-rw-r--r-- | testing/homer-api/APKBUILD | 37 | ||||
-rw-r--r-- | testing/homer-api/homer-move-config2etc.patch | 55 | ||||
-rw-r--r-- | testing/homer-api/rotation-ini-path.patch | 22 |
3 files changed, 44 insertions, 70 deletions
diff --git a/testing/homer-api/APKBUILD b/testing/homer-api/APKBUILD index 4af15b80c0..d811825e2c 100644 --- a/testing/homer-api/APKBUILD +++ b/testing/homer-api/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=homer-api pkgver=5.0.6 -pkgrel=1 +pkgrel=2 pkgdesc="HOMER API" url="https://github.com/sipcapture/homer-api" arch="noarch" @@ -13,7 +13,7 @@ makedepends="$depends_dev" install= subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/homer-api/archive/$pkgver.tar.gz - homer-move-config2etc.patch" + rotation-ini-path.patch" builddir="$srcdir"/$pkgname-$pkgver build() { @@ -22,27 +22,34 @@ build() { package() { cd "$builddir" - mkdir -p "$pkgdir"/usr/share/webapps/homer-ui/api \ + local file + local appdir=$pkgdir/usr/share/webapps/homer + + mkdir -p "$appdir" \ "$pkgdir"/etc/homer \ - "$pkgdir"/etc/periodic/hourly \ - "$pkgdir"/usr/share/homer-api/scripts \ + "$pkgdir"/etc/periodic/daily \ + "$pkgdir"/usr/bin \ "$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_example.php \ - "$pkgdir"/etc/homer/preferences.php - mv "$pkgdir"/usr/share/webapps/homer-ui/api/configuration_example.php \ - "$pkgdir"/etc/homer/configuration.php - install -D -m755 scripts/homer_rotate "$pkgdir"/etc/periodic/daily/homer_rotate - mv scripts/*.pl "$pkgdir"/usr/share/homer-api/scripts + + 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 + + mv scripts/homer_* "$pkgdir"/usr/bin install -m644 scripts/rotation.ini "$pkgdir"/etc/homer + ln -s /usr/bin/homer_rotate "$pkgdir"/etc/periodic/daily + cp sql/* "$pkgdir"/usr/share/homer-api/sql cp -R examples "$pkgdir"/usr/share/doc/homer-api } md5sums="16762b9eabfee68a5953b6df87f2c6e6 homer-api-5.0.6.tar.gz -989485384b8c16fcd1f69db8f09d614a homer-move-config2etc.patch" +5e336b2b7eedfa20961dba21019e97cf rotation-ini-path.patch" sha256sums="abe4ab89fe5d0d09d7b89f91316f6ae39a51195903099e73d7dff95d5bd23672 homer-api-5.0.6.tar.gz -d8cdaae740e116d69827ca1e9d7db7284314a83b360a43d8abef6a49ed149c61 homer-move-config2etc.patch" +5b51667f7e4f22e271445f8ed6f52d2a443b5b10ad3e0947a2476b9f45417079 rotation-ini-path.patch" sha512sums="620185c19bd348ba68bad3a1992b7d673d29dcfb8a0aeea437a2d31e90f0a21cf6f46a43f0041a583a14d9403e1d8574c6040da1dba397ec2d955b8aba9010d8 homer-api-5.0.6.tar.gz -dcbb488dfad4f30892654ed11eb15cf3b9f1ec3740fad0d0f1811ad3e9e6f30be3c03ce76f366a3a23bf2f9bf3bedf2e5673314552a532115ab0056bb6e9242c homer-move-config2etc.patch" +b7a072cee1d64ec712fb4e9b7ac4191581f9babaf92c3088b8c6bbcc6e72d3f588015894835d7cdab281ba6963dcb15e8f9197fc9ee138cb329104beac5654e7 rotation-ini-path.patch" diff --git a/testing/homer-api/homer-move-config2etc.patch b/testing/homer-api/homer-move-config2etc.patch deleted file mode 100644 index 37bcca0b11..0000000000 --- a/testing/homer-api/homer-move-config2etc.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- homer-api-5.0.6/api/configuration_example.php -+++ homer-api-5.0.6.alpine/api/configuration_example.php -@@ -30,7 +30,7 @@ - - /* INCLUDE preferences */ - --include_once("preferences.php"); -+include_once("/etc/homer/preferences.php"); - - endif; - ---- homer-api-5.0.6/api/index.php -+++ homer-api-5.0.6.alpine/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); ---- homer-api-5.0.6/scripts/homer_mysql_remove_partitions.pl -+++ homer-api-5.0.6.alpine/scripts/homer_mysql_remove_partitions.pl -@@ -31,7 +31,7 @@ - $| =1; - - # Determine path and set default rotation.ini location --my $script_location = `dirname $0`; -+my $script_location = "/etc/homer"; - $script_location =~ s/^\s+|\s+$//g; - my $default_ini = $script_location."/rotation.ini"; - ---- homer-api-5.0.6/scripts/homer_mysql_rotate.pl -+++ homer-api-5.0.6.alpine/scripts/homer_mysql_rotate.pl -@@ -30,7 +30,7 @@ - $| =1; - - # Determine path and set default rotation.ini location --my $script_location = `dirname $0`; -+my $script_location = "/etc/homer"; - $script_location =~ s/^\s+|\s+$//g; - my $default_ini = $script_location."/rotation.ini"; - ---- homer-api-5.0.6/scripts/homer_rotate -+++ homer-api-5.0.6.alpine/scripts/homer_rotate -@@ -3,7 +3,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 - programm="$bin_dir/homer_mysql_rotate.pl" - config="$bin_dir/rotation.ini" - diff --git a/testing/homer-api/rotation-ini-path.patch b/testing/homer-api/rotation-ini-path.patch new file mode 100644 index 0000000000..b6f9ee3d9b --- /dev/null +++ b/testing/homer-api/rotation-ini-path.patch @@ -0,0 +1,22 @@ +--- homer-api-5.0.6/scripts/homer_partremove ++++ homer-api-5.0.6.alpine/scripts/homer_partremove +@@ -5,7 +5,7 @@ + + bin_dir=`dirname $0` + programm="$bin_dir/homer_mysql_remove_partitions.pl" +-config="$bin_dir/rotation.ini" ++config=/etc/homer/rotation.ini + + $programm $config + +--- homer-api-5.0.6/scripts/homer_rotate ++++ homer-api-5.0.6.alpine/scripts/homer_rotate +@@ -5,7 +5,7 @@ + + bin_dir=`dirname $0` + programm="$bin_dir/homer_mysql_rotate.pl" +-config="$bin_dir/rotation.ini" ++config=/etc/homer/rotation.ini + + if [ $# -ne 0 ] + then |