# Maintainer: Carlo Landmeter pkgname=tvheadend-git _sha=b93b557359da95c773e3df1675197f34334a186e pkgver=20161130 pkgrel=0 pkgdesc="TV Streaming server for linux" url="http://tvheadend.org/" arch="all" license="GPL3" depends="" depends_dev="" makedepends="$depends_dev findutils bash git python2 linux-headers wget bsd-compat-headers coreutils libressl-dev ffmpeg-dev gettext-dev libhdhomerun-dev cmake" pkgusers="tvheadend" pkggroups="tvheadend" install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-dvb-scan:dvb_scan:noarch $pkgname-satellites-xml:satellites_xml:noarch " source="$pkgname-$pkgver.tar.gz::https://github.com/tvheadend/tvheadend/archive/${_sha}.tar.gz $pkgname.initd $pkgname.confd satellites.xml " builddir="$srcdir/tvheadend-$_sha" build() { cd "$builddir" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --enable-libav \ --enable-hdhomerun_client \ --disable-hdhomerun_static \ --disable-ffmpeg_static \ --disable-libx264_static \ --disable-libx265_static \ --disable-libvpx_static \ --disable-libtheora_static \ --disable-libvorbis_static \ --disable-libfdkaac_static \ --disable-libmfx_static \ || return 1 make || return 1 } package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" install || return 1 install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 # /usr/bin/install seems to fail to apply ownership # when running from abuild on aarch64 mkdir -p "$pkgdir"/etc/"$pkgname" || return 1 chown "$pkgusers:$pkggroups" "$pkgdir/etc/$pkgname" || return 1 } dvb_scan() { pkgdesc="$pkgname dvb scan files" depends="$pkgname !$pkgname-satellites_xml" arch="noarch" cd "$builddir" mkdir -p "$subpkgdir"/usr/share/tvheadend/data mv "$pkgdir"/usr/share/tvheadend/data/dvb-scan \ "$subpkgdir"/usr/share/tvheadend/data || return 1 } satellites_xml() { pkgdesc="$pkgname sattelites from http://satellites-xml.eu" depends="$pkgname !$pkgname-dvb_scan" arch="noarch" cd "$builddir" mkdir -p "$subpkgdir"/usr/share/tvheadend/data/dvb-scan/dvb-s msg "Generating sattelites from satellites.xml" support/sat_xml_scan.py "$srcdir"/satellites.xml \ "$subpkgdir"/usr/share/tvheadend/data/dvb-scan/dvb-s || return 1 } md5sums="020a64bc33e9622835c4e0d07c19d756 tvheadend-git-20161130.tar.gz b2f3e611fb9c6c7013cc6e808dcb155c tvheadend-git.initd a29e609cc5f02c34812df253aa7bf623 tvheadend-git.confd 2108e3a42dd531ef7a8b17c4d988db09 satellites.xml" sha256sums="16ea4d575d2dd2880d217772fd17e8057ec0de488992b7f7d45b82764f5d76a2 tvheadend-git-20161130.tar.gz ca245780931d2507f40b8ed13a9fad44550243dda1ade863ac0fd5316716a992 tvheadend-git.initd 1fd4b100142ba9d7aa9b73d3168b3c015abd786894c6a284e9ecabae421d2cb9 tvheadend-git.confd c6eba494c7b007099d6954388090f8468f931597bb5472bdc7bbcdec2202316c satellites.xml" sha512sums="f2c1eb76148b77b6667d428b15762e07f35688bf56c67270fc48448cfc981d55664f4faba834a4036d05182c4020ad22656f92d4afc14920efd4c035e5f01bf4 tvheadend-git-20161130.tar.gz db275e263d52d0515544cc52836d99d1cf43b7c17a8037f897d5788e770b69be85cb709f71e7fae4d66c4a2cef8c4f9533fc2ab41490776ee437e4db4d27fa31 tvheadend-git.initd dd55c56ffb0b090fc03537556340ac0dd17741d2ce9eeabb388af43b566e2764385affc2e4457fa7a6d94e44c491d7cf43c6b6d89dc1ba60dd9724cc488c0ef1 tvheadend-git.confd c5de1572cd18d943558aa5dbc2179895506b64054006961e7b6c22a6cb262d2e931192a8e308b808a59f7d8bd325b1990ca33b6c5a01a92632d866dd4ec01830 satellites.xml"