diff options
author | Dan Ziemba | 2015-08-10 17:08:32 -0400 |
---|---|---|
committer | Dan Ziemba | 2015-08-10 17:08:32 -0400 |
commit | 2d4cd50751b8afd828e05eff783aa382de4f543f (patch) | |
tree | a15120954ecc588621a0e0757d5602719f230284 | |
download | aur-2d4cd50751b8afd828e05eff783aa382de4f543f.tar.gz |
Copied over from aur3 with some updates
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | tvheadend.install | 24 | ||||
-rw-r--r-- | tvheadend.service | 14 |
5 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5e881c83ba2d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = tvheadend-git + pkgdesc = TV streaming server for Linux + pkgver = 4.1.r390.g198a892 + pkgrel = 1 + url = https://tvheadend.org/ + install = tvheadend.install + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = git + depends = avahi + depends = openssl + depends = python2 + depends = uriparser + depends = ffmpeg + optdepends = xmltv: For an alternative source of programme listings + provides = tvheadend + conflicts = tvheadend + conflicts = hts-tvheadend + conflicts = hts-tvheadend-svn + conflicts = tvheadend-git + source = tvheadend::git+https://github.com/tvheadend/tvheadend.git#branch=master + source = tvheadend.service + md5sums = SKIP + md5sums = b546f4486f0d28bea13ad1fb676acb27 + +pkgname = tvheadend-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..32c388787d3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +pkg +src +*.tar.xz +*.tar.gz +*.sig +*.log +tvheadend + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5a8c1ad86c3f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Dan Ziemba <zman0900@gmail.com> +# Contributor: Benjamin Hedrich <kiwisauce (a) pagenotfound (dot) de> + +pkgname=tvheadend-git +_gitname='tvheadend' +pkgver=4.1.r390.g198a892 +pkgrel=1 +pkgdesc="TV streaming server for Linux" +arch=('i686' 'x86_64') +url="https://tvheadend.org/" +license=('GPL3') +depends=('avahi' 'openssl' 'python2' 'uriparser' 'ffmpeg') +makedepends=('git') +optdepends=('xmltv: For an alternative source of programme listings') +provides=('tvheadend') +conflicts=('tvheadend' 'hts-tvheadend' 'hts-tvheadend-svn' 'tvheadend-git') +install=tvheadend.install + +source=("${_gitname}::git+https://github.com/tvheadend/tvheadend.git#branch=master" + 'tvheadend.service') + +md5sums=('SKIP' + 'b546f4486f0d28bea13ad1fb676acb27') + +pkgver() { + cd "${srcdir}/${_gitname}" + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "${srcdir}/${_gitname}" + ./configure --prefix=/usr --mandir=/usr/share/man/man1 --python=python2 --release + make +} + +package() { + cd "${srcdir}/${_gitname}" + make DESTDIR="$pkgdir/" install + install -D -m 644 "$srcdir/tvheadend.service" "$pkgdir/usr/lib/systemd/system/tvheadend.service" +} + diff --git a/tvheadend.install b/tvheadend.install new file mode 100644 index 000000000000..f2446007e519 --- /dev/null +++ b/tvheadend.install @@ -0,0 +1,24 @@ +HTS_USER=hts +HTS_UID=1337 +HTS_GROUP=video + +post_install() { + if ! getent passwd $HTS_USER &> /dev/null; then + useradd -u $HTS_UID -g $HTS_GROUP -m -s /bin/false $HTS_USER &> /dev/null + passwd -l $HTS_USER &> /dev/null + echo " ==> User '$HTS_USER' created" + fi + +cat << 'EOM' + ==> All configuration is maintained through the web interface: + ==> + ==> http://localhost:9981/ + ==> + ==> Default login without username/password. +EOM +} + +post_remove() { + userdel $HTS_USER &> /dev/null + echo " ==> User '$HTS_USER' removed" +} diff --git a/tvheadend.service b/tvheadend.service new file mode 100644 index 000000000000..5754f27d20a0 --- /dev/null +++ b/tvheadend.service @@ -0,0 +1,14 @@ +[Unit] +Description=tvheadend +After=tmp.mount network.target + +[Service] +Type=forking +PIDFile=/run/tvheadend.pid +ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u hts -g video +ExecStop=/usr/bin/rm /run/tvheadend.pid +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target |