aboutsummaryrefslogtreecommitdiffstats
path: root/main/oscam
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-01-12 18:48:45 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2013-01-12 18:48:45 +0000
commitaa708cc985574d968fb5e9ffc7238868f80b8056 (patch)
treef031555f57bc04561349dd9b480c7fb8be0017f3 /main/oscam
parentc438b8a15edf54dacd2646d05af852b312c8c834 (diff)
downloadaports-aa708cc985574d968fb5e9ffc7238868f80b8056.tar.bz2
aports-aa708cc985574d968fb5e9ffc7238868f80b8056.tar.xz
main/oscam: new snapshot and moved to main
Diffstat (limited to 'main/oscam')
-rw-r--r--main/oscam/APKBUILD59
-rw-r--r--main/oscam/oscam.confd5
-rw-r--r--main/oscam/oscam.initd30
-rw-r--r--main/oscam/oscam.pre-install3
4 files changed, 97 insertions, 0 deletions
diff --git a/main/oscam/APKBUILD b/main/oscam/APKBUILD
new file mode 100644
index 0000000000..6efded7c54
--- /dev/null
+++ b/main/oscam/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=oscam
+pkgver=0_svn20130112
+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 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
+8aa89df1cb43726dc05f6df64c55781a oscam.confd"
diff --git a/main/oscam/oscam.confd b/main/oscam/oscam.confd
new file mode 100644
index 0000000000..154d08d4b7
--- /dev/null
+++ b/main/oscam/oscam.confd
@@ -0,0 +1,5 @@
+# oscam confd file
+
+user="oscam"
+group="video"
+args="-b -c /etc/oscam-svn"
diff --git a/main/oscam/oscam.initd b/main/oscam/oscam.initd
new file mode 100644
index 0000000000..ed9918fd27
--- /dev/null
+++ b/main/oscam/oscam.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+
+# oscam init.d
+
+name="oscam"
+daemon="/usr/bin/$name"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting oscam"
+ start-stop-daemon --start \
+ --quiet \
+ --user $user \
+ --group $group \
+ --name $name \
+ --exec $daemon \
+ -- $args
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping oscam"
+ start-stop-daemon --stop \
+ --signal 2 \
+ --name $name
+ eend $?
+}
diff --git a/main/oscam/oscam.pre-install b/main/oscam/oscam.pre-install
new file mode 100644
index 0000000000..c78cb9a78e
--- /dev/null
+++ b/main/oscam/oscam.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+adduser -H -G video -D -s /bin/false oscam 2>/dev/null
+exit 0