summaryrefslogtreecommitdiffstats
path: root/main/oscam/APKBUILD
blob: 72ef0612cb626c9a248ba46ed4f4015975923463 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=oscam
pkgver=0_svn20130112
pkgrel=1
pkgdesc="An Open Source Conditional Access Module software"
url="http://www.streamboard.tv/oscam/"
arch="all"
license="GPL"
depends=""
depends_dev="openssl-dev libusb-dev"
makedepends="$depends_dev bash cmake"
install="$pkgname.pre-install"
pkgusers="$pkgname"
subpackages="$pkgname-doc"
svnurl="http://www.streamboard.tv/svn/oscam/trunk"
disturl="dev.alpinelinux.org:/archive/$pkgname/"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd"

_builddir="$srcdir"/oscam-$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"
	cmake -DCMAKE_INSTALL_PREFIX=/usr \
		-DHAVE_DVBAPI=1 \
		-DWEBIF=1 \
		-WITH_SSL=1 \
		"$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -d "$pkgdir"/var/log/$pkgname/cw || return 1
	install -d "$pkgdir"/etc/$pkgname || return 1
	chown -R oscam "$pkgdir"/var/log/$pkgname || 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
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="65568897527ded7f73577c4d692a3fd2  oscam-0_svn20130112.tar.gz
56f8a71e018973b6fb8f2efa2873b6cb  oscam.initd
185840b037fc59248f8ea2f84c2b67ed  oscam.confd"