[PATCH] testing/minisatip: new aport
Export this patch
https://github.com/catalinii/minisatip
minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
---
testing/minisatip/APKBUILD | 53 +++++++++++++++++++++++++
testing/minisatip/minisatip.confd | 2 +
testing/minisatip/minisatip.initd | 17 ++++++++
testing/minisatip/minisatip.pre-install | 7 ++++
4 files changed, 79 insertions(+)
create mode 100644 testing/minisatip/APKBUILD
create mode 100644 testing/minisatip/minisatip.confd
create mode 100644 testing/minisatip/minisatip.initd
create mode 100644 testing/minisatip/minisatip.pre-install
diff --git a/testing/minisatip/APKBUILD b/testing/minisatip/APKBUILD
new file mode 100644
index 00000000000..f3d1c870e4a
--- /dev/null
+++ b/testing/minisatip/APKBUILD
@@ -0,0 +1,53 @@
+# Maintainer: lgehr <lgehr@mailbox.org>
+pkgname=minisatip
+pkgver=1.2.65
+pkgrel=0
+pkgdesc="minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards"
+url="https://minisatip.org"
+arch="all"
+license="GPL-2.0-or-later" #Not sure, stated on openwrt.org
+makedepends="linux-headers openssl-dev libdvbcsa-dev"
+install="$pkgname.pre-install"
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/catalinii/minisatip/archive/refs/tags/v$pkgver.tar.gz
+ minisatip.initd
+ minisatip.confd
+ "
+
+build() {
+ export CFLAGS="$CFLAGS -DNO_BACKTRACE" #execinfo.h is not supported by musl
+ #libasan does not work on musl see issue #10304
+ sed -i 's; -fsanitize=address;;g' src/Makefile.in tests/Makefile.in
+ sed -i 's; -fsanitize=leak;;g' src/Makefile.in tests/Makefile.in
+ sed -i 's; -fsanitize=null;;g' src/Makefile.in tests/Makefile.in
+ sed -i 's;opts.document_root = "html";opts.document_root = "/usr/share/minisatip/html";g' src/minisatip.c #overwrite default html location
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ make -j1 test #parallel execution fails with "text file busy"
+}
+
+package() {
+ install -Dm755 minisatip "$pkgdir"/usr/bin/minisatip
+ mkdir -p $pkgdir/usr/share/minisatip/html
+ cp -r html $pkgdir/usr/share/minisatip
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="
+9300485220dfc952e62fafbffd5e3d392619124f60bb7ac145dc41d3304532218f21d8bcd157ce6fd5f740ba86f3b85fbcbdd0fa10c1b5605ff2be44c4cdb9b7 minisatip-1.2.65.tar.gz
+a4ef738a5f8dfdcbede4aceb9b0f2b956394ea43bc0afc288440dfe5b75b66b8f03bdc3821e3b2780b2ff3b7d1de04f69d28b878b22b3261020e13a30b2d6121 minisatip.initd
+b29b2d4140b2c66431fdf876c0f15f98794be185c786cce7c5c202484e8c73c8b17aa564c37bdca22157fa97ac5598a8c16b58699559b1bd39e4a5c18835bccd minisatip.confd
+"
diff --git a/testing/minisatip/minisatip.confd b/testing/minisatip/minisatip.confd
new file mode 100644
index 00000000000..558669db98f
--- /dev/null
+++ b/testing/minisatip/minisatip.confd
@@ -0,0 +1,2 @@
+supervisor=supervise-daemon
+extra_opts="--syslog"
diff --git a/testing/minisatip/minisatip.initd b/testing/minisatip/minisatip.initd
new file mode 100644
index 00000000000..1ad40572550
--- /dev/null
+++ b/testing/minisatip/minisatip.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+name=minisatip
+command="/usr/bin/$name"
+command_args="-f ${extra_opts}"
+command_background="yes"
+
+capabilities="^cap_net_bind_service"
+
+start_stop_daemon_args="--user minisatip:minisatip"
+pidfile="/run/$name.pid"
+
+depend() {
+ need net
+ use logger dns
+ after firewall
+}
diff --git a/testing/minisatip/minisatip.pre-install b/testing/minisatip/minisatip.pre-install
new file mode 100644
index 00000000000..8e64a72b60f
--- /dev/null
+++ b/testing/minisatip/minisatip.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+addgroup -S minisatip 2>/dev/null
+adduser -S -D -H -s /sbin/nologin -G minisatip -g minisatip minisatip 2>/dev/null
+adduser minisatip video
+
+exit 0
--
2.39.1