diff --git a/packages/addons/service/softcam/oscam/addon b/packages/addons/service/softcam/oscam/addon new file mode 100755 index 0000000000..0863220d80 --- /dev/null +++ b/packages/addons/service/softcam/oscam/addon @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -P $PKG_BUILD/oscam $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -PR $PKG_DIR/config/oscam.conf $ADDON_BUILD/$PKG_ADDON_ID/oscam-default.conf + + diff --git a/packages/addons/service/softcam/oscam/build b/packages/addons/service/softcam/oscam/build new file mode 100755 index 0000000000..70bbd406a0 --- /dev/null +++ b/packages/addons/service/softcam/oscam/build @@ -0,0 +1,27 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +cmake -DWEBIF=1 +make diff --git a/packages/addons/service/softcam/oscam/changelog.txt b/packages/addons/service/softcam/oscam/changelog.txt new file mode 100644 index 0000000000..5c9a1ea79d --- /dev/null +++ b/packages/addons/service/softcam/oscam/changelog.txt @@ -0,0 +1,2 @@ +0.99.1 +- initial version oscam-5377 diff --git a/packages/addons/service/softcam/oscam/config/oscam.conf b/packages/addons/service/softcam/oscam/config/oscam.conf new file mode 100644 index 0000000000..f5a0ebc151 --- /dev/null +++ b/packages/addons/service/softcam/oscam/config/oscam.conf @@ -0,0 +1,31 @@ +# oscam.conf generated automatically by Streamboard OSCAM 1.00-unstable_svn build #0 +# Read more: http://streamboard.gmc.to/svn/oscam/trunk/Distribution/doc/txt/oscam.conf.txt + +[global] +usrfile = /storage/.xbmc/userdata/addon_data/service.softcam.oscam/log/oscamuser.log +logfile = /storage/.xbmc/userdata/addon_data/service.softcam.oscam/log/oscam.log +cwlogdir = /storage/.xbmc/userdata/addon_data/service.softcam.oscam/log/cw +nice = -1 +saveinithistory = 1 + +[monitor] +port = 988 +aulow = 120 +hideclient_to = 15 +monlevel = 1 +appendchaninfo = 0 + +[webif] +httpport = 8888 +httpuser = oscam +httppwd = oscam +httpallowed = 0.0.0.0-255.255.255.255 + +[anticasc] +enabled = 1 +numusers = 1 +samples = 5 +penalty = 1 +aclogfile = /storage/.xbmc/userdata/addon_data/service.softcam.oscam/log/aclog.log +denysamples = 4 + diff --git a/packages/addons/service/softcam/oscam/icon/icon.png b/packages/addons/service/softcam/oscam/icon/icon.png new file mode 100644 index 0000000000..b936a07d69 Binary files /dev/null and b/packages/addons/service/softcam/oscam/icon/icon.png differ diff --git a/packages/addons/service/softcam/oscam/meta b/packages/addons/service/softcam/oscam/meta new file mode 100644 index 0000000000..8c64ef0c96 --- /dev/null +++ b/packages/addons/service/softcam/oscam/meta @@ -0,0 +1,39 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="oscam" +PKG_VERSION="5377" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://streamboard.gmc.to/wiki/index.php/OSCam/en" +#PKG_URL="$OPENELEC_SRC/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_URL="http://gujs.openelec.tv/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_DEPENDS="libiconv avahi openssl" +PKG_BUILD_DEPENDS="toolchain libiconv avahi openssl" +PKG_PRIORITY="optional" +PKG_SECTION="service/softcam" +PKG_SHORTDESC="oscam: OSCam is Open Source Conditional Access Modul." +PKG_LONGDESC="OSCam is Open Source Conditional Access Modul." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" + +PKG_AUTORECONF="no" diff --git a/packages/addons/service/softcam/oscam/source/bin/oscam.service b/packages/addons/service/softcam/oscam/source/bin/oscam.service new file mode 100755 index 0000000000..609aa0b893 --- /dev/null +++ b/packages/addons/service/softcam/oscam/source/bin/oscam.service @@ -0,0 +1,72 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +#Check if process is already running +if [ ! $(pidof oscam) ]; then + + ADDON_DIR="$HOME/.xbmc/addons/service.softcam.oscam" + ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.softcam.oscam" + ADDON_LOG_DIR="$ADDON_HOME/log" + + ADDON_CONF_DIR="$ADDON_HOME/config" + ADDON_CONF="$ADDON_CONF_DIR/oscam.conf" + ADDON_CONF_AC="$ADDON_CONF_DIR/oscam.ac" + ADDON_CONF_CERT="$ADDON_CONF_DIR/oscam.cert" + ADDON_CONF_DVBAPI="$ADDON_CONF_DIR/oscam.dvbapi" + ADDON_CONF_GUESS="$ADDON_CONF_DIR/oscam.guess" + ADDON_CONF_IRD="$ADDON_CONF_DIR/oscam.ird" + ADDON_CONF_PROVID="$ADDON_CONF_DIR/oscam.provid" + ADDON_CONF_SERVER="$ADDON_CONF_DIR/oscam.server" + ADDON_CONF_SERVICES="$ADDON_CONF_DIR/oscam.services" + ADDON_CONF_SRVID="$ADDON_CONF_DIR/oscam.srvid" + ADDON_CONF_TIERS="$ADDON_CONF_DIR/oscam.tiers" + ADDON_CONF_USER="$ADDON_CONF_DIR/oscam.user" + + OSCAM_ARG="-c $ADDON_CONF_DIR" + + mkdir -p $ADDON_HOME + mkdir -p $ADDON_CONF_DIR + mkdir -p $ADDON_LOG_DIR + + if [ ! -f "$ADDON_CONF" ]; then + cp $ADDON_DIR/oscam-default.conf $ADDON_CONF + fi + + touch $ADDON_CONF_AC + touch $ADDON_CONF_CERT + touch $ADDON_CONF_DVBAPI + touch $ADDON_CONF_GUESS + touch $ADDON_CONF_IRD + touch $ADDON_CONF_PROVID + touch $ADDON_CONF_SERVER + touch $ADDON_CONF_SERVICES + touch $ADDON_CONF_SRVID + touch $ADDON_CONF_TIERS + touch $ADDON_CONF_USER + +#Restart process if it terminates. + (while true; do + oscam $OSCAM_ARG > /dev/null 2>&1 + sleep 1 + done)& +fi + diff --git a/packages/addons/service/softcam/oscam/source/default.py b/packages/addons/service/softcam/oscam/source/default.py new file mode 100644 index 0000000000..15b9b8159e --- /dev/null +++ b/packages/addons/service/softcam/oscam/source/default.py @@ -0,0 +1,23 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +import xbmc, time, os, subprocess + +os.system("oscam.service") diff --git a/tools/mkpkg/mkpkg_oscam b/tools/mkpkg/mkpkg_oscam new file mode 100755 index 0000000000..5851560e19 --- /dev/null +++ b/tools/mkpkg/mkpkg_oscam @@ -0,0 +1,44 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + + +echo "getting sources..." + svn checkout http://streamboard.gmc.to/svn/oscam/trunk oscam-latest + +echo "getting version..." + cd oscam-latest + SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'` + echo $SVN_REV + cd .. + +echo "copying sources..." + rm -rf oscam-$SVN_REV + cp -R oscam-latest oscam-$SVN_REV + +echo "cleaning sources..." + find oscam-$SVN_REV -name .svn -exec rm -rf {} ";" + +echo "packing sources..." + tar cvjf oscam-$SVN_REV.tar.bz2 oscam-$SVN_REV + +echo "remove temporary sourcedir..." + rm -rf oscam-$SVN_REV