summaryrefslogtreecommitdiffstats
path: root/main/oscam/APKBUILD
blob: 82d3ca3e2282fc9c758d2fa22f9c11d34c50327d (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=oscam
pkgver=0_svn20131205
pkgrel=0
pkgdesc="An Open Source Conditional Access Module software"
url="http://www.streamboard.tv/oscam/"
arch="all"
license="GPL"
depends=""
depends_dev="openssl-dev libusbx-dev"
makedepends="$depends_dev bash"
install="$pkgname.pre-install"
pkgusers="$pkgname"
subpackages="$pkgname-doc $pkgname-list-smargo:list_smargo"
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
	$pkgname.conf"

_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"
	make allyesconfig
	./config.sh --disable IPV6SUPPORT
	make OSCAM_BIN=oscam \
		LIST_SMARGO_BIN=list_smargo \
		CONF_DIR=/etc/oscam \
		USE_LIBUSB=1 || return 1
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/var/log/$pkgname/cw \
		"$pkgdir"/usr/share/doc/oscam/example \
		"$pkgdir"/usr/share/doc/oscam/monitor \
		"$pkgdir"/usr/share/man/man1 \
		"$pkgdir"/usr/share/man/man5 || return 1
	install -m644 "$_builddir"/Distribution/doc/txt/* \
		"$pkgdir"/usr/share/doc/oscam/ || return 1
	install -m644 "$_builddir"/Distribution/doc/example/* \
		"$pkgdir"/usr/share/doc/oscam/example/ || return 1
	install -m644 "$_builddir"/Distribution/monitor/* \
		"$pkgdir"/usr/share/doc/oscam/monitor/ || return 1
	install -m644 "$_builddir"/Distribution/doc/man/*.1 \
		"$pkgdir"/usr/share/man/man1/ || return 1
	install -m644 "$_builddir"/Distribution/doc/man/*.5 \
		"$pkgdir"/usr/share/man/man5/ || return 1
	install -D -m755 "$_builddir/oscam" \
		"$pkgdir/usr/bin/oscam" || return 1
	install -D -m644 "$srcdir"/$pkgname.conf \
		"$pkgdir"/etc/$pkgname/$pkgname.conf || return 1
	chown -R $pkgname "$pkgdir"/var/log/$pkgname \
		"$pkgdir"/etc/$pkgname || return 1
	install -D -m755 "$srcdir"/$pkgname.initd \
                "$pkgdir"/etc/init.d/$pkgname || return 1
        install -D -m644 "$srcdir"/$pkgname.confd \
                "$pkgdir"/etc/conf.d/$pkgname || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

list_smargo() {
	pkgdesc="Tool to identify your smargo card reader"
	install -m755 -D "$_builddir"/list_smargo \
		"$subpkgdir"/usr/bin/list_smargo || return 1
}

md5sums="de1159b9f62a5833e09b004790755069  oscam-0_svn20131205.tar.gz
56f8a71e018973b6fb8f2efa2873b6cb  oscam.initd
209c3747e235def3ba374b4aab237a15  oscam.confd
90939047384482ba8d4428b127b53785  oscam.conf"
sha256sums="3a425524b1e08da720dc013f98ab2b7d7219425dc988dff62caa813356b0dd87  oscam-0_svn20131205.tar.gz
3b925940d39eff9dd98733b777214e4503cef7e845fb24ef29cdd2ecc2e6fbc7  oscam.initd
71464c3c2f8a25899fe064d9a99938ca7fc9871e1b99e15e9a6babcd266b68d9  oscam.confd
7a2e4cb5da504027b858086966eee57fcc1cc14115a7978997857e631e459b6e  oscam.conf"
sha512sums="5dfad8a54f9b617b417e752a43c09d50c80649300e2df077cc26029238b70cef1a6096f7357da79ae5db90d0c1e7dfde2c808f8d2d97c943403da5e7177dd61f  oscam-0_svn20131205.tar.gz
f33821de7441fb59a2339d0323b18199d326c7f47a139128f02bf0661bc43c36dfa9dc2a9d6b4d9415da576d829d50123173537037008be93adb4a0458e6613a  oscam.initd
c5567457763eb01f6287215f29547c867ae3f5b224691ff690616bb7598ea831299f73784064a571284b88d34c6504a2594b46e8275d5db2e1fb1394c11945eb  oscam.confd
0f3c4b9940bd27169dfe934599525558bc712d43f07959f19dce6ccfbf0e4d35d345272500fba2bff30e4ecf23f11f72b75321f8a45df908373620349d7f8808  oscam.conf"