aboutsummaryrefslogtreecommitdiffstats
path: root/main/tvheadend/APKBUILD
blob: ad43eaf5994ddfd8c12e8f4d047f5995597bb291 (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tvheadend
# stable versions have an even minor version number
pkgver=4.0.4
pkgrel=0
pkgdesc="TV Streaming server for linux"
url="http://www.lonelycoder.com/hts/tvheadend_overview.html"
arch="all"
license="GPL3"
depends=""
depends_dev="openssl-dev"
makedepends="$depends_dev findutils bash git python linux-headers
	bsd-compat-headers coreutils"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dvb-scan:dvb_scan $pkgname-satellites-xml:satellites_xml"
source="$pkgname-$pkgver.tar.gz::https://github.com/tvheadend/tvheadend/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	satellites.xml"

_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 \
		--disable-libav \
                || return 1
	make || return 1
}

package() {
        cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	install -m755 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1
	install -d -o $pkgname -g $pkgname \
		"$pkgdir/etc/$pkgname" || return 1
}

dvb_scan() {
	pkgdesc="$pkgname dvb scan files"
	depends="$pkgname"
	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"
	arch="noarch"
	cd "$_builddir"
	mkdir -p "$subpkgdir"/usr/share/tvheadend/data/satellites-xml/dvb-s
        msg "Generating sattelites from satellites.xml"
	support/sat_xml_scan.py "$srcdir"/satellites.xml \
		"$subpkgdir"/usr/share/tvheadend/data/satellites-xml/dvb-s || return 1
}

md5sums="5dbbcb1dd30f89ede8f1f08e5d28904a  tvheadend-4.0.4.tar.gz
67d1cfcaf2dc211d702abe67285f9333  tvheadend.initd
a409c44aecd93626a1a3a39306993c5d  tvheadend.confd
e301c0ed96e4e013f6bd6d6bfb8767c9  satellites.xml"
sha256sums="acc5c852bccb32d6a281f523e78a1cceb4d41987fe015aba3f66e1898b02c168  tvheadend-4.0.4.tar.gz
cd0db26b3da95df7cd100e5e30b47cd884fa4a7d2cd27f1bee2f6bec0d6ad211  tvheadend.initd
671f7d410e51aaed4c93f284c180f646680f6b195b5bef47b3ae1fb99ed76dce  tvheadend.confd
2eafbf20c68cc6418a721beeef67bd0f335b1eeee4aac908fef15019933d6dc8  satellites.xml"
sha512sums="2ef90f7a183905df40f6cd6852d26cce79ec420fa7eca299730f6f923e007e5930c5dada4c61a0a06dc1a71d8b7cb4a3d8a30b608f89ede1a1d378a2ec6ee83e  tvheadend-4.0.4.tar.gz
41143b33e18000aad99d7b17433ac7935fa40a6980c4bf0733e5cc16e2948d18810ce198ca435791c93992ba1e39dc6d55ca6af33c49087557310fd31ad22447  tvheadend.initd
f81ace2fd2a86c561f70dca6c89a6217e632db01d5f5d1c6ccfd951c4a798a131767140c176a0a764fe3842363958b31fb2a707a871836795688136bc458f7d5  tvheadend.confd
5749da610570f5c5df04f63069d9a460304a19f03a998a571b8361fe752bbdfb59f92f4f3353dd5a059d1c9dd2bb182b7b0074376f01b4c3638d338082bfb936  satellites.xml"