aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2012-10-09 23:56:45 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2012-10-09 23:57:01 +0200
commit50560be6cb4aad941101e52fae4bbaf5b41759f6 (patch)
treee97cca8f305498856187daf790437a5a142304b7 /testing
parent9a7677f5617220a3227f7aa2585b91bdf14919c4 (diff)
downloadaports-50560be6cb4aad941101e52fae4bbaf5b41759f6.tar.bz2
aports-50560be6cb4aad941101e52fae4bbaf5b41759f6.tar.xz
testing/tvheadend: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/tvheadend/APKBUILD47
-rw-r--r--testing/tvheadend/tvheadend.confd2
-rw-r--r--testing/tvheadend/tvheadend.initd18
-rw-r--r--testing/tvheadend/tvheadend.post-deinstall4
-rw-r--r--testing/tvheadend/tvheadend.pre-install5
5 files changed, 76 insertions, 0 deletions
diff --git a/testing/tvheadend/APKBUILD b/testing/tvheadend/APKBUILD
new file mode 100644
index 0000000000..d1b965edb8
--- /dev/null
+++ b/testing/tvheadend/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=tvheadend
+pkgver=3.00
+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 wget bash findutils"
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages=""
+source="saveas-https://github.com/tvheadend/tvheadend/tarball/3.0/$pkgname-$pkgver.tar.gz
+tvheadend.initd
+tvheadend.confd
+"
+_builddir="$srcdir/tvheadend-tvheadend-1175cea"
+
+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 \
+ --release \
+ --disable-avahi
+ make || return 1
+}
+package() {
+ cd "$_builddir"
+ #sed -i 's/\-T//g' support/posix.mk
+ 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
+}
+
+md5sums="48201e389057704c7af3d5191c4d71ba tvheadend-3.00.tar.gz
+4d6324b1b87890faf846ad95c2f3483c tvheadend.initd
+74749f3527418ddfd5671d5d5ad4dca4 tvheadend.confd"
diff --git a/testing/tvheadend/tvheadend.confd b/testing/tvheadend/tvheadend.confd
new file mode 100644
index 0000000000..a912932aea
--- /dev/null
+++ b/testing/tvheadend/tvheadend.confd
@@ -0,0 +1,2 @@
+TVHBIN="/usr/bin/tvheadend"
+TVHUSER="tvheadend"
diff --git a/testing/tvheadend/tvheadend.initd b/testing/tvheadend/tvheadend.initd
new file mode 100644
index 0000000000..6a50b9f3f2
--- /dev/null
+++ b/testing/tvheadend/tvheadend.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tvheadend"
+ start-stop-daemon --start \
+ --user ${TVHUSER} \
+ --exec ${TVHBIN} -- -C -f
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tvheadend"
+ start-stop-daemon --stop --quiet --name tvheadend --signal 2
+ eend $?
+}
diff --git a/testing/tvheadend/tvheadend.post-deinstall b/testing/tvheadend/tvheadend.post-deinstall
new file mode 100644
index 0000000000..b80984d6f0
--- /dev/null
+++ b/testing/tvheadend/tvheadend.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+deluser hts 2>/dev/null
+exit 0
diff --git a/testing/tvheadend/tvheadend.pre-install b/testing/tvheadend/tvheadend.pre-install
new file mode 100644
index 0000000000..73f865ca47
--- /dev/null
+++ b/testing/tvheadend/tvheadend.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+groupadd tvheadend 2>/dev/null
+adduser -H -h /home/tvheadend -g tvheadend -D -s /bin/false tvheadend 2>/dev/null
+gpasswd -a tvheadend video 2>/dev/null
+exit 0