mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
commit
fb0854cdaf
39
packages/addons/addon-depends/pcsc-lite/package.mk
Normal file
39
packages/addons/addon-depends/pcsc-lite/package.mk
Normal file
@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pcsc-lite"
|
||||
PKG_VERSION="1.8.16"
|
||||
PKG_REV="0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://pcsclite.alioth.debian.org/pcsclite.html"
|
||||
PKG_URL="https://alioth.debian.org/frs/download.php/file/4164/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain libusb"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
PKG_LONGDESC="Middleware to access a smart card using SCard API (PC/SC)"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
|
||||
--enable-static \
|
||||
--disable-libudev \
|
||||
--enable-libusb \
|
||||
--enable-usbdropdir=/storage/.kodi/addons/service.system.pcscd-addon/drivers"
|
2
packages/addons/service/oscam/changelog.txt
Normal file
2
packages/addons/service/oscam/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
7.0.100
|
||||
- initial LibreELEC version
|
BIN
packages/addons/service/oscam/icon/icon.png
Normal file
BIN
packages/addons/service/oscam/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
66
packages/addons/service/oscam/package.mk
Normal file
66
packages/addons/service/oscam/package.mk
Normal file
@ -0,0 +1,66 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="oscam"
|
||||
PKG_VERSION="09609e1"
|
||||
PKG_VERSION_NUMBER="11225"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.streamboard.tv/oscam/wiki"
|
||||
PKG_URL="http://repo.or.cz/oscam.git/snapshot/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain pcsc-lite"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service.softcam"
|
||||
PKG_SHORTDESC="OSCam is Open Source Conditional Access Modul."
|
||||
PKG_LONGDESC="OSCam is a softcam, software to be used to decrypt digital television channels, as an alternative for a conditional access module."
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="OSCam"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_ADDON_REPOVERSION="7.0"
|
||||
|
||||
pre_unpack() {
|
||||
export OSCAM_ADDON_VERSION="$PKG_VERSION_NUMBER"
|
||||
}
|
||||
|
||||
configure_target() {
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DLIBUSBDIR=$SYSROOT_PREFIX/usr \
|
||||
-DWITH_SSL=0 \
|
||||
-DHAVE_LIBCRYPTO=0 \
|
||||
-DHAVE_DVBAPI=1 -DWITH_STAPI=0 \
|
||||
-DWEBIF=1 \
|
||||
-DWITH_DEBUG=0 \
|
||||
-DOPTIONAL_INCLUDE_DIR=$SYSROOT_PREFIX/usr/include \
|
||||
-DSTATIC_LIBUSB=1 \
|
||||
-DCLOCKFIX=0 \
|
||||
..
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nop
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/oscam $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/utils/list_smargo $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/config.sh b/config.sh
|
||||
index 7653731..a6b2ea8 100755
|
||||
--- a/config.sh
|
||||
+++ b/config.sh
|
||||
@@ -687,7 +687,7 @@ do
|
||||
break
|
||||
;;
|
||||
'-r'|'--oscam-revision')
|
||||
- (svnversion -n . 2>/dev/null || printf 0) | sed 's/.*://; s/[^0-9]*$//; s/^$/0/'
|
||||
+ echo "$OSCAM_ADDON_VERSION"
|
||||
break
|
||||
;;
|
||||
'-O'|'--detect-osx-sdk-version')
|
@ -0,0 +1,28 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3ebd781..2966e65 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -474,7 +474,7 @@ add_library (${csoscam} STATIC ${csoscam_srcs} ${csoscam_hdrs})
|
||||
|
||||
set (exe_name "oscam")
|
||||
add_executable (${exe_name} ${exe_srcs} ${exe_hdrs})
|
||||
-target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt minilzo)
|
||||
+target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt minilzo udev)
|
||||
if(HAVE_LIBRT AND HAVE_LIBUSB)
|
||||
if (LIBUSBDIR)
|
||||
set (libusb_link "imp_libusb")
|
||||
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
|
||||
index 6790913..a603d3e 100644
|
||||
--- a/utils/CMakeLists.txt
|
||||
+++ b/utils/CMakeLists.txt
|
||||
@@ -12,7 +12,7 @@ file (GLOB all_srcs ${exe_srcs})
|
||||
|
||||
set (util_name "list_smargo")
|
||||
add_executable (${util_name} ${exe_srcs} ${exe_hdrs})
|
||||
-target_link_libraries (${util_name} ${libusb_link} ${rt_link} ${setupapi_link} ${ole32_link} ${shell32_link} ${pthread_link} ${dl_link})
|
||||
+target_link_libraries (${util_name} ${libusb_link} ${rt_link} ${setupapi_link} ${ole32_link} ${shell32_link} ${pthread_link} ${dl_link} udev)
|
||||
#----------------------- printout resume -----------------------------
|
||||
|
||||
message (STATUS "Utils: operating system: ${OSCamOperatingSystem}")
|
||||
--
|
||||
1.7.2.5
|
@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cd52430..b01b9fc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -530,6 +530,7 @@ if (HAVE_PCSC)
|
||||
if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
|
||||
if (NOT OSCamOperatingSystem MATCHES "Windows/Cygwin")
|
||||
target_link_libraries (${exe_name} pcsclite)
|
||||
+ target_link_libraries (${exe_name} pthread)
|
||||
endif (NOT OSCamOperatingSystem MATCHES "Windows/Cygwin")
|
||||
endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
|
||||
endif (HAVE_PCSC)
|
63
packages/addons/service/oscam/source/bin/oscam.start
Executable file
63
packages/addons/service/oscam/source/bin/oscam.start
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.softcam.oscam
|
||||
|
||||
mkdir -p $ADDON_HOME/config
|
||||
mkdir -p $ADDON_HOME/log
|
||||
|
||||
for config_name in \
|
||||
oscam.ac oscam.cert oscam.dvbapi oscam.guess oscam.ird oscam.provid \
|
||||
oscam.server oscam.services oscam.srvid oscam.tiers oscam.user
|
||||
do
|
||||
[ ! -f $ADDON_HOME/config/$config_name ] && touch $ADDON_HOME/config/$config_name
|
||||
done
|
||||
|
||||
if [ ! -f "$ADDON_HOME/config/oscam.conf" ]; then
|
||||
cp $ADDON_DIR/oscam-default.conf $ADDON_HOME/config/oscam.conf
|
||||
fi
|
||||
|
||||
find $ADDON_DIR/bin -maxdepth 1 -type f ! -perm 0755 -exec chmod 0755 \{\} \;
|
||||
|
||||
if [ "$WORKAROUND_SLEEP" == "true" ] ; then
|
||||
sleep $WORKAROUND_SLEEP_TIME
|
||||
fi
|
||||
|
||||
# start userspace DVB driver/addon
|
||||
for driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do
|
||||
driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS="/"} {printf("%s", $5)}')
|
||||
logger -t OSCAM "### Loading userspace DVB driver: $driver_dvb_name ###"
|
||||
# use ". " because of variable export
|
||||
. $driver_dvb
|
||||
done
|
||||
|
||||
if [ "$WAIT_FOR_FEINIT" == "true" ] ; then
|
||||
while [ true ] ; do
|
||||
if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
exec oscam -c $ADDON_HOME/config > /dev/null 2>&1
|
||||
|
17
packages/addons/service/oscam/source/default.py
Normal file
17
packages/addons/service/oscam/source/default.py
Normal file
@ -0,0 +1,17 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
27
packages/addons/service/oscam/source/oscam-default.conf
Normal file
27
packages/addons/service/oscam/source/oscam-default.conf
Normal file
@ -0,0 +1,27 @@
|
||||
# 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/.kodi/userdata/addon_data/service.softcam.oscam/log/oscamuser.log
|
||||
logfile = /storage/.kodi/userdata/addon_data/service.softcam.oscam/log/oscam.log
|
||||
cwlogdir = /storage/.kodi/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
|
||||
|
||||
[dvbapi]
|
||||
enabled = 1
|
||||
pmt_mode = 4
|
||||
boxtype = pc
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<string id="1000">General</string>
|
||||
<string id="1011">Restart on suspend / resume</string>
|
||||
<string id="1001">DVBAPI</string>
|
||||
<string id="1012">Delay the start of OSCam</string>
|
||||
<string id="1013">time (s)</string>
|
||||
<string id="1022">Wait for frontend initialization</string>
|
||||
<string id="1023">Number of adapters to wait for</string>
|
||||
</strings>
|
14
packages/addons/service/oscam/source/resources/settings.xml
Normal file
14
packages/addons/service/oscam/source/resources/settings.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="1000">
|
||||
<setting type="sep" />
|
||||
<setting id="RESTART_ON_RESUME" type="bool" label="1011" default="false" />
|
||||
<setting id="WORKAROUND_SLEEP" type="bool" label="1012" default="false" />
|
||||
<setting id="WORKAROUND_SLEEP_TIME" type="slider" range="1,30" option="int" label="1013" default="1" enable="eq(-1,true)" />
|
||||
</category>
|
||||
<category label="1001">
|
||||
<setting type="sep" />
|
||||
<setting id="WAIT_FOR_FEINIT" type="bool" label="1022" default="false" />
|
||||
<setting id="NUM_ADAPTERS" type="slider" range="1,16" option="int" label="1023" default="1" enable="eq(-1,true)" />
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,7 @@
|
||||
<settings>
|
||||
<setting id="RESTART_ON_RESUME" value="false" />
|
||||
<setting id="WAIT_FOR_FEINIT" value="false" />
|
||||
<setting id="$WORKAROUND_SLEEP" value="false" />
|
||||
<setting id="$WORKAROUND_SLEEP_TIME" value="1" />
|
||||
<setting id="NUM_ADAPTERS" value="1" />
|
||||
</settings>
|
40
packages/addons/service/oscam/source/sleep.d/oscam.power
Normal file
40
packages/addons/service/oscam/source/sleep.d/oscam.power
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.softcam.oscam
|
||||
|
||||
SERVICE="service.softcam.oscam.service"
|
||||
|
||||
if [ "$RESTART_ON_RESUME" == "true" ] ; then
|
||||
case "$1" in
|
||||
pre)
|
||||
if systemctl is-active "$SERVICE" &>/dev/null ; then
|
||||
systemctl stop "$SERVICE"
|
||||
fi
|
||||
;;
|
||||
post)
|
||||
if systemctl is-enabled "$SERVICE" &>/dev/null ; then
|
||||
systemctl start "$SERVICE"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=OSCam
|
||||
After=network-online.service
|
||||
Requires=network-online.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.softcam.oscam/bin/oscam.start"
|
||||
TimeoutStopSec=1
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user