aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tvheadend-git/APKBUILD
blob: 56d3fb0840312e2ad2ba53505e3c4e27b88e5331 (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
98
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=tvheadend-git
verbase=4.1
# stable versions have an even minor version number
pkgver=4.1_git20160308
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 python linux-headers wget
	bsd-compat-headers coreutils openssl-dev ffmpeg-dev gettext-dev
	libhdhomerun-dev"
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"

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 \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-libav \
		--enable-hdhomerun_client \
		--disable-libffmpeg_static \
		--disable-hdhomerun_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
	install -d -o tvheadend -g tvheadend \
		"$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="603b5ece17ff05eca8c105b6c91fae69  tvheadend-git-4.1_git20160308.tar.gz
05acf6ae628ee728df67ffe7fe381ac5  tvheadend-git.initd
a29e609cc5f02c34812df253aa7bf623  tvheadend-git.confd
84e9f5d3446be49624303cbef43a2523  satellites.xml"
sha256sums="8a9bf91cce7f95ef926cea7321dba5bb9184b50736b0391df5736fcfd1685f27  tvheadend-git-4.1_git20160308.tar.gz
0a9f1681c5af4be13bdd5d11971ae79c2c52147b1e3719122c9976de0ea1cb97  tvheadend-git.initd
1fd4b100142ba9d7aa9b73d3168b3c015abd786894c6a284e9ecabae421d2cb9  tvheadend-git.confd
63e8a27474d88b821c5768b59043620ff92e0a4d2d8a87290d1a2ef2e3f8c39b  satellites.xml"
sha512sums="e304de9b05e343fab180294222fc0ee2aac544ba6a77f9ae6a1abf884ea9b3a1d9d675928f17dd23b5d55d140de1cf1f4e9cd9633777d936f938858533b37a9f  tvheadend-git-4.1_git20160308.tar.gz
83c462890ef24d5fde572eeac87da7aad78f1f6b1a8c18d190b895a1538a8c5fd53f3be90645b95e1dc50a1b6c53a1adadf09aedba112f67e63099ff9470cd65  tvheadend-git.initd
dd55c56ffb0b090fc03537556340ac0dd17741d2ce9eeabb388af43b566e2764385affc2e4457fa7a6d94e44c491d7cf43c6b6d89dc1ba60dd9724cc488c0ef1  tvheadend-git.confd
38eb39ecdc0a165b18bab5dcd236a89f44b1e7c77e224612e45a50b3b8b2a6b20e72cdf3fe2ef75278b4c515906b75f547c8e1e7c86fef1712437bbbb7a0caeb  satellites.xml"