summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuka Karinja2017-04-02 09:40:58 +0200
committerLuka Karinja2017-04-02 09:40:58 +0200
commitbcf62307e0509faeb9ece14abbac6b5835c5a6aa (patch)
treeede202eebed19059a71f075535d81608b3ec2a1e
downloadaur-bcf62307e0509faeb9ece14abbac6b5835c5a6aa.tar.gz
oscam emu: 739, oscam-git: 11380
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD65
-rw-r--r--oscam.install31
-rw-r--r--oscam.service12
-rw-r--r--oscam.sysuser3
5 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..300b6fd798f9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = oscam-emu
+ pkgdesc = OSCam-emu is an Oscam addon module to include emulator support and other functionality
+ pkgver = 739-11380
+ pkgrel = 1
+ url = https://github.com/oscam-emu/oscam-emu
+ install = oscam.install
+ arch = x86_64
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ license = GPL3
+ makedepends = git
+ makedepends = pcsclite
+ depends = libusb
+ depends = openssl
+ optdepends = pcsclite: for use with PC/SC readers
+ optdepends = ccid: PC/SC reader generic driver
+ source = git+https://github.com/oscam-emu/oscam-emu
+ source = oscam.service
+ source = oscam.sysuser
+ md5sums = SKIP
+ md5sums = 596b902e3f4a66d39e7f993437feec74
+ md5sums = be0d9d7a5fdd8cf4918c4ea91cebd989
+
+pkgname = oscam-emu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5a2187092ad9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+# This PKGBUILD comes from the VDR4Arch project [https://github.com/vdr4arch]
+# OSCam-emu is an Oscam addon module to include emulator support and other functionality
+# The goal of this AUR Package is to be as much close as possible to the latest oscam-emu git commit
+
+# Author: Christopher Reimer <mail+vdr4arch[at]c-reimer[dot]de>
+# Maintainer: Luka Karinja <luka.karinja@gmail.com>
+pkgname=oscam-emu
+pkgver=739-11380
+pkgrel=1
+dir=OSCam-with-emu-branch
+pkgdesc="Open Source Conditional Access Module software"
+url="http://www.streamboard.tv/oscam"
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
+license=('GPL3')
+depends=('libusb' 'openssl')
+makedepends=('git' 'pcsclite')
+conflicts=('oscam-git' 'oscam-svn')
+optdepends=('pcsclite: for use with PC/SC readers'
+ 'ccid: PC/SC reader generic driver')
+install='oscam.install'
+source=("git+git://github.com/joeusercz/OSCam-with-emu-branch.git#branch=oscam-emu-merged"
+ 'oscam.service'
+ 'oscam.sysuser')
+md5sums=('SKIP'
+ '596b902e3f4a66d39e7f993437feec74'
+ 'be0d9d7a5fdd8cf4918c4ea91cebd989')
+
+#pkgver() {
+# cd "$srcdir/$dir"
+# git log -1 | grep git-svn-id | cut -d'@' -f2 | cut -d' ' -f1
+#}
+
+build() {
+ cd "$srcdir/$dir"
+
+ ./config.sh --restore --enable WITH_SSL IPV6SUPPORT CARDREADER_STAPI5
+
+ make CONF_DIR=/var/lib/oscam \
+ USE_SSL=1 \
+ USE_LIBUSB=1 \
+ USE_PCSC=1 \
+ OSCAM_BIN=oscam \
+ LIST_SMARGO_BIN=list_smargo \
+ SVN_REV=$pkgver
+}
+
+package() {
+ cd "$srcdir/$dir"
+
+ #Install binaries
+ install -Dm755 oscam "$pkgdir/usr/bin/oscam"
+ install -Dm755 list_smargo "$pkgdir/usr/bin/list_smargo"
+
+ #Install man-pages
+ mkdir -p $pkgdir/usr/share/man/man1/
+ mkdir -p $pkgdir/usr/share/man/man5/
+ install -Dm644 Distribution/doc/man/*.1 "$pkgdir/usr/share/man/man1"
+ install -Dm644 Distribution/doc/man/*.5 "$pkgdir/usr/share/man/man5"
+
+ #Install service file
+ install -Dm644 ${srcdir}/oscam.service "$pkgdir/usr/lib/systemd/system/oscam.service"
+
+ #Install sysuser config
+ install -Dm644 ${srcdir}/oscam.sysuser "$pkgdir/usr/lib/sysusers.d/oscam.conf"
+}
diff --git a/oscam.install b/oscam.install
new file mode 100644
index 000000000000..30cc782e0889
--- /dev/null
+++ b/oscam.install
@@ -0,0 +1,31 @@
+post_install() {
+ systemd-sysusers
+
+ if [ ! -f /var/lib/oscam/oscam.conf ]; then
+ mkdir -p /var/lib/oscam
+ cat <<'EOF' > /var/lib/oscam/oscam.conf
+[global]
+logfile = syslog
+
+[webif]
+httpport = 8080
+httpuser = myusername
+httppwd = mypassword
+httpallowed = 0.0.0.0-255.255.255.255
+EOF
+ chown -R oscam:oscam /var/lib/oscam
+ echo "Default username: myusername"
+ echo "Default password: mypassword"
+ echo "Default webinterface port: 8080"
+ echo "WARNING! Webinterface is accessible for all IPs by default. Change that!"
+ fi
+}
+
+post_upgrade() {
+ systemd-sysusers
+
+ if [ ! -f /var/lib/oscam/oscam.conf ]; then
+ mv /var/lib/oscam/oscam.conf.pacsave \
+ /var/lib/oscam/oscam.conf 2> /dev/null
+ fi
+} \ No newline at end of file
diff --git a/oscam.service b/oscam.service
new file mode 100644
index 000000000000..352d15fa7406
--- /dev/null
+++ b/oscam.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Open Source Conditional Access Module
+Wants=pcscd.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/oscam --restart 2
+TimeoutStopSec=30
+User=oscam
+
+[Install]
+WantedBy=multi-user.target
diff --git a/oscam.sysuser b/oscam.sysuser
new file mode 100644
index 000000000000..8cc863985c85
--- /dev/null
+++ b/oscam.sysuser
@@ -0,0 +1,3 @@
+u oscam /var/lib/oscam oscam
+m oscam uucp
+m oscam video \ No newline at end of file