aboutsummaryrefslogtreecommitdiffstats
path: root/main/tvheadend
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2012-10-31 17:06:00 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2012-10-31 17:06:20 +0100
commit94c89210906a941924a7caa6702231e5c69fdbca (patch)
tree2955908394308f64675334a15d1e3365bcaf3baf /main/tvheadend
parenta269bf373eda86efdfc05ed54cc26215eec14330 (diff)
downloadaports-94c89210906a941924a7caa6702231e5c69fdbca.tar.bz2
aports-94c89210906a941924a7caa6702231e5c69fdbca.tar.xz
testing/tvheadend: move to main
Diffstat (limited to 'main/tvheadend')
-rw-r--r--main/tvheadend/APKBUILD59
-rw-r--r--main/tvheadend/tvheadend.confd3
-rw-r--r--main/tvheadend/tvheadend.initd19
-rw-r--r--main/tvheadend/tvheadend.pre-install4
4 files changed, 85 insertions, 0 deletions
diff --git a/main/tvheadend/APKBUILD b/main/tvheadend/APKBUILD
new file mode 100644
index 0000000000..1d05dff582
--- /dev/null
+++ b/main/tvheadend/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=tvheadend
+pkgver=3.2
+pkgrel=0
+pkgdesc="TV Streaming server for linux"
+url="http://www.lonelycoder.com/hts/tvheadend_overview.html"
+arch="all"
+license="GPL3"
+depends=""
+depends_dev="openssl-dev bash findutils"
+makedepends="$depends_dev"
+pkgusers="$pkgname"
+pkggroups="$pkgname"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="https://github.com/downloads/tvheadend/tvheadend/tvheadend-$pkgver.tar.gz
+ tvheadend.initd
+ tvheadend.confd
+"
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --release \
+ --disable-avahi \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ 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
+ install -d -o $pkgname -g $pkgname \
+ "$pkgdir/etc/$pkgname" || return 1
+}
+
+md5sums="4f7faa75c4ea24942c5a12a77ebdcdf0 tvheadend-3.2.tar.gz
+5df86b0859fc457c634a41a6ced3f118 tvheadend.initd
+17cf7dfaf27706409a004c246c1a2c3c tvheadend.confd"
diff --git a/main/tvheadend/tvheadend.confd b/main/tvheadend/tvheadend.confd
new file mode 100644
index 0000000000..32dfe2526c
--- /dev/null
+++ b/main/tvheadend/tvheadend.confd
@@ -0,0 +1,3 @@
+TVHBIN="/usr/bin/tvheadend"
+TVHUSER="tvheadend"
+TVHCONF="/etc/tvheadend"
diff --git a/main/tvheadend/tvheadend.initd b/main/tvheadend/tvheadend.initd
new file mode 100644
index 0000000000..c244dd63ff
--- /dev/null
+++ b/main/tvheadend/tvheadend.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tvheadend"
+ start-stop-daemon --start \
+ --user ${TVHUSER} \
+ --exec ${TVHBIN} -- -C -f -c \
+ ${TVHCONF}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tvheadend"
+ start-stop-daemon --stop --quiet --name tvheadend --signal 2
+ eend $?
+}
diff --git a/main/tvheadend/tvheadend.pre-install b/main/tvheadend/tvheadend.pre-install
new file mode 100644
index 0000000000..c91e1eda93
--- /dev/null
+++ b/main/tvheadend/tvheadend.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+adduser -H -h /usr/share/tvheadend -g tvheadend -D -s /bin/false tvheadend 2>/dev/null
+addgroup tvheadend video 2>/dev/null
+exit 0