aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tvheadend-git/APKBUILD
blob: 3f288ad049e53df5f32abb837e582894e9ed2406 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=tvheadend-git
verbase=4.1
# stable versions have an even minor version number
pkgver=4.1_git20160725
pkgrel=1
pkgdesc="TV Streaming server for linux"
url="http://tvheadend.org/"
arch="all"
license="GPL3"
depends=""
depends_dev=""
makedepends="$depends_dev findutils bash git python 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 $pkgname-satellites-xml:satellites_xml"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	satellites.xml"

giturl="https://github.com/tvheadend/tvheadend.git"
disturl="dev.alpinelinux.org:/archive/$pkgname"

builddir="$srcdir/$pkgname-$pkgver"

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="c1b5f17e38cd91977ef05cfd315c3d11  tvheadend-git-4.1_git20160725.tar.gz
b2f3e611fb9c6c7013cc6e808dcb155c  tvheadend-git.initd
a29e609cc5f02c34812df253aa7bf623  tvheadend-git.confd
2108e3a42dd531ef7a8b17c4d988db09  satellites.xml"
sha256sums="3bcab2f915e9e4bd6199b2535e56a71d786df9996109796ccece863a49a8fb48  tvheadend-git-4.1_git20160725.tar.gz
ca245780931d2507f40b8ed13a9fad44550243dda1ade863ac0fd5316716a992  tvheadend-git.initd
1fd4b100142ba9d7aa9b73d3168b3c015abd786894c6a284e9ecabae421d2cb9  tvheadend-git.confd
c6eba494c7b007099d6954388090f8468f931597bb5472bdc7bbcdec2202316c  satellites.xml"
sha512sums="2feaa5f7b3d2c219b725b93b986feaff1f9b0381a5e6a324534ef79d1b179cc16b2f5c41a0818b044943867fa6c80e33f14aec45790457f0812681d2e99494c3  tvheadend-git-4.1_git20160725.tar.gz
db275e263d52d0515544cc52836d99d1cf43b7c17a8037f897d5788e770b69be85cb709f71e7fae4d66c4a2cef8c4f9533fc2ab41490776ee437e4db4d27fa31  tvheadend-git.initd
dd55c56ffb0b090fc03537556340ac0dd17741d2ce9eeabb388af43b566e2764385affc2e4457fa7a6d94e44c491d7cf43c6b6d89dc1ba60dd9724cc488c0ef1  tvheadend-git.confd
c5de1572cd18d943558aa5dbc2179895506b64054006961e7b6c22a6cb262d2e931192a8e308b808a59f7d8bd325b1990ca33b6c5a01a92632d866dd4ec01830  satellites.xml"