summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornkessel <hd_brummy@gentoo.org>2015-05-03 14:03:31 +0200
committerJoerg Bornkessel <hd_brummy@gentoo.org>2015-05-03 14:03:31 +0200
commit716c86f667ef1a3d94e02f27269bb68f48d5b64f (patch)
tree90d3145d1d17ff96cf198deff930f436bffdef5a /media-tv
parentbump (diff)
downloaddevel-716c86f667ef1a3d94e02f27269bb68f48d5b64f.tar.gz
devel-716c86f667ef1a3d94e02f27269bb68f48d5b64f.tar.bz2
devel-716c86f667ef1a3d94e02f27269bb68f48d5b64f.zip
initial commit
Package-Manager: portage-2.2.18 Manifest-Sign-Key: 34C2808A
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/oscam/ChangeLog13
-rw-r--r--media-tv/oscam/Manifest20
-rw-r--r--media-tv/oscam/files/oscam.confd53
-rw-r--r--media-tv/oscam/files/oscam.initd46
-rw-r--r--media-tv/oscam/files/oscam.service13
-rw-r--r--media-tv/oscam/files/oscam_watchdog.sh39
-rw-r--r--media-tv/oscam/metadata.xml56
-rw-r--r--media-tv/oscam/oscam-1.20_p20150429.ebuild163
-rw-r--r--media-tv/oscam/oscam-9999.ebuild179
9 files changed, 582 insertions, 0 deletions
diff --git a/media-tv/oscam/ChangeLog b/media-tv/oscam/ChangeLog
new file mode 100644
index 0000000..20639d0
--- /dev/null
+++ b/media-tv/oscam/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for media-tv/oscam
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*oscam-9999 (03 May 2015)
+*oscam-1.20_p20150429 (03 May 2015)
+
+ 03 May 2015; Joerg Bornkessel <hd_brummy@gentoo.org>
+ +oscam-1.20_p20150429.ebuild, +oscam-9999.ebuild, +files/oscam.confd,
+ +files/oscam.initd, +files/oscam.service, +files/oscam_watchdog.sh,
+ +metadata.xml:
+ initial commit
+
diff --git a/media-tv/oscam/Manifest b/media-tv/oscam/Manifest
new file mode 100644
index 0000000..1b70120
--- /dev/null
+++ b/media-tv/oscam/Manifest
@@ -0,0 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX oscam.confd 2367 SHA256 b53928cacf84f9afe2d3d9c90e0dff9ec1515afd42ad95d9eb916257508a6bd8 SHA512 fb0a23b4fca901702f353768ac78204394d9a31c8533ea54270c646fd40ee5389b63d2c5d0c0dc30594f2b60af3f35d206db28c99d8c9bffa46ce57d9873c8a1 WHIRLPOOL 3ad2ac4386c28948eeec5b64995da5208add371dd666724092e376a8da29d61adf5849e2fc7096088a0d3c3bcad2627d9f02c7e58dd5fc5d9baddc25e099fd98
+AUX oscam.initd 1202 SHA256 ae356e43349012cf8a82f64fb36ea0972940cb6bb2e6172304480da32e92a84c SHA512 a162570b57361e07ec233cb5e911075501b1537bc1291966fa53b20a106497a8f34a3c4baad97e8b813fe65491c0d99bde7b376b600d915a668dcdc4e6fa9e64 WHIRLPOOL d224d454b68a53983a2b8368240e1531585feb54682c3c42d23f9aed45a43d3b6ad7ba43604505690714ec407ba82454af13514245302e9c6789f29ddea3c60a
+AUX oscam.service 238 SHA256 4adf6e22ae68715b001d50c804f52032cf2d57071be922b63677aaf5b7f01d39 SHA512 00c97f6e585b06a432cf29f680fd77997383d313b09f7d6775c40117770165dab748888e0352a0091949c0b0481c84bfa99b5ae1dc2cdeac5e191180912f9580 WHIRLPOOL 405cc0236e648755d49821c793a0a7482b3c74df1a50ca56bd80c3a80e2ec9d198d4c76a6f25e2cb57917cef0579406f0c9b3a62d7fe0f620c174d9691ba6eb2
+AUX oscam_watchdog.sh 744 SHA256 3b0f03dbfb48c564f85aa23693b6ff015f8f6696d2c6f7c7088edba194eccd1b SHA512 fa7e027ac01d8530869c7300f8fa565226b9695141cbca8d7925f7b5e4bbf67c64f449ba1e30bb7c6d3909c75f34a2b31ee582b251b6968e55c37d616ab2d929 WHIRLPOOL 622e00879323c6b2e90f5bc8a5015775be360a1f84ce79467028d078082f35bc60bc25df586ac703a53c312b155eea6c91e0d6efdd053a4b39b02035049c29c8
+DIST 563fbe362bbe9f7a1f8b03f1c66eebd8c53e1c94.tar.gz 1096713 SHA256 05ce230001c22cd812899c5d01e203d8ed7905c8cb8d6a36d1b33c277981efef SHA512 439accb6a5ab416af0aebe7f564cfd6ac5760051190379289ebeea7d8695650cfc3437027f4447092958d90d31849443d64d6db0b91835b4f9253673a5e8f24e WHIRLPOOL 2b6429c8fd176a28e439397471c131959ca2d32eaacd037b026ad0d2c6b7ca223b509dc3eea8953a649e2bf64779f307e091513a1ea6eac847d94621cb0ce62a
+EBUILD oscam-1.20_p20150429.ebuild 5394 SHA256 9791e69ae011e1385788f784f9ad398c0af679e647cc3db132f07ad5f9ce2441 SHA512 97699178d80686d87e033bf9ab555b1a85d6a82a1fd78efc9f70b7167662ace9e20c8eb80017ce449f10c04cabba1832c1594bbd56c18784bcd36ec511279b20 WHIRLPOOL a32c9f2094293e11c4253d34baaf85791ef4311f831b190dfbfc396aeacaa8a8f16cc99be23e4a6af796c221aadf305e963964b1a28083703d60fe44457c6efa
+EBUILD oscam-9999.ebuild 5845 SHA256 c0563e60cb81dac87500927c329f988e96948e8934cc2dccaff37de1414ef87d SHA512 ec2a1db8fa6724793bce8786d9d9d77535c954af9c97b598f4893fb8bb817ecb9a68f6fcec4a4d8e0912f8d684ea1bb6879fafe18a98850a06d8a74fc3e6cd6c WHIRLPOOL d5d1c2550c5aed2ab7cec4e8879ce9437f3473137e1971f6cdd5c56a71228f1952d9233883f13bc664cbfb864b6935c4488d57ea8fa1a3048b2cbbebde3d3748
+MISC ChangeLog 410 SHA256 449f13f57314909bf09a59cf1ee79859aa1cfd2d6927ccda97a27c5c4d8ece9f SHA512 c685f63fd5baa22cbce9c6554d34806f163ef84f4afe384e3a208bb722b85ea6e558daf23d14ee8ff0eaf30821a9830297fa968b720cf276db74134fd2f88144 WHIRLPOOL b29cd74ab52aeaa662d1bed1dd26fcf9831d1fa4e671e3c6071a24986e020e00826d80b4e2f40c4ffd57c2da4046d28d85010adad6373929dfb32022746786a5
+MISC metadata.xml 1994 SHA256 22cd850a0ae47bcf1bc55eecbae3f2320f1f3786f2c86d122e42e39a9f05980a SHA512 86c24b0691b7ac5741befb7a31468b491a7b4cad350cc069f18f60e5509bbc2759b4d4ed71039ba1f013ed080de5d0fd98968017ee56f528bd5105593761e3ee WHIRLPOOL 68d8eb63b61ae439ae039b4920b7839d762b9d037b7858b3f501e1489b56e7ecb280b72e70c6d8a68bc0b8eb60440b4e35e86efa9b35070b498b6613c9db40d2
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+Comment: added by hd_brummy@gentoo.org
+
+iD8DBQFVRg6Tdn07HTTCgIoRCOxXAJ9Tk3Co127TydVHLLaIDd6rTQ5DrACfZI5C
+jvFU/Dbndy/YBSp8CdWks0Y=
+=Dv2A
+-----END PGP SIGNATURE-----
diff --git a/media-tv/oscam/files/oscam.confd b/media-tv/oscam/files/oscam.confd
new file mode 100644
index 0000000..fd3cc70
--- /dev/null
+++ b/media-tv/oscam/files/oscam.confd
@@ -0,0 +1,53 @@
+NAME="OsCAM"
+DESCRIPTION="OsCAM Server"
+DAEMON="oscam"
+DAEMONPATH="/usr/bin/${DAEMON}"
+PIDFILE="/var/run/oscam.pid"
+
+#check-frequency of the watchdog in seconds
+CHECKTIME=15
+
+
+
+# Usage: oscam [-a] [-b] [-c <config dir>] [-d <level>] [-g <mode>] [-h]
+# [-p <num>] [-S] [-s] [-t <tmp dir>] [-w <secs>] [-V]
+# [-r <level>] [-u]
+
+# Options:
+# -a : Write oscam.crash file on segfault. This option needs GDB to
+# be installed and OSCam executable to contain the debug
+# information (run oscam-XXXX.debug binary).
+# -b : Start in the background as daemon.
+# -c <dir> : Read configuration files from <dir>:
+# -d <level> : Set debug level mask used for logging:
+# 0 = No debugging (default).
+# 1 = Detailed error messages.
+# 2 = ATR parsing info, ECM, EMM and CW dumps.
+# 4 = Traffic from/to the reader.
+# 8 = Traffic from/to the clients.
+# 16 = Traffic to the reader-device on IFD layer.
+# 32 = Traffic to the reader-device on I/O layer.
+# 64 = EMM logging.
+# 128 = DVBAPI logging.
+# 256 = Loadbalancer logging.
+# 512 = CACHEEX logging.
+# 1024 = Client ECM logging.
+# 65535 = Debug all.
+# -g <mode> : Garbage collector debug mode (DEBUG ONLY OPTION!):
+# 1 = Immediate free.
+# 2 = Check for double frees.
+# -p <num> : Maximum number of pending ECM packets. Default: 32 Max: 255
+# -r <level> : Set restart level:
+# 0 = Restart disabled (request sets exit status 99).
+# 1 = Restart activated (webif can restart oscam (default)).
+# 2 = Like 1, but also restart on segmentation faults.
+# -u : Enable output of web interface in UTF-8 charset.
+# -S : Do not filter sensitive info (card serials, boxids) in logs.
+# -s : Capture segmentation faults.
+# -t <dir> : Set temporary directory to <dir>:
+# Default = /tmp/.oscam
+# -w <secs> : Wait <secs> seconds for the system time to be set correctly.
+# -h : Show this help text.
+# -V : Show OSCam binary configuration and version.
+
+_OSCAM_OPTS="-c /etc/oscam -d 128"
diff --git a/media-tv/oscam/files/oscam.initd b/media-tv/oscam/files/oscam.initd
new file mode 100644
index 0000000..c75248f
--- /dev/null
+++ b/media-tv/oscam/files/oscam.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: Exp $
+
+depend() {
+ after net
+ before vdr
+}
+
+start() {
+ ebegin "Starting ${DESCRIPTION}"
+ WATCHDOG=$(pidof -x oscam_watchdog.sh)
+ [ -z $WATCHDOG ] && killall -q oscam_watchdog.sh
+ [ -f ${PIDFILE} ] && rm -f ${PIDFILE}
+ export MALLOC_CHECK_=0
+ start-stop-daemon --start --quiet --exec ${DAEMONPATH} -- -b ${_OSCAM_OPTS}
+ ebegin "Starting Watchdog for ${DESCRIPTION}"
+ /usr/bin/oscam_watchdog.sh &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${DESCRIPTION}"
+ start-stop-daemon --stop --quiet --signal SIGQUIT --exec ${DAEMONPATH}
+ [ -f ${PIDFILE} ] && rm -f ${PIDFILE}
+ ebegin "Stopping Watchdog for ${DESCRIPTION}"
+ killall -q oscam_watchdog.sh
+ sleep 1
+ if [ -n "$(pidof oscam)" ] ; then
+ ewarn "Waiting for ${DESCRIPTION} termination ..."
+ for in in $(seq 1 10) ; do
+ if [ -z $(pidof oscam) ] ; then
+ break;
+ fi
+ sleep 1
+ done
+ if [ -n "$(pidof oscam)" ]; then
+ eerror "${DESCRIPTION} does not terminate normally - killing ${DESCRIPTION}"
+ killall -v -KILL oscam
+ sleep 1
+ [ -f ${PIDFILE} ] && rm -f ${PIDFILE}
+ fi
+ fi
+ eend $?
+}
diff --git a/media-tv/oscam/files/oscam.service b/media-tv/oscam/files/oscam.service
new file mode 100644
index 0000000..6553902
--- /dev/null
+++ b/media-tv/oscam/files/oscam.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OsCAM Server
+After=network.target
+Before=vdr.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/oscam
+ExecStart=/usr/bin/oscam $_OSCAM_OPTS
+PIDFile=/tmp/.oscam/oscam.pid
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-tv/oscam/files/oscam_watchdog.sh b/media-tv/oscam/files/oscam_watchdog.sh
new file mode 100644
index 0000000..1a875c9
--- /dev/null
+++ b/media-tv/oscam/files/oscam_watchdog.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# Watchdog for OSCAM by 3PO
+
+#set -x
+
+# read variables
+source /etc/conf.d/oscam
+
+
+LOGDIR="/var/log/oscam"
+LOGFILE="oscam_watchdog.log"
+EXITLOG="$LOGDIR/exitlog_$(date +%F_%R).log"
+OSCAMLOG="$LOGDIR/oscam.log"
+
+
+[ ! -d "$LOGDIR" ] && mkdir $LOGDIR
+LOG="${LOGDIR}/${LOGFILE}"
+
+sleep 10
+
+while sleep $CHECKTIME
+do
+ PID=`pidof $DAEMON`
+ if [ -z "$PID" ] ; then
+ echo "$(date) Error, ${DESCRIPTION} is not running" >> $LOG
+ echo "$(date) Restarting ${DESCRIPTION} ..." >> $LOG
+ tail -n50 $OSCAMLOG > $EXITLOG
+ /etc/init.d/$DAEMON restart
+ PID=`pidof $DAEMON`
+ if [ -z "$PID" ] ; then
+ echo "$(date) Error, while restarting ${DESCRIPTION}" >> $LOG
+ else
+ echo "$(date) ${DESCRIPTION} restarted" >> $LOG
+ fi
+ fi
+done
+
+exit 0
diff --git a/media-tv/oscam/metadata.xml b/media-tv/oscam/metadata.xml
new file mode 100644
index 0000000..bf771a8
--- /dev/null
+++ b/media-tv/oscam/metadata.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>media-tv</herd>
+ <maintainer>
+ <email>hd_brummy@gentoo.org</email>
+ <name>Joerg Bornkessel</name>
+ </maintainer>
+ <use>
+ <flag name="protocol_camd33"> </flag>
+ <flag name="protocol_camd35"> </flag>
+ <flag name="protocol_camd35_tcp"> </flag>
+ <flag name="protocol_cccam"> </flag>
+ <flag name="protocol_cccshare"> </flag>
+ <flag name="protocol_constcw"> </flag>
+ <flag name="protocol_gbox"> </flag>
+ <flag name="protocol_ghttp"> </flag>
+ <flag name="protocol_newcamd"> </flag>
+ <flag name="protocol_pandora"> </flag>
+ <flag name="protocol_radegast"> </flag>
+ <flag name="protocol_serial"> </flag>
+ <flag name="reader_bulcrypt"> </flag>
+ <flag name="reader_conax"> </flag>
+ <flag name="reader_cryptoworks"> </flag>
+ <flag name="reader_dgcrypt"> </flag>
+ <flag name="reader_dre"> </flag>
+ <flag name="reader_griffin"> </flag>
+ <flag name="reader_irdeto"> </flag>
+ <flag name="reader_nagra"> </flag>
+ <flag name="reader_seca"> </flag>
+ <flag name="reader_tongfang"> </flag>
+ <flag name="reader_viaccess"> </flag>
+ <flag name="reader_videoguard"> </flag>
+ <flag name="cardreader_phoenix"> </flag>
+ <flag name="cardreader_internal"> </flag>
+ <flag name="cardreader_sc8in1"> </flag>
+ <flag name="cardreader_mp35"> </flag>
+ <flag name="cardreader_smargo"> </flag>
+ <flag name="cardreader_smartreader"> </flag>
+ <flag name="cardreader_db2com"> </flag>
+ <flag name="cardreader_stapi"> </flag>
+ <flag name="anticasc"> </flag>
+ <flag name="cacheex"> </flag>
+ <flag name="cw_cycle_check"> </flag>
+ <flag name="dvbapi"> </flag>
+ <flag name="irdeto_guessing"> </flag>
+ <flag name="lcd"> </flag>
+ <flag name="led"> </flag>
+ <flag name="loadbalancing"> </flag>
+ <flag name="monitor"> </flag>
+ <flag name="pcsc"> </flag>
+ <flag name="reader"> </flag>
+ <flag name="touch"> </flag>
+ <flag name="www"> </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-tv/oscam/oscam-1.20_p20150429.ebuild b/media-tv/oscam/oscam-1.20_p20150429.ebuild
new file mode 100644
index 0000000..801e498
--- /dev/null
+++ b/media-tv/oscam/oscam-1.20_p20150429.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+GIT_REVISION="563fbe362bbe9f7a1f8b03f1c66eebd8c53e1c94"
+#GIT_DATE="20150429" #yyyymmdd
+
+DESCRIPTION="OSCam is an Open Source Conditional Access Module software"
+HOMEPAGE="www.streamboard.tv/wiki/OSCam/de/"
+SRC_URI="https://github.com/gfto/oscam/archive/${GIT_REVISION}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+PROTOCOLS="camd33 camd35 camd35_tcp cccam cccshare constcw gbox ghttp newcamd pandora radegast serial"
+for share in ${PROTOCOLS}; do
+ IUSE_PROTOCOLS+=" +protocol_${share}"
+done
+
+READERS="bulcrypt conax cryptoworks dgcrypt dre griffin irdeto nagra seca tongfang viaccess videoguard"
+for card in ${READERS}; do
+ IUSE_READERS+=" +reader_${card}"
+done
+
+CARD_READERS="phoenix internal sc8in1 mp35 smargo smartreader db2com stapi"
+for cardreader in ${CARD_READERS}; do
+ IUSE_CARDREADERS+=" +cardreader_${cardreader}"
+done
+
+IUSE="${IUSE_PROTOCOLS} ${IUSE_READERS} ${IUSE_CARDREADERS}
+ +anticasc cacheex cw_cycle_check debug +dvbapi ipv6 irdeto_guessing lcd led loadbalancing +monitor pcsc +reader +ssl touch usb +www"
+
+REQUIRED_USE="
+ protocol_camd35_tcp? ( protocol_camd35 )
+ reader_nagra? ( reader )
+ reader_irdeto? ( reader irdeto_guessing )
+ reader_conax? ( reader )
+ reader_cryptoworks? ( reader )
+ reader_seca? ( reader )
+ reader_viaccess? ( reader )
+ reader_videoguard? ( reader )
+ reader_dre? ( reader )
+ reader_tongfang? ( reader )
+ reader_bulcrypt? ( reader )
+ reader_griffin? ( reader )
+ reader_dgcrypt? ( reader )
+ cardreader_db2com? ( reader )
+ cardreader_internal? ( reader )
+ cardreader_mp35? ( reader usb )
+ cardreader_phoenix? ( reader usb )
+ cardreader_sc8in1? ( reader usb )
+ cardreader_smargo? ( reader usb )
+ cardreader_smartreader? ( reader usb )
+ cardreader_stapi? ( reader )
+ pcsc? ( reader usb )
+"
+
+DEPEND="dev-util/cmake"
+RDEPEND="${DEPEND}
+ dev-libs/openssl
+ usb? ( virtual/libusb:1
+ dev-libs/libusb-compat )
+ pcsc? ( sys-apps/pcsc-lite )"
+
+RESTRICT="mirror strip"
+
+S="${WORKDIR}/${PN}-${GIT_REVISION}"
+
+src_prepare() {
+ sed -i "s:share/doc/oscam:share/doc/oscam-${PV}:" CMakeLists.txt || die "Failed to modify doc path"
+
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DCS_CONFDIR=/etc/oscam
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -INCLUDED=Yes
+ $(cmake-utils_use debug WITH_DEBUG)
+ $(cmake-utils_use www WEBIF)
+ $(cmake-utils_use touch TOUCH)
+ $(cmake-utils_use dvbapi HAVE_DVBAPI)
+ $(cmake-utils_use irdeto_guessing IRDETO_GUESSING)
+ $(cmake-utils_use anticasc CS_ANTICASC)
+ $(cmake-utils_use monitor MODULE_MONITOR)
+ $(cmake-utils_use ssl WITH_SSL)
+ $(cmake-utils_use loadbalancing WITH_LB)
+ $(cmake-utils_use cacheex CS_CACHEEX)
+ $(cmake-utils_use led LEDSUPPORT)
+ $(cmake-utils_use lcd LCDSUPPORT)
+ $(cmake-utils_use ipv6 IPV6SUPPORT)
+ $(cmake-utils_use cw_cycle_check CW_CYCLE_CHECK)
+ $(cmake-utils_use protocol_camd33 MODULE_CAMD33)
+ $(cmake-utils_use protocol_camd35 MODULE_CAMD35)
+ $(cmake-utils_use protocol_camd35_tcp MODULE_CAMD35_TCP)
+ $(cmake-utils_use protocol_newcamd MODULE_NEWCAMD)
+ $(cmake-utils_use protocol_cccam MODULE_CCCAM)
+ $(cmake-utils_use protocol_cccshare MODULE_CCCSHARE)
+ $(cmake-utils_use protocol_gbox MODULE_GBOX)
+ $(cmake-utils_use protocol_radegast MODULE_RADEGAST)
+ $(cmake-utils_use protocol_serial MODULE_SERIAL)
+ $(cmake-utils_use protocol_constcw MODULE_CONSTCW)
+ $(cmake-utils_use protocol_pandora MODULE_PANDORA)
+ $(cmake-utils_use protocol_ghttp MODULE_GHTTP)
+ $(cmake-utils_use reader WITH_CARDREADER)
+ $(cmake-utils_use reader_nagra READER_NAGRA)
+ $(cmake-utils_use reader_irdeto READER_IRDETO)
+ $(cmake-utils_use reader_conax READER_CONAX)
+ $(cmake-utils_use reader_cryptoworks READER_CRYPTOWORKS)
+ $(cmake-utils_use reader_seca READER_SECA)
+ $(cmake-utils_use reader_viaccess READER_VIACCESS)
+ $(cmake-utils_use reader_videoguard READER_VIDEOGUARD)
+ $(cmake-utils_use reader_dre READER_DRE)
+ $(cmake-utils_use reader_tongfang READER_TONGFANG)
+ $(cmake-utils_use reader_bulcrypt READER_BULCRYPT)
+ $(cmake-utils_use reader_griffin READER_GRIFFIN)
+ $(cmake-utils_use reader_dgcrypt READER_DGCRYPT)
+ $(cmake-utils_use cardreader_phoenix CARDREADER_PHOENIX)
+ $(cmake-utils_use cardreader_internal CARDREADER_INTERNAL)
+ $(cmake-utils_use cardreader_sc8in1 CARDREADER_SC8IN1)
+ $(cmake-utils_use cardreader_mp35 CARDREADER_MP35)
+ $(cmake-utils_use cardreader_smargo CARDREADER_SMARGO)
+ $(cmake-utils_use cardreader_smartreader CARDREADER_SMART)
+ $(cmake-utils_use cardreader_db2com CARDREADER_DB2COM)
+ $(cmake-utils_use cardreader_stapi CARDREADER_STAPI)
+ "
+
+ use usb && mycmakeargs="-DSTATIC_LIBUSB=0 ${mycmakeargs}"
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use cardreader_smargo; then
+ dobin "${WORKDIR}"/"${P}"_build/utils/list_smargo
+ fi
+
+ dobin "${FILESDIR}/oscam_watchdog.sh" || die "dobin oscam_watchdog.sh failed"
+
+ insinto "/etc/${PN}"
+ doins -r Distribution/doc/example/*
+ fperms 0755 /etc/${PN} # ??? all executable ???
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newinitd "${FILESDIR}/${PN}.initd" oscam
+ newconfd "${FILESDIR}/${PN}.confd" oscam
+
+ keepdir "/var/log/${PN}/emm"
+}
+
+pkg_postinst() {
+ einfo "Please refer to the wiki for assistance with the setup"
+ einfo "located at http://www.streamboard.tv/wiki/OSCam/en"
+}
diff --git a/media-tv/oscam/oscam-9999.ebuild b/media-tv/oscam/oscam-9999.ebuild
new file mode 100644
index 0000000..7a479c2
--- /dev/null
+++ b/media-tv/oscam/oscam-9999.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit cmake-utils systemd
+
+#
+# Just define the OSCAM_VCS="svn" environment variable in system make.conf
+# if you want to pull from upstream subversion repository instead of git fork.
+#
+# You can also customize the respective REPO_URI there
+#
+
+if [ "${OSCAM_VCS}" == "svn" ] ; then
+ inherit subversion
+ ESVN_REPO_URI="${OSCAM_ESVN_REPO_URI:-http://streamboard.de.vu/svn/oscam/trunk}"
+else
+ inherit git-2
+ EGIT_REPO_URI="${OSCAM_EGIT_REPO_URI:-git://github.com/gfto/oscam.git}"
+fi
+
+DESCRIPTION="OSCam is an Open Source Conditional Access Module software"
+HOMEPAGE="www.streamboard.tv/wiki/OSCam/de/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+PROTOCOLS="camd33 camd35 camd35_tcp cccam cccshare constcw gbox ghttp newcamd pandora radegast serial"
+for share in ${PROTOCOLS}; do
+ IUSE_PROTOCOLS+=" +protocol_${share}"
+done
+
+READERS="bulcrypt conax cryptoworks dgcrypt dre griffin irdeto nagra seca tongfang viaccess videoguard"
+for card in ${READERS}; do
+ IUSE_READERS+=" +reader_${card}"
+done
+
+CARD_READERS="phoenix internal sc8in1 mp35 smargo smartreader db2com stapi"
+for cardreader in ${CARD_READERS}; do
+ IUSE_CARDREADERS+=" +cardreader_${cardreader}"
+done
+
+IUSE="${IUSE_PROTOCOLS} ${IUSE_READERS} ${IUSE_CARDREADERS}
+ +anticasc cacheex cw_cycle_check debug +dvbapi ipv6 irdeto_guessing lcd led loadbalancing +monitor pcsc +reader +ssl touch usb +www"
+
+REQUIRED_USE="
+ protocol_camd35_tcp? ( protocol_camd35 )
+ reader_nagra? ( reader )
+ reader_irdeto? ( reader irdeto_guessing )
+ reader_conax? ( reader )
+ reader_cryptoworks? ( reader )
+ reader_seca? ( reader )
+ reader_viaccess? ( reader )
+ reader_videoguard? ( reader )
+ reader_dre? ( reader )
+ reader_tongfang? ( reader )
+ reader_bulcrypt? ( reader )
+ reader_griffin? ( reader )
+ reader_dgcrypt? ( reader )
+ cardreader_db2com? ( reader )
+ cardreader_internal? ( reader )
+ cardreader_mp35? ( reader usb )
+ cardreader_phoenix? ( reader usb )
+ cardreader_sc8in1? ( reader usb )
+ cardreader_smargo? ( reader usb )
+ cardreader_smartreader? ( reader usb )
+ cardreader_stapi? ( reader )
+ pcsc? ( reader usb )
+"
+
+DEPEND="dev-util/cmake"
+RDEPEND="${DEPEND}
+ dev-libs/openssl
+ usb? ( virtual/libusb:1
+ dev-libs/libusb-compat )
+ pcsc? ( sys-apps/pcsc-lite )"
+
+RESTRICT="mirror strip"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ if [ "${OSCAM_VCS}" != "svn" ] ; then
+ sed -i "s:svnversion -n .:git describe --always:" config.sh || die "Failed to patch the GIT commit as build string"
+ fi
+
+ sed -i "s:share/doc/oscam:share/doc/oscam-${PV}:" CMakeLists.txt || die "Failed to modify doc path"
+
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs="
+ -DCS_CONFDIR=/etc/oscam
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -INCLUDED=Yes
+ $(cmake-utils_use debug WITH_DEBUG)
+ $(cmake-utils_use www WEBIF)
+ $(cmake-utils_use touch TOUCH)
+ $(cmake-utils_use dvbapi HAVE_DVBAPI)
+ $(cmake-utils_use irdeto_guessing IRDETO_GUESSING)
+ $(cmake-utils_use anticasc CS_ANTICASC)
+ $(cmake-utils_use monitor MODULE_MONITOR)
+ $(cmake-utils_use ssl WITH_SSL)
+ $(cmake-utils_use loadbalancing WITH_LB)
+ $(cmake-utils_use cacheex CS_CACHEEX)
+ $(cmake-utils_use led LEDSUPPORT)
+ $(cmake-utils_use lcd LCDSUPPORT)
+ $(cmake-utils_use ipv6 IPV6SUPPORT)
+ $(cmake-utils_use cw_cycle_check CW_CYCLE_CHECK)
+ $(cmake-utils_use protocol_camd33 MODULE_CAMD33)
+ $(cmake-utils_use protocol_camd35 MODULE_CAMD35)
+ $(cmake-utils_use protocol_camd35_tcp MODULE_CAMD35_TCP)
+ $(cmake-utils_use protocol_newcamd MODULE_NEWCAMD)
+ $(cmake-utils_use protocol_cccam MODULE_CCCAM)
+ $(cmake-utils_use protocol_cccshare MODULE_CCCSHARE)
+ $(cmake-utils_use protocol_gbox MODULE_GBOX)
+ $(cmake-utils_use protocol_radegast MODULE_RADEGAST)
+ $(cmake-utils_use protocol_serial MODULE_SERIAL)
+ $(cmake-utils_use protocol_constcw MODULE_CONSTCW)
+ $(cmake-utils_use protocol_pandora MODULE_PANDORA)
+ $(cmake-utils_use protocol_ghttp MODULE_GHTTP)
+ $(cmake-utils_use reader WITH_CARDREADER)
+ $(cmake-utils_use reader_nagra READER_NAGRA)
+ $(cmake-utils_use reader_irdeto READER_IRDETO)
+ $(cmake-utils_use reader_conax READER_CONAX)
+ $(cmake-utils_use reader_cryptoworks READER_CRYPTOWORKS)
+ $(cmake-utils_use reader_seca READER_SECA)
+ $(cmake-utils_use reader_viaccess READER_VIACCESS)
+ $(cmake-utils_use reader_videoguard READER_VIDEOGUARD)
+ $(cmake-utils_use reader_dre READER_DRE)
+ $(cmake-utils_use reader_tongfang READER_TONGFANG)
+ $(cmake-utils_use reader_bulcrypt READER_BULCRYPT)
+ $(cmake-utils_use reader_griffin READER_GRIFFIN)
+ $(cmake-utils_use reader_dgcrypt READER_DGCRYPT)
+ $(cmake-utils_use cardreader_phoenix CARDREADER_PHOENIX)
+ $(cmake-utils_use cardreader_internal CARDREADER_INTERNAL)
+ $(cmake-utils_use cardreader_sc8in1 CARDREADER_SC8IN1)
+ $(cmake-utils_use cardreader_mp35 CARDREADER_MP35)
+ $(cmake-utils_use cardreader_smargo CARDREADER_SMARGO)
+ $(cmake-utils_use cardreader_smartreader CARDREADER_SMART)
+ $(cmake-utils_use cardreader_db2com CARDREADER_DB2COM)
+ $(cmake-utils_use cardreader_stapi CARDREADER_STAPI)
+ "
+
+ use usb && mycmakeargs="-DSTATIC_LIBUSB=0 ${mycmakeargs}"
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use cardreader_smargo; then
+ dobin "${WORKDIR}"/"${P}"_build/utils/list_smargo
+ fi
+
+ dobin "${FILESDIR}/oscam_watchdog.sh" || die "dobin oscam_watchdog.sh failed"
+
+ insinto "/etc/${PN}"
+ doins -r Distribution/doc/example/*
+ fperms 0755 /etc/${PN} # ??? all executable ???
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ newinitd "${FILESDIR}/${PN}.initd" oscam
+ newconfd "${FILESDIR}/${PN}.confd" oscam
+
+ keepdir "/var/log/${PN}/emm"
+}
+
+pkg_postinst() {
+ einfo "Please refer to the wiki for assistance with the setup"
+ einfo "located at http://www.streamboard.tv/wiki/OSCam/en"
+}