1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-11-25 01:52:18 -05:00

Add tvheadend-git

This commit is contained in:
Travis Burtrum 2017-01-10 01:03:23 -05:00
parent c652a2840e
commit d35fc35bd8
4 changed files with 143 additions and 0 deletions

View File

@ -0,0 +1,35 @@
# Generated by mksrcinfo v8
# Sat Apr 23 00:44:47 UTC 2016
pkgbase = tvheadend-git
pkgdesc = TV streaming server for Linux
pkgver = 4.1.r1931.gc3eefc6
pkgrel = 1
url = https://tvheadend.org/
install = tvheadend.install
arch = i686
arch = x86_64
arch = arm
arch = armv6h
arch = armv7h
license = GPL3
makedepends = git
makedepends = python
depends = avahi
depends = openssl
depends = uriparser
depends = ffmpeg
depends = linuxtv-dvb-apps
optdepends = xmltv: For an alternative source of programme listings
provides = tvheadend
conflicts = tvheadend
conflicts = hts-tvheadend
conflicts = hts-tvheadend-svn
conflicts = tvheadend-git
backup = etc/conf.d/tvheadend
source = tvheadend-git::git+https://github.com/tvheadend/tvheadend.git#branch=master
source = dvb-scan-tables::git+https://github.com/tvheadend/dtv-scan-tables.git#branch=tvheadend
md5sums = SKIP
md5sums = SKIP
pkgname = tvheadend-git

10
src/tvheadend-git/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
pkg
src
*.tar.xz
*.tar.gz
*.sig
*.log
tvheadend
tvheadend-git
dvb-scan-tables

View File

@ -0,0 +1,74 @@
# Maintainer: Dan Ziemba <zman0900@gmail.com>
# Contributor: Benjamin Hedrich <kiwisauce (a) pagenotfound (dot) de>
# To enable hdhomerun, add 'libhdhomerun' to depends and '--enable-hdhomerun_client' to
# the configure command in build().
pkgname=tvheadend-git
_gitname='tvheadend-git'
pkgver=4.1.r2413.g489ba9515
pkgrel=1
pkgdesc="TV streaming server for Linux"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
url="https://tvheadend.org/"
license=('GPL3')
depends=('avahi' 'openssl' 'uriparser' 'ffmpeg' 'linuxtv-dvb-apps')
makedepends=('git' 'python')
optdepends=('xmltv: For an alternative source of programme listings')
provides=('tvheadend')
conflicts=('tvheadend' 'hts-tvheadend' 'hts-tvheadend-svn' 'tvheadend-git')
install=tvheadend.install
backup=('etc/conf.d/tvheadend')
source=("${_gitname}::git+https://github.com/tvheadend/tvheadend.git#branch=master"
"dvb-scan-tables::git+https://github.com/tvheadend/dtv-scan-tables.git#branch=tvheadend")
md5sums=('SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/${_gitname}"
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}"
_dvbscan="${_gitname}/data/dvb-scan"
cp -a "dvb-scan-tables" "${_dvbscan}"
rm -rf "${_dvbscan}/.git"
touch "${_dvbscan}/.stamp"
}
build() {
cd "${srcdir}/${_gitname}"
./configure --prefix=/usr --mandir=/usr/share/man/man1 --release \
--python=python3 \
--disable-ffmpeg_static --enable-libav \
--disable-libx264_static --enable-libx264 \
--disable-libx265_static --enable-libx265 \
--disable-libvpx_static \
--disable-libtheora_static \
--disable-libvorbis_static \
--disable-libfdkaac_static \
--disable-libmfx_static --disable-qsv \
--disable-nvenc \
--disable-hdhomerun_static
make
}
package() {
cd "${srcdir}/${_gitname}"
make DESTDIR="$pkgdir/" install
install -D -m 644 "${srcdir}/${_gitname}/rpm/tvheadend.service" \
"$pkgdir/usr/lib/systemd/system/tvheadend.service"
sed -i 's|/etc/sysconfig|/etc/conf.d|g' "$pkgdir/usr/lib/systemd/system/tvheadend.service"
install -d "$pkgdir/etc/conf.d"
cat << EOF > "$pkgdir/etc/conf.d/tvheadend"
# Configuration file for the tvheadend service.
MALLOC_ARENA_MAX=4
OPTIONS="-u hts -g video -6 --http_port 9981 --htsp_port 9982"
EOF
}

View File

@ -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"
}