aboutsummaryrefslogtreecommitdiffstats
path: root/community/mumudvb
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-10-14 06:34:32 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-10-14 06:34:36 +0000
commit48a358e409e0382ae2ce645f096468e8edcdab8a (patch)
tree7cb6ea83a5fff4814dbbbf7f77d3116ff25c7aa4 /community/mumudvb
parent2814025d57cdf8cbd676242f64190823174e13d1 (diff)
downloadaports-48a358e409e0382ae2ce645f096468e8edcdab8a.tar.bz2
aports-48a358e409e0382ae2ce645f096468e8edcdab8a.tar.xz
community/mumudvb: moved from testing
Diffstat (limited to 'community/mumudvb')
-rw-r--r--community/mumudvb/APKBUILD68
-rw-r--r--community/mumudvb/mumudvb.confd5
-rw-r--r--community/mumudvb/mumudvb.initd37
-rw-r--r--community/mumudvb/mumudvb.pre-install4
-rw-r--r--community/mumudvb/musl-error-h.patch12
5 files changed, 126 insertions, 0 deletions
diff --git a/community/mumudvb/APKBUILD b/community/mumudvb/APKBUILD
new file mode 100644
index 0000000000..6997197e1c
--- /dev/null
+++ b/community/mumudvb/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=mumudvb
+_pkgname=MuMuDVB
+pkgver=2.0.0
+pkgrel=0
+pkgdesc="A DVB IPTV streaming software"
+url="http://mumudvb.braice.net/"
+arch="all"
+license="GPL2"
+depends=""
+makedepends="automake autoconf libtool linux-headers m4 libdvbcsa-dev asciidoc"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+pkgusers="mumudvb"
+source="$pkgname-$pkgver.tar.gz::https://github.com/braice/MuMuDVB/archive/$pkgver.tar.gz
+musl-error-h.patch
+$pkgname.initd
+$pkgname.confd"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ libtoolize --force
+ aclocal && autoheader
+ automake --force-missing --add-missing
+ autoreconf -i -f
+ ./configure --prefix=/usr
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ mkdir -p "$pkgdir"/var/run/mumudvb
+ chown $pkgusers "$pkgdir"/var/run/mumudvb
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -m755 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+
+ mkdir -p "$pkgdir"/etc/$pkgname
+}
+
+doc() {
+ pkgdesc="$pkgname documentation"
+ arch="noarch"
+ _docdir="configuration_examples diagrams html transcode"
+ cd "$builddir"/doc
+ make doc || return 1
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
+ for doc in $_docdir; do
+ mv $doc "$subpkgdir"/usr/share/doc/$pkgname
+ done
+}
+
+md5sums="f19d397190cb097173897bb49469b1a6 mumudvb-2.0.0.tar.gz
+1b2a65e32a881a7968ab5c516727acdb musl-error-h.patch
+ca660ed1302768a3f5298a7d5c1f2c9b mumudvb.initd
+34de65f2a5b8d6bcc22761a75f87ea28 mumudvb.confd"
+sha256sums="6cac2618dcdc0eff8ef0cf6ac573cb0397e31e95666fb3a32378aa511eef27bd mumudvb-2.0.0.tar.gz
+1b2b7cc2c7fba0b3ca86eca0d7fd62229e754764ec2e2de67871eab37547d761 musl-error-h.patch
+dd8525e99669708d1257036749e3308c3b5b36fc7522af1699830f98c48f5e33 mumudvb.initd
+8bdb97f026750f4c9c599ec557d752a5ca40bd01eb154505e7fef198b5e0bf28 mumudvb.confd"
+sha512sums="5ba0f604145e9b8203a11a5d9d1859fc4a9628c50f98ac5345bad1d614ab43337198befea40cd54b186e15f582705280a2eb0897ba07ee7c55e28cd2e3589d88 mumudvb-2.0.0.tar.gz
+83228d1ea51b892779d284e443477332f92bc27d5806294774ff6eb93c5b4896dbd04367559a03268aa9994f8555c748e82075e4b86b01866a65662bf5c00824 musl-error-h.patch
+a59a282e04e72bb75e365f36dd4af7560826e8803f0ffa0244c59b2c88bf3e822d846358ababc74aa04de4758880a5bd53e02e3537b8ced0a23aea5360832709 mumudvb.initd
+777096785f71f22e9b1462d8bd9a0dba39bda63fa9493d8431140cc09addfac6ce9f962c60aa50b6f331d8ecbaef8e1340cf401aa3caeb743d3a396326f28efa mumudvb.confd"
diff --git a/community/mumudvb/mumudvb.confd b/community/mumudvb/mumudvb.confd
new file mode 100644
index 0000000000..b0699f825f
--- /dev/null
+++ b/community/mumudvb/mumudvb.confd
@@ -0,0 +1,5 @@
+# By default, it is /dev/dvb/adapter0/frontend0
+ADAPTER="0"
+COMMAND_ARGS=""
+# You can check config file examples in -doc package
+CONFIG_FILE="/etc/mumudvb/mumudbv_card${ADAPTER}.conf"
diff --git a/community/mumudvb/mumudvb.initd b/community/mumudvb/mumudvb.initd
new file mode 100644
index 0000000000..95f88a10dc
--- /dev/null
+++ b/community/mumudvb/mumudvb.initd
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+
+name="MuMuDVB"
+command="/usr/bin/mumudvb"
+command_background="true"
+pidfile="/var/run/mumudvb/mumudvb.pid"
+daemonuser="mumudvb"
+
+checkconfig() {
+ if [ ! -f "$CONFIG_FILE" ] ; then
+ eerror "You need to setup $CONFIG_FILE first. Install $pkgname-doc for examples"
+ return 1
+ fi
+}
+
+
+depend() {
+ need net
+ after firewall
+}
+
+start () {
+ checkconfig || return 1
+ ebegin "Starting $name"
+ start-stop-daemon --start --name mumudvb_$ADAPTER \
+ --make-pidfile --pidfile $pidfile \
+ --user $daemonuser --exec $command -- $COMMAND_ARGS --card $ADAPTER -c $CONFIG_FILE
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --pidfile $pidfile \
+ --exec $command
+ eend $?
+}
+
diff --git a/community/mumudvb/mumudvb.pre-install b/community/mumudvb/mumudvb.pre-install
new file mode 100644
index 0000000000..ec76e0a4c9
--- /dev/null
+++ b/community/mumudvb/mumudvb.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+adduser -S -H -h /var/run/mumudvb -s /sbin/nologin -g mumudvb mumudvb 2>/dev/null
+adduser mumudvb video
+exit 0
diff --git a/community/mumudvb/musl-error-h.patch b/community/mumudvb/musl-error-h.patch
new file mode 100644
index 0000000000..968afc0994
--- /dev/null
+++ b/community/mumudvb/musl-error-h.patch
@@ -0,0 +1,12 @@
+diff --git a/src/tune.c b/src/tune.c
+index c536811..52afd3d 100644
+--- a/src/tune.c
++++ b/src/tune.c
+@@ -41,7 +41,6 @@
+ #ifdef ANDROID
+ #include <err.h>
+ #else
+-#include <error.h>
+ #endif
+ #include <errno.h>
+ #include <string.h>