aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-12-22 12:56:18 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-12-22 13:05:46 -0300
commitab7755fb37dbfa98511fedecada1a35cc78e9ab1 (patch)
tree074bf8c1719ccab8e813ef455d06ba1920d7eac6
parent6f77cf2bdff79185926b2ee0e1cfef6e6e25c794 (diff)
downloadaports-ab7755fb37dbfa98511fedecada1a35cc78e9ab1.tar.gz
aports-ab7755fb37dbfa98511fedecada1a35cc78e9ab1.tar.bz2
aports-ab7755fb37dbfa98511fedecada1a35cc78e9ab1.tar.xz
community/captagent: modernize
- Fix linting violations - move ./build.sh (basically autoreconf -fi) call to prepare() - explicitly pass 775 permissions to the service file - Add -openrc subpackage - Fix path to service file - Fix quoting and other minor issues in the service file
-rw-r--r--community/captagent/APKBUILD21
-rw-r--r--community/captagent/captagent.initd6
2 files changed, 13 insertions, 14 deletions
diff --git a/community/captagent/APKBUILD b/community/captagent/APKBUILD
index 82eb73f397..e2f23c4080 100644
--- a/community/captagent/APKBUILD
+++ b/community/captagent/APKBUILD
@@ -2,22 +2,24 @@
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=captagent
pkgver=6.3.1
-pkgrel=1
+pkgrel=2
pkgdesc="HEP Capture Agent for HOMER"
url="https://github.com/sipcapture/captagent"
arch="all"
license="GPL-3.0-or-later"
makedepends="autoconf automake bison expat-dev flex flex-dev json-c-dev
- libgcrypt-dev libpcap-dev libtool libuv-dev linux-headers openssl-dev"
+ libgcrypt-dev libpcap-dev libtool libuv-dev linux-headers openssl-dev"
+subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/captagent/archive/$pkgver.tar.gz
$pkgname.initd
"
-builddir="$srcdir/$pkgname-$pkgver"
-
-build() {
- cd "$builddir"
+prepare() {
+ default_prepare
./build.sh
+}
+
+build() {
CFLAGS="$CFLAGS -fcommon"
./configure \
--build=$CBUILD \
@@ -28,18 +30,15 @@ build() {
}
check() {
- cd "$builddir"
./src/captagent -v
}
package() {
- cd "$builddir"
-
make install DESTDIR="$pkgdir"
rm "$pkgdir"/usr/lib/$pkgname/modules/*.a
- install -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -Dm775 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}
sha512sums="e4043ddb92a1228fb9e4e220e503e3bd0bf9009c893e9c153fc90d15f91902ff7b86ca4b01bf2ef40056bc16647a3838fcfb88f76503f41f4bea88d054e4d7de captagent-6.3.1.tar.gz
-750326291fc65fa9a3568f6961f2d6b950baa715e75ad7fc8263956cc91c50445e2e041d8f73675a350ba0d55786908564b439396376d8105fb69332e8aefc27 captagent.initd"
+fdd3de15ffd46c5fe08e94533628809373f0afd64c249d308ff4cd649ffa249ff0412c83668f882db71a1bd23879e27528b6ee4a1abccf09b545b92aea4ab646 captagent.initd"
diff --git a/community/captagent/captagent.initd b/community/captagent/captagent.initd
index 4d5d8b9eb7..10f9777a4d 100644
--- a/community/captagent/captagent.initd
+++ b/community/captagent/captagent.initd
@@ -4,9 +4,9 @@
# Copyright (c) 2017 Kaarle Ritvanen
name=captagent
-command=/usr/bin/$name
-command_args=-d
-pidfile=/var/run/$name.pid
+command=/usr/sbin/captagent
+command_args="-d"
+pidfile=/var/run/$RC_SVCNAME.pid
depend() {
need net