mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-18 17:33:31 +00:00
add dvb software: oscam and tvheadend
This commit is contained in:
parent
a8cd67fa07
commit
464073a27f
40
package/lean/dvb/dvb-firmware/Makefile
Normal file
40
package/lean/dvb/dvb-firmware/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# Copyright (C) 2017 McMCC
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dvb-firmware
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dvb-firmware
|
||||
SECTION:=dvb-firmware
|
||||
CATEGORY:=Firmware
|
||||
TITLE:=dvb-firmware megapack
|
||||
endef
|
||||
|
||||
define Package/dvb-firmware/description
|
||||
dvb-firmware is specialised software that is both specific to some hardware
|
||||
and also integral for its proper functioning.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)/firmware
|
||||
$(CP) ./src/* $(PKG_BUILD_DIR)/firmware
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/dvb-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(CP) $(PKG_BUILD_DIR)/firmware/* $(1)/lib/firmware
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dvb-firmware))
|
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-mn88472-02.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-mn88472-02.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-mn88473-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-mn88473-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-02.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-02.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-a20-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-a20-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-a30-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-a30-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-b40-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-b40-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-d60-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2168-d60-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2183-b60-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-demod-si2183-b60-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-fe-ds3000.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-fe-ds3000.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-tuner-si2141-a10-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-tuner-si2141-a10-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-tuner-si2158-a20-01.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-tuner-si2158-a20-01.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2101.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2101.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2102.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2102.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2104.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw2104.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw3101.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-dw3101.fw
Normal file
Binary file not shown.
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-tbsqbox-id5521.fw
Normal file
BIN
package/lean/dvb/dvb-firmware/src/dvb-usb-tbsqbox-id5521.fw
Normal file
Binary file not shown.
57
package/lean/dvb/libdvbcsa/Makefile
Normal file
57
package/lean/dvb/libdvbcsa/Makefile
Normal file
@ -0,0 +1,57 @@
|
||||
#
|
||||
# Copyright (C) 2014 nanpuyue <nanpuyue@gmail.com>
|
||||
# Copyright (C) 2017 Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME := libdvbcsa
|
||||
PKG_RELEASE := 1
|
||||
|
||||
PKG_SOURCE_PROTO := git
|
||||
PKG_SOURCE_URL := https://github.com/glenvt18/libdvbcsa.git
|
||||
PKG_SOURCE_VERSION := 2a1e61e569a621c55c2426f235f42c2398b7f18f
|
||||
|
||||
PKG_VERSION := 1.1.0-$(shell printf '%.8s' $(PKG_SOURCE_VERSION))
|
||||
#PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
#PKG_SOURCE_URL := http://download.videolan.org/pub/videolan/libdvbcsa/$(PKG_VERSION)/
|
||||
#PKG_HASH := 4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d
|
||||
|
||||
PKG_LICENSE := GPL-2.0
|
||||
PKG_LICENSE_FILE := COPYING
|
||||
|
||||
PKG_MAINTAINER := Tomasz Maciej Nowak <tomek_n@o2.pl>
|
||||
|
||||
PKG_INSTALL := 1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libdvbcsa
|
||||
SECTION := libs
|
||||
CATEGORY := Libraries
|
||||
TITLE := DVB Common Scrambling Algorithm library
|
||||
URL := https://www.videolan.org/developers/libdvbcsa.html
|
||||
endef
|
||||
|
||||
define Package/libdvbcsa/description
|
||||
libdvbcsa is a free implementation of the DVB Common Scrambling
|
||||
Algorithm - DVB/CSA - with encryption and decryption capabilities
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); ./bootstrap)
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr $(1)/
|
||||
endef
|
||||
|
||||
define Package/libdvbcsa/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdvbcsa.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libdvbcsa))
|
89
package/lean/dvb/oscam/Makefile
Executable file
89
package/lean/dvb/oscam/Makefile
Executable file
@ -0,0 +1,89 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=oscam
|
||||
PKG_REV:=11402
|
||||
PKG_VERSION:=1.20-$(PKG_REV)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=175e3c61ebf8df3611f980f88ff8b153c4f456d7
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=http://repo.or.cz/oscam.git
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=OSCam developers <unknown>
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/oscam
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libopenssl +libusb-1.0 +kmod-usb-serial +kmod-usb-serial-ch341 +kmod-usb-serial-ftdi +kmod-usb-serial-pl2303 +libpcsclite +pcscd +ccid
|
||||
TITLE:=OSCam is an Open Source Conditional Access Module software
|
||||
URL:=http://www.streamboard.tv/oscam/
|
||||
endef
|
||||
|
||||
define Package/oscam/description
|
||||
OSCam is an Open Source Conditional Access Module software,
|
||||
based on the very good MpCS version 0.9d created by dukat.
|
||||
endef
|
||||
|
||||
define Package/oscam/conffiles
|
||||
/etc/oscam/oscam.conf
|
||||
/etc/oscam/oscam.server
|
||||
/etc/oscam/oscam.user
|
||||
/etc/oscam/SoftCam.Key
|
||||
/etc/oscam/oscam.dvbapi
|
||||
endef
|
||||
|
||||
CONFIGURE_CMD = ./config.sh
|
||||
CONFIGURE_ARGS = \
|
||||
--enable all
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CONF_DIR=/etc/oscam \
|
||||
OSCAM_BIN=Distribution/oscam \
|
||||
USE_SSL=1 \
|
||||
USE_LIBUSB=1 \
|
||||
USE_PCSC=1 \
|
||||
USE_LIBCRYPTO=1
|
||||
|
||||
|
||||
define Package/oscam/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/oscam $(1)/usr/bin/oscam
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/oscam.init $(1)/etc/init.d/oscam
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/oscam
|
||||
$(INSTALL_CONF) ./files/oscam.conf $(1)/etc/oscam
|
||||
$(INSTALL_CONF) ./files/oscam.server $(1)/etc/oscam
|
||||
$(INSTALL_CONF) ./files/oscam.user $(1)/etc/oscam
|
||||
$(INSTALL_CONF) ./files/SoftCam.Key $(1)/etc/oscam
|
||||
$(INSTALL_CONF) ./files/oscam.dvbapi $(1)/etc/oscam
|
||||
|
||||
|
||||
endef
|
||||
|
||||
|
||||
define Package/$(PKG_NAME)/prerm
|
||||
#!/bin/sh
|
||||
# if run within buildroot exit
|
||||
[ -n "$${IPKG_INSTROOT}" ] && exit 0
|
||||
|
||||
# stop running scripts
|
||||
/etc/init.d/oscam disable
|
||||
/etc/init.d/oscam stop
|
||||
|
||||
exit 0
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,oscam))
|
1462
package/lean/dvb/oscam/files/SoftCam.Key
Normal file
1462
package/lean/dvb/oscam/files/SoftCam.Key
Normal file
File diff suppressed because it is too large
Load Diff
43
package/lean/dvb/oscam/files/oscam.conf
Executable file
43
package/lean/dvb/oscam/files/oscam.conf
Executable file
@ -0,0 +1,43 @@
|
||||
# oscam.conf generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11390
|
||||
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.conf.txt
|
||||
|
||||
[global]
|
||||
logfile = /var/log/oscam/oscam.log
|
||||
nice = 0
|
||||
maxlogsize = 1000
|
||||
preferlocalcards = 1
|
||||
|
||||
[cache]
|
||||
|
||||
[cccam]
|
||||
port = 12000
|
||||
nodeid = AC2D31EE10E41520
|
||||
version = 2.1.1
|
||||
reshare = 1
|
||||
ignorereshare = 1
|
||||
stealth = 1
|
||||
|
||||
[streamrelay]
|
||||
|
||||
[dvbapi]
|
||||
enabled = 1
|
||||
au = 1
|
||||
pmt_mode = 4
|
||||
request_mode = 1
|
||||
listen_port = 9000
|
||||
delayer = 80
|
||||
user = TVH
|
||||
boxtype = pc
|
||||
|
||||
[webif]
|
||||
httpport = 8888
|
||||
httpuser = oscam
|
||||
httppwd = oscam
|
||||
httpshowmeminfo = 1
|
||||
httpshowuserinfo = 1
|
||||
httpshowecminfo = 1
|
||||
httpshowloadinfo = 1
|
||||
httpallowed = 0.0.0.0-255.255.255.255
|
||||
aulow = 120
|
||||
httputf8 = 1
|
||||
|
31
package/lean/dvb/oscam/files/oscam.dvbapi
Normal file
31
package/lean/dvb/oscam/files/oscam.dvbapi
Normal file
@ -0,0 +1,31 @@
|
||||
P: 0500:040620 # NTV+ (36Е)
|
||||
P: 0500:041200 # NTV+ (36Е)
|
||||
P: 0500:060A00 # NTV+ (36E)
|
||||
P: 0500:060C00 # NTV+ (36E)
|
||||
P: 0500:023100 # trk football (Shara)(5Е)
|
||||
P: 0500:041200 # trk football (Shara)(5Е)
|
||||
P: 0500:041700 # Dorcel TV (13Е)
|
||||
P: 0500:042300 # rtvi (13Е)
|
||||
P: 0500:042700 # SCT, S1-7-HQ,HD (13Е)
|
||||
P: 0500:042800 # Absat/BisTV (13Е)
|
||||
P: 0500:043800 # REDLIGHT HD, Redlight Premium & Daring! TV (13Е)
|
||||
P: 0100:000068 # Cyfra+ 13e
|
||||
P: 09CD:0 # Sky 13e
|
||||
P: 1803:007001 # Polsat (13Е)
|
||||
P: 1803:007101 # Polsat (13Е)
|
||||
P: 1803:000000 # Polsat (13Е)
|
||||
P: 090D:0 # yes 4w
|
||||
P: 090F:0 # viasat baltic 5e
|
||||
|
||||
# EMU
|
||||
P: 2600:000000 # BISS
|
||||
P: 0500:023800 # srg (EMU)(13Е)
|
||||
P: 0E00:000000 # PowerVU
|
||||
P: 0500:007400
|
||||
P: 0D00:000000
|
||||
P: 0D05:000000
|
||||
P: 0D02:000000
|
||||
P: 1801:000000
|
||||
|
||||
# Ignor
|
||||
I:0
|
23
package/lean/dvb/oscam/files/oscam.init
Executable file
23
package/lean/dvb/oscam/files/oscam.init
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
OSCAM_PATH=/usr/bin
|
||||
|
||||
[ -f /tmp/oscam ] &&
|
||||
{
|
||||
OSCAM_PATH=/tmp
|
||||
[ -x /tmp/oscam ] || chmod +x /tmp/oscam
|
||||
}
|
||||
|
||||
start() {
|
||||
logger "Starting Oscam"
|
||||
[ -d /var/log/oscam ] || mkdir -p /var/log/oscam
|
||||
service_start ${OSCAM_PATH}/oscam -b -r 2 -u
|
||||
}
|
||||
|
||||
stop() {
|
||||
logger "Stopping Oscam"
|
||||
service_stop ${OSCAM_PATH}/oscam -b -r 2 -u
|
||||
}
|
||||
|
||||
|
61
package/lean/dvb/oscam/files/oscam.server
Normal file
61
package/lean/dvb/oscam/files/oscam.server
Normal file
@ -0,0 +1,61 @@
|
||||
# oscam.server generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11401
|
||||
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.server.txt
|
||||
|
||||
[reader]
|
||||
label = emulator
|
||||
protocol = emu
|
||||
device = emulator
|
||||
caid = 0D00,0D02,090F,0500,1801,0604,2600,FFFF,0E00
|
||||
detect = cd
|
||||
ident = 0D00:000000,000004,000010,000014,000020,0000C0,0000C4,0000C8,0000CC;0D02:000000,00008C,0000A0,0000A4,0000A8;090F:000000;0500:000000,030B00,023800,021110,007400,007800;1801:000000,007301,001101;0604:000000;2600:000000;FFFF:000000;0E00:000000
|
||||
group = 1
|
||||
emmcache = 2,3,2,0
|
||||
emu_auproviders = 0500:030B00;0604:010200;0E00:000000
|
||||
|
||||
# Example for NTV+, all disable
|
||||
|
||||
[reader]
|
||||
label = reshare1
|
||||
description = TVShara1
|
||||
enable = 0
|
||||
protocol = cccam
|
||||
device = s4.oscam.org,444
|
||||
user = test1
|
||||
password = test1
|
||||
inactivitytimeout = 200
|
||||
reconnecttimeout = 10
|
||||
caid = 0500
|
||||
group = 1
|
||||
cccversion = 2.3.0
|
||||
cccreshare = 1
|
||||
|
||||
[reader]
|
||||
label = reshare2
|
||||
description = TVShara2
|
||||
enable = 0
|
||||
protocol = newcamd
|
||||
device = s4.oscam.org,2004
|
||||
key = 0102030405060708091011121314
|
||||
user = test2
|
||||
password = test2
|
||||
inactivitytimeout = 200
|
||||
reconnecttimeout = 10
|
||||
connectoninit = 1
|
||||
caid = 0500
|
||||
ident = 0500:060A00,041200,060C00,040620
|
||||
group = 1
|
||||
cccreshare = 1
|
||||
|
||||
[reader]
|
||||
label = reshare3
|
||||
description = TVShara3
|
||||
enable = 0
|
||||
protocol = cs357x
|
||||
device = s4.oscam.org,333
|
||||
user = test3
|
||||
password = test3
|
||||
caid = 0500
|
||||
ident = 0500:060A00,041200,060C00,040620
|
||||
group = 1
|
||||
cccreshare = 1
|
||||
|
27
package/lean/dvb/oscam/files/oscam.user
Normal file
27
package/lean/dvb/oscam/files/oscam.user
Normal file
@ -0,0 +1,27 @@
|
||||
# oscam.user generated automatically by Streamboard OSCAM 1.20-unstable_svn SVN r11401
|
||||
# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/oscam.user.txt
|
||||
|
||||
[account]
|
||||
user = tvheadend_x
|
||||
pwd = tvheadend_x
|
||||
monlevel = 4
|
||||
au = 1
|
||||
group = 1
|
||||
max_connections = 100
|
||||
cccreshare = 1
|
||||
|
||||
[account]
|
||||
user = user1
|
||||
pwd = user1
|
||||
monlevel = 4
|
||||
au = 1
|
||||
group = 1
|
||||
max_connections = 100
|
||||
cccreshare = 1
|
||||
|
||||
[account]
|
||||
user = monitor
|
||||
pwd = monitor
|
||||
monlevel = 4
|
||||
group = 1
|
||||
|
41
package/lean/dvb/oscam/patches/002-config.patch
Normal file
41
package/lean/dvb/oscam/patches/002-config.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff -ruNp trunk.orig/config.h trunk/config.h
|
||||
--- trunk.orig/config.h 2018-03-25 14:31:53.147349681 +0300
|
||||
+++ trunk/config.h 2018-03-25 14:46:42.842348711 +0300
|
||||
@@ -22,7 +22,7 @@
|
||||
//#define IPV6SUPPORT 1
|
||||
#define MODULE_MONITOR 1
|
||||
|
||||
-//#define MODULE_CAMD33 1
|
||||
+#define MODULE_CAMD33 1
|
||||
#define MODULE_CAMD35 1
|
||||
#define MODULE_CAMD35_TCP 1
|
||||
#define MODULE_NEWCAMD 1
|
||||
@@ -62,10 +62,14 @@
|
||||
#define CARDREADER_STINGER 1
|
||||
#define CARDREADER_DRECAS 1
|
||||
|
||||
+#define WITH_PCSC 1
|
||||
+
|
||||
#ifdef WITH_PCSC
|
||||
#define CARDREADER_PCSC 1
|
||||
#endif
|
||||
|
||||
+#define WITH_LIBUSB 1
|
||||
+
|
||||
#ifdef WITH_LIBUSB
|
||||
#define CARDREADER_SMART 1
|
||||
#endif
|
||||
@@ -83,11 +87,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef WITH_STAPI
|
||||
-#define CARDREADER_STAPI 1
|
||||
+//#define CARDREADER_STAPI 1
|
||||
#endif
|
||||
|
||||
#ifdef WITH_STAPI5
|
||||
-#define CARDREADER_STAPI5 1
|
||||
+//#define CARDREADER_STAPI5 1
|
||||
#endif
|
||||
|
||||
#ifdef READER_DRE
|
121
package/lean/dvb/oscam/patches/003-fix_ver.patch
Normal file
121
package/lean/dvb/oscam/patches/003-fix_ver.patch
Normal file
@ -0,0 +1,121 @@
|
||||
diff -ruNp trunk.patches/globals.h trunk/globals.h
|
||||
--- trunk.patches/globals.h 2018-04-03 02:48:24.952386413 +0300
|
||||
+++ trunk/globals.h 2018-04-03 03:02:59.558440627 +0300
|
||||
@@ -365,6 +365,9 @@ typedef unsigned char uchar;
|
||||
#ifndef CS_SVN_VERSION
|
||||
# define CS_SVN_VERSION "test"
|
||||
#endif
|
||||
+#ifndef CS_EMU_VERSION
|
||||
+# define CS_EMU_VERSION "000"
|
||||
+#endif
|
||||
#ifndef CS_TARGET
|
||||
# define CS_TARGET "unknown"
|
||||
#endif
|
||||
diff -ruNp trunk.patches/Makefile trunk/Makefile
|
||||
--- trunk.patches/Makefile 2018-04-03 02:44:08.318254054 +0300
|
||||
+++ trunk/Makefile 2018-04-03 03:01:12.325689204 +0300
|
||||
@@ -5,7 +5,8 @@ SHELL = /bin/sh
|
||||
.PHONY: all tests help README.build README.config simple default debug config menuconfig allyesconfig allnoconfig defconfig clean distclean
|
||||
|
||||
VER := $(shell ./config.sh --oscam-version)
|
||||
-SVN_REV := $(shell ./config.sh --oscam-revision)
|
||||
+#SVN_REV := $(shell ./config.sh --oscam-revision)
|
||||
+#EMU_REV := 000
|
||||
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
|
||||
@@ -35,7 +36,7 @@ ifdef USE_SSL
|
||||
override USE_LIBCRYPTO=1
|
||||
endif
|
||||
|
||||
-CONF_DIR = /usr/local/etc
|
||||
+CONF_DIR = /opt/etc/oscam
|
||||
|
||||
LIB_PTHREAD = -lpthread
|
||||
LIB_DL = -ldl
|
||||
@@ -52,6 +53,7 @@ endif
|
||||
|
||||
override STD_LIBS := $(LIB_PTHREAD) $(LIB_DL) $(LIB_RT)
|
||||
override STD_DEFS := -D'CS_SVN_VERSION="$(SVN_REV)"'
|
||||
+override STD_DEFS += -D'CS_EMU_VERSION="$(EMU_REV)"'
|
||||
override STD_DEFS += -D'CS_CONFDIR="$(CONF_DIR)"'
|
||||
|
||||
# Compiler warnings
|
||||
diff -ruNp trunk.patches/module-dvbapi.c trunk/module-dvbapi.c
|
||||
--- trunk.patches/module-dvbapi.c 2018-04-03 02:48:24.956386446 +0300
|
||||
+++ trunk/module-dvbapi.c 2018-04-03 03:06:13.063827549 +0300
|
||||
@@ -533,7 +533,7 @@ int32_t dvbapi_net_send(uint32_t request
|
||||
if (cfg.dvbapi_extended_cw_api == 2)
|
||||
strcat(capabilities, ",e2");
|
||||
|
||||
- *info_len = snprintf((char *) &packet[size], sizeof(packet) - size, "OSCam v%s, build r%s (%s); %s", CS_VERSION, CS_SVN_VERSION, CS_TARGET, capabilities + 1);
|
||||
+ *info_len = snprintf((char *) &packet[size], sizeof(packet) - size, "OSCam v%s, build r%s + EMU r%s (%s); %s", CS_VERSION, CS_SVN_VERSION, CS_EMU_VERSION, CS_TARGET, capabilities + 1);
|
||||
size += *info_len;
|
||||
break;
|
||||
}
|
||||
diff -ruNp trunk.patches/module-lcd.c trunk/module-lcd.c
|
||||
--- trunk.patches/module-lcd.c 2018-04-03 02:44:10.102269013 +0300
|
||||
+++ trunk/module-lcd.c 2018-04-03 03:15:44.360059325 +0300
|
||||
@@ -81,6 +81,7 @@ static void refresh_lcd_file(void)
|
||||
|
||||
fprintf(fpsave, "Version: %s\n", CS_VERSION);
|
||||
fprintf(fpsave, "Revision: %s\n", CS_SVN_VERSION);
|
||||
+ fprintf(fpsave, "EMU rev.: %s\n", CS_EMU_VERSION);
|
||||
if(days == 0)
|
||||
{ fprintf(fpsave, "up: %02d:%02d:%02d\n", hours, mins, secs); }
|
||||
else
|
||||
diff -ruNp trunk.patches/oscam.c trunk/oscam.c
|
||||
--- trunk.patches/oscam.c 2018-04-03 02:48:24.956386446 +0300
|
||||
+++ trunk/oscam.c 2018-04-03 03:10:28.813703490 +0300
|
||||
@@ -144,7 +144,7 @@ static void show_usage(void)
|
||||
"| | | \\___ \\| | / _` | '_ ` _ \\\n"
|
||||
"| |_| |___) | |_| (_| | | | | | |\n"
|
||||
" \\___/|____/ \\___\\__,_|_| |_| |_|\n\n");
|
||||
- printf("OSCam cardserver v%s, build r%s (%s)\n", CS_VERSION, CS_SVN_VERSION, CS_TARGET);
|
||||
+ printf("OSCam cardserver v%s, build r%s + EMU r%s (%s)\n", CS_VERSION, CS_SVN_VERSION, CS_EMU_VERSION, CS_TARGET);
|
||||
printf("Copyright (C) 2009-2015 OSCam developers.\n");
|
||||
printf("This program is distributed under GPLv3.\n");
|
||||
printf("OSCam is based on Streamboard mp-cardserver v0.9d written by dukat\n");
|
||||
@@ -376,6 +376,7 @@ static void write_versionfile(bool use_s
|
||||
}
|
||||
|
||||
fprintf(fp, "Version: oscam-%s-r%s\n", CS_VERSION, CS_SVN_VERSION);
|
||||
+ fprintf(fp, "EMU: r%s\n", CS_EMU_VERSION);
|
||||
fprintf(fp, "Compiler: %s\n", CS_TARGET);
|
||||
fprintf(fp, "Box type: %s (%s)\n", boxtype_get(), boxname_get());
|
||||
fprintf(fp, "PID: %d\n", getppid());
|
||||
@@ -634,7 +635,7 @@ static void cs_dumpstack(int32_t sig)
|
||||
|
||||
fprintf(stderr, "crashed with signal %d on %swriting oscam.crash\n", sig, buf);
|
||||
|
||||
- fprintf(fp, "%sOSCam cardserver v%s, build r%s (%s)\n", buf, CS_VERSION, CS_SVN_VERSION, CS_TARGET);
|
||||
+ fprintf(fp, "%sOSCam cardserver v%s, build r%s + EMU r%s (%s)\n", buf, CS_VERSION, CS_SVN_VERSION, CS_EMU_VERSION, CS_TARGET);
|
||||
fprintf(fp, "FATAL: Signal %d: %s Fault. Logged StackTrace:\n\n", sig, (sig == SIGSEGV) ? "Segmentation" : ((sig == SIGBUS) ? "Bus" : "Unknown"));
|
||||
fclose(fp);
|
||||
|
||||
diff -ruNp trunk.patches/oscam-conf.c trunk/oscam-conf.c
|
||||
--- trunk.patches/oscam-conf.c 2018-04-03 02:44:10.086268878 +0300
|
||||
+++ trunk/oscam-conf.c 2018-04-03 03:13:07.970887467 +0300
|
||||
@@ -509,8 +509,8 @@ FILE *create_config_file(const char *con
|
||||
cs_log("ERROR: Cannot create file \"%s\" (errno=%d %s)", temp_file, errno, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
- fprintf(f, "# %s generated automatically by Streamboard OSCAM %s SVN r%s\n",
|
||||
- conf_filename, CS_VERSION, CS_SVN_VERSION);
|
||||
+ fprintf(f, "# %s generated automatically by Streamboard OSCAM %s SVN r%s + EMU r%s\n",
|
||||
+ conf_filename, CS_VERSION, CS_SVN_VERSION, CS_EMU_VERSION);
|
||||
fprintf(f, "# Read more: http://www.streamboard.tv/svn/oscam/trunk/Distribution/doc/txt/%s.txt\n\n",
|
||||
conf_filename);
|
||||
return f;
|
||||
diff -ruNp trunk.patches/oscam-log.c trunk/oscam-log.c
|
||||
--- trunk.patches/oscam-log.c 2018-04-03 02:44:09.766266195 +0300
|
||||
+++ trunk/oscam-log.c 2018-04-03 03:12:04.910417167 +0300
|
||||
@@ -232,7 +232,7 @@ int32_t cs_open_logfiles(void)
|
||||
// according to syslog docu: calling closelog is not necessary and calling openlog multiple times is safe
|
||||
// We use openlog to set the default syslog settings so that it's possible to allow switching syslog on and off
|
||||
openlog(syslog_ident, LOG_NDELAY | LOG_PID, LOG_DAEMON);
|
||||
- cs_log(">> OSCam << cardserver %s, version " CS_VERSION ", build r" CS_SVN_VERSION " (" CS_TARGET ")", starttext);
|
||||
+ cs_log(">> OSCam << cardserver %s, version " CS_VERSION ", build r" CS_SVN_VERSION " + EMU r" CS_EMU_VERSION " (" CS_TARGET ")", starttext);
|
||||
|
||||
return (fp <= (FILE *)0);
|
||||
}
|
12988
package/lean/dvb/oscam/patches/004-oscam_emu.patch
Normal file
12988
package/lean/dvb/oscam/patches/004-oscam_emu.patch
Normal file
File diff suppressed because it is too large
Load Diff
17
package/lean/dvb/tvheadend/Config.in
Normal file
17
package/lean/dvb/tvheadend/Config.in
Normal file
@ -0,0 +1,17 @@
|
||||
config TVHEADEND_NDMS_CWC_SUPPORT
|
||||
bool "NewCamd support"
|
||||
default y
|
||||
|
||||
config TVHEADEND_NDMS_LINUXDVB_SUPPORT
|
||||
bool "Linux DVB support"
|
||||
default y
|
||||
|
||||
config TVHEADEND_NDMS_DVBSCAN_SUPPORT
|
||||
bool "Fetch DVB-scan data"
|
||||
depends on TVHEADEND_NDMS_LINUXDVB_SUPPORT
|
||||
default TVHEADEND_NDMS_LINUXDVB_SUPPORT
|
||||
|
||||
config TVHEADEND_NDMS_AVAHI_SUPPORT
|
||||
bool "Avahi client support"
|
||||
select PACKAGE_libavahi-client
|
||||
default n
|
131
package/lean/dvb/tvheadend/Makefile
Normal file
131
package/lean/dvb/tvheadend/Makefile
Normal file
@ -0,0 +1,131 @@
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tvheadend
|
||||
PKG_VERSION:=4.2.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=c2a6b61d06ecf8c033f2f5be5746c146eb907d26
|
||||
# This is stable git version...
|
||||
# PKG_SOURCE_VERSION:=1a0262f5870e4fabd6b9c70a7bf2ebe420bc956e
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE.md
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
SHORT_GIT_VER:=$(shell echo $(PKG_SOURCE_VERSION) | cut -b -7)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/tvheadend
|
||||
SECTION:=multimedia
|
||||
CATEGORY:=Multimedia
|
||||
TITLE:=Tvheadend is a TV streaming server for Linux
|
||||
DEPENDS:=+libopenssl +librt +zlib +libpcre +libdvbcsa +TVHEADEND_AVAHI_SUPPORT:libavahi-client $(ICONV_DEPENDS)
|
||||
URL:=https://tvheadend.org
|
||||
MAINTAINER:=Jan Čermák <jan.cermak@nic.cz>
|
||||
endef
|
||||
|
||||
define Package/tvheadend/description
|
||||
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
|
||||
supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
|
||||
|
||||
Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
|
||||
endef
|
||||
|
||||
define Package/tvheadend/config
|
||||
menu "Configuration"
|
||||
depends on PACKAGE_tvheadend
|
||||
source "$(SOURCE)/Config.in"
|
||||
endmenu
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TVHEADEND_CWC_SUPPORT),)
|
||||
CONFIGURE_ARGS += --disable-cwc
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TVHEADEND_LINUXDVB_SUPPORT),)
|
||||
CONFIGURE_ARGS += --disable-linuxdvb
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TVHEADEND_DVBSCAN_SUPPORT),)
|
||||
CONFIGURE_ARGS += --disable-dvbscan
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TVHEADEND_AVAHI_SUPPORT),)
|
||||
CONFIGURE_ARGS += --disable-avahi
|
||||
else
|
||||
CONFIGURE_ARGS += --enable-avahi
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--arch=$(ARCH) \
|
||||
--disable-dbus_1 \
|
||||
--disable-libav \
|
||||
--enable-bundle \
|
||||
--enable-dvben50221 \
|
||||
--enable-tvhcsa \
|
||||
--enable-dvbcsa \
|
||||
--enable-inotify \
|
||||
--enable-epoll \
|
||||
--enable-trace \
|
||||
--nowerror \
|
||||
--disable-dvbscan \
|
||||
--disable-avahi \
|
||||
--disable-hdhomerun_static \
|
||||
--disable-pie \
|
||||
--disable-imagecache \
|
||||
--disable-ffmpeg_static \
|
||||
--disable-libx264 \
|
||||
--disable-libx264_static \
|
||||
--disable-libx265 \
|
||||
--disable-libx265_static \
|
||||
--disable-libvpx \
|
||||
--disable-libvpx_static \
|
||||
--disable-libtheora \
|
||||
--disable-libtheora_static \
|
||||
--disable-libvorbis \
|
||||
--disable-libvorbis_static \
|
||||
--disable-libfdkaac \
|
||||
--disable-libfdkaac_static \
|
||||
--disable-nvenc \
|
||||
--disable-libmfx_static \
|
||||
--disable-timeshift
|
||||
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
echo 'Tvheadend $(shell echo $(PKG_VERSION)~$(SHORT_GIT_VER)-$(PKG_RELEASE))' \
|
||||
> $(PKG_BUILD_DIR)/debian/changelog
|
||||
endef
|
||||
|
||||
define Package/conffiles
|
||||
/etc/config/tvheadend
|
||||
endef
|
||||
|
||||
define Package/tvheadend/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/tvheadend.init $(1)/etc/init.d/tvheadend
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/tvheadend.config $(1)/etc/config/tvheadend
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tvheadend))
|
13
package/lean/dvb/tvheadend/files/tvheadend.config
Normal file
13
package/lean/dvb/tvheadend/files/tvheadend.config
Normal file
@ -0,0 +1,13 @@
|
||||
#config tvheadend service
|
||||
# option nosyslog '0'
|
||||
# option use_temp_epgdb '0'
|
||||
# option config_path '/etc/tvheadend'
|
||||
|
||||
config tvheadend server
|
||||
option ipv6 '1'
|
||||
# option bindaddr '0.0.0.0'
|
||||
# option http_port '9981'
|
||||
# option http_root '/tvheadend'
|
||||
# option htsp_port '9982'
|
||||
# option htsp_port2 '9983'
|
||||
# option xspf '0'
|
71
package/lean/dvb/tvheadend/files/tvheadend.init
Normal file
71
package/lean/dvb/tvheadend/files/tvheadend.init
Normal file
@ -0,0 +1,71 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=00
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/bin/tvheadend
|
||||
|
||||
TEMP_CONFIG=/tmp/tvheadend
|
||||
PERSISTENT_CONFIG=/etc/tvheadend
|
||||
|
||||
execute_first_run() {
|
||||
"$PROG" -C "$1" -B -C -A >/dev/null 2>&1
|
||||
}
|
||||
|
||||
ensure_config_exists() {
|
||||
local config_path
|
||||
|
||||
config_load tvheadend
|
||||
config_get config_path service config_path
|
||||
|
||||
if [ -z "$config_path" ]; then
|
||||
[ -d "$PERSISTENT_CONFIG" ] || execute_first_run "$PERSISTENT_CONFIG"
|
||||
else
|
||||
# if the configuration directory is empty, empty config with grant-all ACL is created
|
||||
[ -d "$config_path" ] && [ "$(ls -A $config_path)" ] || execute_first_run "$config_path"
|
||||
fi
|
||||
|
||||
# if use_temp_epgdb is enabled (default), most of the config is put to config_path
|
||||
# (or /etc/config), except for epgdb.v2, which grows quite large and is write-heavy,
|
||||
# so it's put into volatile tmpfs
|
||||
# epgdb.v2 is created and symlinked to main config dir upon each start (if it doesn't exist)
|
||||
config_get_bool use_temp_epgdb service use_temp_epgdb 1
|
||||
if [ "$use_temp_epgdb" == "1" ]; then
|
||||
TEMP_EPG="${TEMP_CONFIG}/epgdb.v2"
|
||||
[ ! -f "$TEMP_EPG" ] && mkdir -p "$TEMP_CONFIG" && touch "$TEMP_EPG" && chmod 700 "$TEMP_EPG"
|
||||
[ -z "$config_path" ] && config_path="$PERSISTENT_CONFIG"
|
||||
ln -sf "$TEMP_EPG" "${config_path}/epgdb.v2"
|
||||
fi
|
||||
}
|
||||
|
||||
load_uci_config() {
|
||||
config_load tvheadend
|
||||
config_get config_path service config_path "$PERSISTENT_CONFIG"
|
||||
[ -n "$config_path" ] && procd_append_param command -c "$config_path"
|
||||
config_get_bool nosyslog service nosyslog 0
|
||||
[ "$nosyslog" -eq 1 ] && procd_append_param command --nosyslog
|
||||
config_get_bool ipv6 server ipv6 0
|
||||
[ "$ipv6" -eq 1 ] && procd_append_param command --ipv6
|
||||
config_get bindaddr server bindaddr
|
||||
[ -n "$bindaddr" ] && procd_append_param command --bindaddr "$bindaddr"
|
||||
config_get http_port server http_port
|
||||
[ -n "$http_port" ] && procd_append_param command --http_port "$http_port"
|
||||
config_get http_root server http_root
|
||||
[ -n "$http_root" ] && procd_append_param command --http_root "$http_root"
|
||||
config_get htsp_port server htsp_port
|
||||
[ -n "$htsp_port" ] && procd_append_param command --htsp_port "$htsp_port"
|
||||
config_get htsp_port2 server htsp_port2
|
||||
[ -n "$htsp_port2" ] && procd_append_param command --htsp_port "$htsp_port2"
|
||||
config_get xspf server xspf 0
|
||||
[ "$xspf" -eq 1 ] && procd_append_param command --xspf
|
||||
}
|
||||
|
||||
start_service() {
|
||||
ensure_config_exists
|
||||
procd_open_instance
|
||||
procd_set_param file /etc/config/tvheadend
|
||||
procd_set_param command "$PROG" -B -C
|
||||
load_uci_config
|
||||
procd_close_instance
|
||||
}
|
12
package/lean/dvb/tvheadend/patches/001-config.patch
Normal file
12
package/lean/dvb/tvheadend/patches/001-config.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ruN tvheadend.orig/Makefile tvheadend/Makefile
|
||||
--- tvheadend.orig/Makefile 2017-10-18 16:39:58.000000000 +0300
|
||||
+++ tvheadend/Makefile 2017-12-13 00:49:51.314127208 +0300
|
||||
@@ -52,7 +52,7 @@
|
||||
CFLAGS += -Wmissing-prototypes
|
||||
CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing
|
||||
CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
-CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
||||
+CFLAGS += -I ./vendor/dvb-api/5.10 -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
||||
ifeq ($(CONFIG_ANDROID),yes)
|
||||
LDFLAGS += -ldl -lm
|
||||
else
|
33
package/lean/dvb/tvheadend/patches/002-add-cflags.patch
Executable file
33
package/lean/dvb/tvheadend/patches/002-add-cflags.patch
Executable file
@ -0,0 +1,33 @@
|
||||
commit 511fddc480c11ba55c9078e54884b584430dc41e
|
||||
Author: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Fri Jan 19 10:20:17 2018 +0100
|
||||
|
||||
Makefile: Add CFLAGS for timestamp and bundle objects, fixes #4870
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f4b7deb..a6629bd 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -764,11 +764,11 @@ $(BUILDDIR)/timestamp.c: FORCE
|
||||
@echo 'const char* build_timestamp = "'$(BUILD_DATE)'";' >> $@
|
||||
|
||||
$(BUILDDIR)/timestamp.o: $(BUILDDIR)/timestamp.c
|
||||
- $(pCC) -c -o $@ $<
|
||||
+ $(pCC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/build.o: $(BUILDDIR)/build.c
|
||||
@mkdir -p $(dir $@)
|
||||
- $(pCC) -c -o $@ $<
|
||||
+ $(pCC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Documentation
|
||||
$(BUILDDIR)/docs-timestamp: $(I18N-DOCS) support/doc/md_to_c.py
|
||||
@@ -825,7 +825,7 @@ src/tvh_locale_inc.c: $(PO-FILES)
|
||||
# Bundle files
|
||||
$(BUILDDIR)/bundle.o: $(BUILDDIR)/bundle.c
|
||||
@mkdir -p $(dir $@)
|
||||
- $(pCC) -I${ROOTDIR}/src -c -o $@ $<
|
||||
+ $(pCC) $(CFLAGS) -I${ROOTDIR}/src -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/bundle.c: check_dvb_scan make_webui
|
||||
@mkdir -p $(dir $@)
|
314
package/lean/dvb/tvheadend/patches/006-satip_rtsp_fix.patch
Normal file
314
package/lean/dvb/tvheadend/patches/006-satip_rtsp_fix.patch
Normal file
@ -0,0 +1,314 @@
|
||||
diff -ruNp tvheadend.orig/src/http.c tvheadend/src/http.c
|
||||
--- tvheadend.orig/src/http.c 2018-02-22 22:16:01.000000000 +0300
|
||||
+++ tvheadend/src/http.c 2018-02-26 04:03:51.584188821 +0300
|
||||
@@ -1273,10 +1273,6 @@ process_request(http_connection_t *hc, h
|
||||
hc->hc_session = tvh_strdupa(v);
|
||||
else
|
||||
hc->hc_session = NULL;
|
||||
- if(hc->hc_cseq == 0) {
|
||||
- http_error(hc, HTTP_STATUS_BAD_REQUEST);
|
||||
- return -1;
|
||||
- }
|
||||
break;
|
||||
|
||||
case HTTP_VERSION_1_0:
|
||||
@@ -1336,10 +1332,7 @@ process_request(http_connection_t *hc, h
|
||||
case RTSP_VERSION_1_0:
|
||||
if (tvhtrace_enabled())
|
||||
dump_request(hc);
|
||||
- if (hc->hc_cseq)
|
||||
- rval = hc->hc_process(hc, spill);
|
||||
- else
|
||||
- http_error(hc, HTTP_STATUS_HTTP_VERSION);
|
||||
+ rval = hc->hc_process(hc, spill);
|
||||
break;
|
||||
|
||||
case HTTP_VERSION_1_0:
|
||||
diff -ruNp tvheadend.orig/src/http.h tvheadend/src/http.h
|
||||
--- tvheadend.orig/src/http.h 2018-02-22 22:16:01.000000000 +0300
|
||||
+++ tvheadend/src/http.h 2018-02-26 03:19:40.457467700 +0300
|
||||
@@ -162,6 +162,7 @@ typedef struct http_connection {
|
||||
|
||||
int hc_no_output;
|
||||
int hc_shutdown;
|
||||
+ int hc_stream;
|
||||
uint64_t hc_cseq;
|
||||
char *hc_session;
|
||||
|
||||
diff -ruNp tvheadend.orig/src/satip/rtsp.c tvheadend/src/satip/rtsp.c
|
||||
--- tvheadend.orig/src/satip/rtsp.c 2018-02-22 22:16:01.000000000 +0300
|
||||
+++ tvheadend/src/satip/rtsp.c 2018-02-26 19:07:59.113158089 +0300
|
||||
@@ -92,6 +92,13 @@ static pthread_mutex_t rtsp_lock;
|
||||
static void rtsp_close_session(session_t *rs);
|
||||
static void rtsp_free_session(session_t *rs);
|
||||
|
||||
+/*
|
||||
+ *
|
||||
+ */
|
||||
+static inline int rtsp_is_nat_active(void)
|
||||
+{
|
||||
+ return rtsp_nat_ip[0] != '\0';
|
||||
+}
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -280,9 +287,10 @@ rtsp_check_urlbase(char *u)
|
||||
if (strcmp(u, rtsp_ip)) {
|
||||
if (rtsp_nat_ip == NULL)
|
||||
return NULL;
|
||||
- if (rtsp_nat_ip[0] != '*')
|
||||
- if (rtsp_nat_ip[0] == '\0' || strcmp(u, rtsp_nat_ip))
|
||||
+ if (rtsp_is_nat_active()) {
|
||||
+ if (rtsp_nat_ip[0] != '*' && strcmp(u, rtsp_nat_ip))
|
||||
return NULL;
|
||||
+ }
|
||||
}
|
||||
return p ? p + 1 : u + strlen(u);
|
||||
}
|
||||
@@ -455,8 +463,7 @@ static void
|
||||
rtsp_manage_descramble(session_t *rs)
|
||||
{
|
||||
idnode_set_t *found;
|
||||
- mpegts_service_t *s, *snext;
|
||||
- mpegts_service_t *master = (mpegts_service_t *)rs->subs->ths_raw_service;
|
||||
+ mpegts_service_t *s, *master, *snext;
|
||||
slave_subscription_t *sub;
|
||||
mpegts_apids_t pmt_pids;
|
||||
size_t si;
|
||||
@@ -470,6 +477,8 @@ rtsp_manage_descramble(session_t *rs)
|
||||
if (rs->mux == NULL || rs->subs == NULL)
|
||||
goto end;
|
||||
|
||||
+ master = (mpegts_service_t *)rs->subs->ths_raw_service;
|
||||
+
|
||||
if (rs->pids.all) {
|
||||
LIST_FOREACH(s, &rs->mux->mm_services, s_dvb_mux_link)
|
||||
if (rtsp_validate_service(s, NULL))
|
||||
@@ -861,7 +870,7 @@ parse_pids(char *p, mpegts_apids_t *pids
|
||||
while (1) {
|
||||
if (x == NULL)
|
||||
break;
|
||||
- if (strcmp(x, "all") == 0) {
|
||||
+ if (strcmp(x, "all") == 0 || strcmp(x, "8192") == 0) {
|
||||
if (satip_server_conf.satip_restrict_pids_all) {
|
||||
pids->all = 0;
|
||||
for (pid = 1; pid <= 2; pid++) /* CAT, TSDT */
|
||||
@@ -907,7 +916,22 @@ parse_transport(http_connection_t *hc)
|
||||
if (a + 1 != b)
|
||||
return -1;
|
||||
return a;
|
||||
- } else if ((strncmp(s, "RTP/AVP/TCP;interleaved=0-1", 27) == 0) &&
|
||||
+ } else if (strncmp(s, "RTP/AVP/UDP;unicast;client_port=", 32) == 0) {
|
||||
+ for (s += 32, u = s; isdigit(*u); u++);
|
||||
+ if (*u != '-')
|
||||
+ return -1;
|
||||
+ a = atoi(s);
|
||||
+ for (s = ++u; isdigit(*s); s++);
|
||||
+ if (*s != '\0' && *s != ';')
|
||||
+ return -1;
|
||||
+ b = atoi(u);
|
||||
+ if (a + 1 != b)
|
||||
+ return -1;
|
||||
+ return a;
|
||||
+ } else if ((strncmp(s, "RTP/AVP/TCP;unicast;interleaved=0-1", 27) == 0) &&
|
||||
+ !satip_server_conf.satip_notcp_mode) {
|
||||
+ return RTSP_TCP_DATA;
|
||||
+ } else if ((strncmp(s, "RTP/AVP/TCP;interleaved=0-1", 35) == 0) &&
|
||||
!satip_server_conf.satip_notcp_mode) {
|
||||
return RTSP_TCP_DATA;
|
||||
}
|
||||
@@ -983,12 +1007,14 @@ rtsp_parse_cmd
|
||||
if (cmd == RTSP_CMD_SETUP) {
|
||||
if (!rs) {
|
||||
rs = rtsp_new_session(hc->hc_peer_ipstr, msys, 0, -1);
|
||||
+ if (rs == NULL) goto end;
|
||||
if (delsys == DVB_SYS_NONE) goto end;
|
||||
if (msys == DVB_SYS_NONE) goto end;
|
||||
if (!(*valid)) goto end;
|
||||
alloc_stream_id = 1;
|
||||
} else if (stream != rs->stream) {
|
||||
rs = rtsp_new_session(hc->hc_peer_ipstr, msys, rs->nsession, stream);
|
||||
+ if (rs == NULL) goto end;
|
||||
if (delsys == DVB_SYS_NONE) goto end;
|
||||
if (msys == DVB_SYS_NONE) goto end;
|
||||
if (!(*valid)) goto end;
|
||||
@@ -1017,6 +1043,8 @@ rtsp_parse_cmd
|
||||
rs->rtp_peer_port = r;
|
||||
rs->frontend = fe > 0 ? fe : 1;
|
||||
} else {
|
||||
+ if (!rs && !stream && cmd == RTSP_CMD_DESCRIBE)
|
||||
+ rs = rtsp_new_session(hc->hc_peer_ipstr, msys, 0, -1);
|
||||
if (!rs || stream != rs->stream) {
|
||||
if (rs)
|
||||
errcode = HTTP_STATUS_NOT_FOUND;
|
||||
@@ -1187,6 +1215,12 @@ play:
|
||||
if (mpegts_pid_dump(&rs->pids, buf + r, sizeof(buf) - r, 0, 0) == 0)
|
||||
tvh_strlcatf(buf, sizeof(buf), r, "<none>");
|
||||
|
||||
+ if (cmd == RTSP_CMD_DESCRIBE) {
|
||||
+ hc->hc_session = rs->session;
|
||||
+ if (!rs->stream)
|
||||
+ rs->stream = 1;
|
||||
+ hc->hc_stream = rs->stream;
|
||||
+ }
|
||||
tvhdebug(LS_SATIPS, "%i/%s/%d: %s from %s:%d %s",
|
||||
rs->frontend, rs->session, rs->stream,
|
||||
caller, hc->hc_peer_ipstr, ntohs(IP_PORT(*hc->hc_peer)), buf);
|
||||
@@ -1294,7 +1328,8 @@ rtsp_describe_session(session_t *rs, hts
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
- htsbuf_qprintf(q, "a=control:stream=%d\r\n", rs->stream);
|
||||
+ if (rs->stream > 0)
|
||||
+ htsbuf_qprintf(q, "a=control:stream=%d\r\n", rs->stream);
|
||||
htsbuf_append_str(q, "a=tool:tvheadend\r\n");
|
||||
htsbuf_append_str(q, "m=video 0 RTP/AVP 33\r\n");
|
||||
if (strchr(rtsp_ip, ':'))
|
||||
@@ -1311,6 +1346,20 @@ rtsp_describe_session(session_t *rs, hts
|
||||
}
|
||||
}
|
||||
|
||||
+static inline const char *
|
||||
+rtsp_conn_ip(http_connection_t *hc, char *buf, size_t buflen, int *port)
|
||||
+{
|
||||
+ const char *used_ip = rtsp_ip;
|
||||
+ int used_port = rtsp_port;
|
||||
+
|
||||
+ if (hc && hc->hc_self)
|
||||
+ used_ip = tcp_get_str_from_ip(hc->hc_self, buf, buflen);
|
||||
+
|
||||
+ *port = used_port > 0 ? used_port : 554;
|
||||
+
|
||||
+ return used_ip;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
*
|
||||
*/
|
||||
@@ -1322,9 +1371,10 @@ rtsp_process_describe(http_connection_t
|
||||
char *u = tvh_strdupa(hc->hc_url);
|
||||
session_t *rs;
|
||||
htsbuf_queue_t q;
|
||||
- char buf[96];
|
||||
+ char buf[96], buf1[46];
|
||||
+ const char *used_ip = NULL;
|
||||
int r = HTTP_STATUS_BAD_REQUEST;
|
||||
- int stream, first = 1, valid;
|
||||
+ int stream, first = 1, valid, used_port;
|
||||
|
||||
htsbuf_queue_init(&q, 0);
|
||||
|
||||
@@ -1381,10 +1431,15 @@ rtsp_process_describe(http_connection_t
|
||||
http_arg_init(&args);
|
||||
if (hc->hc_session)
|
||||
http_arg_set(&args, "Session", hc->hc_session);
|
||||
- if (stream > 0)
|
||||
- snprintf(buf, sizeof(buf), "rtsp://%s/stream=%i", rtsp_ip, stream);
|
||||
+ used_ip = rtsp_conn_ip(hc, buf1, sizeof(buf1), &used_port);
|
||||
+ if ((stream > 0) && (used_port != 554))
|
||||
+ snprintf(buf, sizeof(buf), "rtsp://%s:%d/stream=%i", used_ip, used_port, stream);
|
||||
+ else if ((stream > 0) && (used_port == 554))
|
||||
+ snprintf(buf, sizeof(buf), "rtsp://%s/stream=%i", used_ip, stream);
|
||||
+ else if (used_port != 554)
|
||||
+ snprintf(buf, sizeof(buf), "rtsp://%s:%d", used_ip, used_port);
|
||||
else
|
||||
- snprintf(buf, sizeof(buf), "rtsp://%s", rtsp_ip);
|
||||
+ snprintf(buf, sizeof(buf), "rtsp://%s", used_ip);
|
||||
http_arg_set(&args, "Content-Base", buf);
|
||||
http_send_begin(hc);
|
||||
http_send_header(hc, HTTP_STATUS_OK, "application/sdp", q.hq_size,
|
||||
@@ -1408,8 +1463,9 @@ static int
|
||||
rtsp_process_play(http_connection_t *hc, int cmd)
|
||||
{
|
||||
session_t *rs;
|
||||
- int errcode = HTTP_STATUS_BAD_REQUEST, valid = 0, i, stream;
|
||||
- char buf[256], *u = tvh_strdupa(hc->hc_url);
|
||||
+ int errcode = HTTP_STATUS_BAD_REQUEST, valid = 0, i, stream, used_port;
|
||||
+ char buf[256], buf1[46], *u = tvh_strdupa(hc->hc_url);
|
||||
+ const char *used_ip = NULL;
|
||||
http_arg_list_t args;
|
||||
|
||||
http_arg_init(&args);
|
||||
@@ -1417,7 +1473,9 @@ rtsp_process_play(http_connection_t *hc,
|
||||
if ((u = rtsp_check_urlbase(u)) == NULL)
|
||||
goto error2;
|
||||
|
||||
- if ((stream = rtsp_parse_args(hc, u)) < 0)
|
||||
+/* if ((stream = rtsp_parse_args(hc, u)) < 0) */
|
||||
+ stream = hc->hc_stream;
|
||||
+ if (stream < 0)
|
||||
goto error2;
|
||||
|
||||
pthread_mutex_lock(&rtsp_lock);
|
||||
@@ -1467,10 +1525,11 @@ rtsp_process_play(http_connection_t *hc,
|
||||
snprintf(buf, sizeof(buf), "%d", rs->stream);
|
||||
http_arg_set(&args, "com.ses.streamID", buf);
|
||||
} else {
|
||||
- if (rtsp_port != 554)
|
||||
- snprintf(buf, sizeof(buf), "url=rtsp://%s:%d/stream=%d", rtsp_ip, rtsp_port, rs->stream);
|
||||
+ used_ip = rtsp_conn_ip(hc, buf1, sizeof(buf1), &used_port);
|
||||
+ if (used_port != 554)
|
||||
+ snprintf(buf, sizeof(buf), "url=rtsp://%s:%d/stream=%d", used_ip, used_port, rs->stream);
|
||||
else
|
||||
- snprintf(buf, sizeof(buf), "url=rtsp://%s/stream=%d", rtsp_ip, rs->stream);
|
||||
+ snprintf(buf, sizeof(buf), "url=rtsp://%s/stream=%d", used_ip, rs->stream);
|
||||
http_arg_set(&args, "RTP-Info", buf);
|
||||
}
|
||||
|
||||
@@ -1587,9 +1646,39 @@ static void
|
||||
rtsp_stream_status ( void *opaque, htsmsg_t *m )
|
||||
{
|
||||
http_connection_t *hc = opaque;
|
||||
+ struct session *rs = NULL;
|
||||
+ htsmsg_t *c, *tcp = NULL, *udp = NULL;
|
||||
+ int udpport, s32;
|
||||
+
|
||||
htsmsg_add_str(m, "type", "SAT>IP");
|
||||
+
|
||||
if (hc->hc_username)
|
||||
htsmsg_add_str(m, "user", hc->hc_username);
|
||||
+
|
||||
+ TAILQ_FOREACH(rs, &rtsp_sessions, link) {
|
||||
+ if (hc->hc_session &&
|
||||
+ strcmp(rs->session, hc->hc_session) == 0 &&
|
||||
+ strcmp(rs->peer_ipstr, hc->hc_peer_ipstr) == 0 &&
|
||||
+ (udpport = rs->rtp_peer_port) > 0) {
|
||||
+ if (udpport == RTSP_TCP_DATA) {
|
||||
+ if (rs->tcp_data == hc) {
|
||||
+ s32 = htsmsg_get_s32_or_default(m, "peer_port", -1);
|
||||
+ if (!tcp) tcp = htsmsg_create_list();
|
||||
+ htsmsg_add_s32(tcp, NULL, s32);
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (!udp) udp = htsmsg_create_list();
|
||||
+ htsmsg_add_s32(udp, NULL, udpport);
|
||||
+ htsmsg_add_s32(udp, NULL, udpport+1);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (tcp || udp) {
|
||||
+ c = htsmsg_create_map();
|
||||
+ if (tcp) htsmsg_add_msg(c, "tcp", tcp);
|
||||
+ if (udp) htsmsg_add_msg(c, "udp", udp);
|
||||
+ htsmsg_add_msg(m, "peer_extra_ports", c);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1621,6 +1710,7 @@ rtsp_serve(int fd, void **opaque, struct
|
||||
hc.hc_peer = peer;
|
||||
hc.hc_self = self;
|
||||
hc.hc_process = rtsp_process_request;
|
||||
+ hc.hc_stream = -1;
|
||||
hc.hc_cseq = 1;
|
||||
|
||||
http_serve_requests(&hc);
|
||||
@@ -1655,7 +1745,7 @@ rtsp_close_session(session_t *rs)
|
||||
rs->tcp_data = NULL;
|
||||
pthread_mutex_lock(&global_lock);
|
||||
mpegts_pid_reset(&rs->pids);
|
||||
- rtsp_clean(rs, 1);
|
||||
+ rtsp_clean(rs, 0);
|
||||
mtimer_disarm(&rs->timer);
|
||||
pthread_mutex_unlock(&global_lock);
|
||||
}
|
10
package/lean/dvb/tvheadend/patches/008-delete-docs.patch
Normal file
10
package/lean/dvb/tvheadend/patches/008-delete-docs.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/Makefile 2018-03-22 02:51:32.000000000 +0800
|
||||
+++ b/Makefile 2018-03-23 18:31:08.010773484 +0800
|
||||
@@ -834,6 +834,7 @@
|
||||
$(pCC) $(CFLAGS) -I${ROOTDIR}/src -c -o $@ $<
|
||||
|
||||
$(BUILDDIR)/bundle.c: $(DVBSCAN-yes) make_webui
|
||||
+ find src/webui/static/img/doc/ -delete
|
||||
@mkdir -p $(dir $@)
|
||||
$(pMKBUNDLE) -o $@ -d ${BUILDDIR}/bundle.d $(BUNDLE_FLAGS) $(BUNDLES:%=$(ROOTDIR)/%)
|
||||
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI for OSCAM
|
||||
LUCI_DEPENDS:=+oscam
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
module("luci.controller.admin.sattv", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
-- entry({"admin", "Others"}, cbi("sattv/epg"), i18n("Others"), 70)
|
||||
|
||||
if nixio.fs.access("/etc/config/epg") then
|
||||
entry({"admin", "Others"}, cbi("sattv/epg"), _("sattv"), 66).index = true
|
||||
entry({"admin", "Others", "epg"}, cbi("sattv/epg"), _("EPG"), 1).i18n = "diskapply"
|
||||
end
|
||||
|
||||
if nixio.fs.access("/etc/config/oscam") then
|
||||
entry({"admin", "Others", "oscam"}, cbi("sattv/oscam"), _("OSCAM"), 12).i18n = "diskapply"
|
||||
end
|
||||
|
||||
end
|
@ -1,50 +0,0 @@
|
||||
require("luci.tools.webadmin")
|
||||
|
||||
--[[
|
||||
config epg_set
|
||||
option enable 1
|
||||
option time 30
|
||||
option src_url http://dm.epg.net.cn/a/epg.xml
|
||||
option src_url1 http://dm1.epg.net.cn/a/epg.xml
|
||||
option src_url2 http://epg.xltvrobbs.net/atmosphere/epg/epg.xml
|
||||
option src_url3 http://epg1.xltvrobbs.net/atmosphere/epg/epg.xml
|
||||
|
||||
]]--
|
||||
|
||||
|
||||
m = Map("epg", translate("epg_title","Set epg download address"),translate("epg_desc",
|
||||
"Set epg auto download for dm500 atmosphere"))
|
||||
|
||||
s = m:section(TypedSection, "epg_set", translate("epgset","settings"))
|
||||
s.anonymous = true
|
||||
s.addremove = false
|
||||
|
||||
enable = s:option(Flag, "enable", translate("enable", "enable"))
|
||||
enable.default = false
|
||||
enable.optional = false
|
||||
enable.rmempty = false
|
||||
|
||||
interval = s:option(Value, "interval", translate("interval","interval"))
|
||||
interval.default = 30
|
||||
interval.optional = false
|
||||
interval.rmempty = false
|
||||
|
||||
|
||||
s = m:section(TypedSection, "downaddress", translate("downaddress","downaddress"))
|
||||
s.template = "cbi/tblsection"
|
||||
s.anonymous = false
|
||||
s.addremove = true
|
||||
|
||||
enable = s:option(Flag, "addr_enable", translate("enable", "enable"))
|
||||
enable.default = false
|
||||
enable.optional = false
|
||||
enable.rmempty = false
|
||||
|
||||
|
||||
url = s:option(Value, "address", translate("dowload address","dowload address"))
|
||||
url.optional = false
|
||||
url.rmempty = false
|
||||
|
||||
|
||||
return m
|
||||
|
@ -1,67 +0,0 @@
|
||||
--[[
|
||||
LuCI - Lua Configuration Interface
|
||||
|
||||
Copyright 2011 flyzjhz <flyzjhz@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
]]--
|
||||
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
local lanipaddr = uci:get("network", "lan", "ipaddr") or "192.168.1.1"
|
||||
--- Retrieves the output of the "get_oscam_port" command.
|
||||
-- @return String containing the current get_oscam_port
|
||||
function get_oscam_port()
|
||||
|
||||
local oscam_conf= fs.readfile("/usr/oscam/oscam.conf")
|
||||
local oscam_conf_port = tonumber(oscam_conf:match("[Hh]ttppor[Tt].-= ([^\n]+)")) or "8899"
|
||||
return oscam_conf_port
|
||||
end
|
||||
|
||||
local oscamport = get_oscam_port()
|
||||
|
||||
m = Map("oscam", translate("OSCAM","OSCAM"),translate("oscam desc",
|
||||
"oscam for openwrt"))
|
||||
|
||||
s = m:section(TypedSection, "setting", translate("set","settings"))
|
||||
s.anonymous = true
|
||||
s.addremove = false
|
||||
|
||||
enable = s:option(Flag, "enable", translate("enable", "enable"))
|
||||
enable.default = false
|
||||
enable.optional = false
|
||||
enable.rmempty = false
|
||||
|
||||
interval = s:option(Value, "interval", translate("interval","interval"),
|
||||
translate("interval_desc","interval_desc"))
|
||||
interval.optional = false
|
||||
interval.rmempty = false
|
||||
interval.default = 30
|
||||
|
||||
s:option(DummyValue,"oscamweb" ,translate("<a target=\"_blank\" href='http://"..lanipaddr..":"..oscamport.."'>OSCAM Web Intelface</a> "),translate("Open the oscam Web"))
|
||||
|
||||
tmpl = s:option(Value, "_tmpl",
|
||||
translate("Edit oscam configuration."),
|
||||
translate("This is the content of the file '/usr/oscam/oscam.conf'"))
|
||||
|
||||
tmpl.template = "cbi/tvalue"
|
||||
tmpl.rows = 20
|
||||
|
||||
function tmpl.cfgvalue(self, section)
|
||||
return nixio.fs.readfile("/usr/oscam/oscam.conf")
|
||||
end
|
||||
|
||||
function tmpl.write(self, section, value)
|
||||
value = value:gsub("\r\n?", "\n")
|
||||
nixio.fs.writefile("//usr/oscam/oscam.conf", value)
|
||||
end
|
||||
|
||||
return m
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
|
||||
config 'epg_set'
|
||||
option 'enable' '0'
|
||||
option 'interval' '30'
|
||||
|
||||
config 'downaddress' 'epg1'
|
||||
option 'addr_enable' '1'
|
||||
option 'address' 'http://dm.epg.net.cn/a/epg.xml'
|
||||
|
||||
config 'downaddress' 'epg2'
|
||||
option 'addr_enable' '1'
|
||||
option 'address' 'http://epg.xltvrobbs.net/atmosphere/epg/epg.xml'
|
||||
|
@ -1,4 +0,0 @@
|
||||
|
||||
config 'setting'
|
||||
option 'enable' '0'
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# copyrights
|
||||
# (1)epg dowload Script VER 0.10for openwrt by zjhzzyf
|
||||
|
||||
|
||||
|
||||
START=96
|
||||
|
||||
|
||||
|
||||
start(){
|
||||
|
||||
|
||||
/usr/bin/epg start
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "not implemented yet!"
|
||||
}
|
||||
|
||||
restart() {
|
||||
start
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# oscam Script VER 0.10 for openwrt by zjhzzyf
|
||||
|
||||
START=94
|
||||
|
||||
. /etc/functions.sh
|
||||
path="/usr/oscam/"
|
||||
|
||||
|
||||
kill_oscam()
|
||||
{
|
||||
local otherpids
|
||||
local execute
|
||||
otherpids=$(ps -a 2>&1 | grep "/usr/bin/oscam" | grep -v $$ | awk -F " " '{print $1}')
|
||||
echo "$otherpids" | while read execute
|
||||
do
|
||||
kill -9 ${execute}
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
oscam_start()
|
||||
{
|
||||
|
||||
/usr/bin/oscam -b -c $path
|
||||
echo "readdy go....."
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
start(){
|
||||
echo "game start....."
|
||||
enable=$(uci get oscam.@setting[0].enable)
|
||||
if [ "$enable" == "" ];then
|
||||
enable=0
|
||||
fi
|
||||
|
||||
[ "$enable" == "1" ]&&oscam_start
|
||||
|
||||
interval=$(uci get oscam.@setting[0].interval)
|
||||
oscam_cron=`cat /etc/crontabs/root | grep "/etc/init.d/oscam restart"`
|
||||
if [ "$enable" == "1" -a "$interval" != "0" ]; then
|
||||
oscam_new="*/${interval} * * * * /etc/init.d/oscam restart"
|
||||
if [ "z${oscam_cron}" != "z${oscam_new}" ] ; then
|
||||
cat /etc/crontabs/root | grep -v "/etc/init.d/oscam restart" > /tmp/crontabs_oscam
|
||||
echo "" >> /tmp/crontabs_oscam
|
||||
echo "*/${interval} * * * * /etc/init.d/oscam restart" >> /tmp/crontabs_oscam
|
||||
cat /tmp/crontabs_oscam | grep -v ^$ > /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
else
|
||||
if [ "z${oscam_cron}" != "z" ] ; then
|
||||
cat /etc/crontabs/root | grep -v "/etc/init.d/oscam restart" > /tmp/crontabs_oscam
|
||||
cat /tmp/crontabs_oscam | grep -v ^$ > /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
|
||||
fi
|
||||
rm -f /tmp/crontabs_oscam
|
||||
|
||||
}
|
||||
|
||||
stop() {
|
||||
kill_oscam
|
||||
echo "oscam stopped"
|
||||
}
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
# oscam.conf generated automatically by Streamboard OSCAM 1.00-unstable_svn build #r4503
|
||||
# Read more: http://streamboard.gmc.to/oscam/browser/trunk/Distribution/doc/txt/oscam.conf.txt
|
||||
|
||||
[global]
|
||||
logfile = /dev/shm/oscam.log
|
||||
disablelog = 1
|
||||
clientmaxidle = 36000
|
||||
bindwait = 5
|
||||
netprio = 9
|
||||
nice = 9
|
||||
waitforcards = 0
|
||||
lb_mode = 1
|
||||
|
||||
[monitor]
|
||||
port = 9988
|
||||
nocrypt =
|
||||
aulow = 120
|
||||
hideclient_to = 0
|
||||
monlevel = 255
|
||||
appendchaninfo = 0
|
||||
|
||||
[dvbapi]
|
||||
enabled = 1
|
||||
au = 1
|
||||
boxtype = none
|
||||
user = user1
|
||||
pmt_mode = 0
|
||||
request_mode = 0
|
||||
|
||||
[webif]
|
||||
httpport = 8899
|
||||
httpuser = oscam
|
||||
httppwd = oscam
|
||||
httprefresh = 0
|
||||
httpallowed = 1.0.0.0-255.255.0.0
|
||||
httphideidleclients = 0
|
||||
httpreadonly = 0
|
||||
httpsavefullcfg = 0
|
||||
|
@ -1,28 +0,0 @@
|
||||
# oscam.server generated automatically by Streamboard OSCAM 1.00-unstable_svn build #r4503
|
||||
# Read more: http://streamboard.gmc.to/oscam/browser/trunk/Distribution/doc/txt/oscam.server.txt
|
||||
|
||||
[reader]
|
||||
label = reshare1
|
||||
enable = 0
|
||||
protocol = cccam
|
||||
device = oscam.3322.org,13111
|
||||
user = test01
|
||||
password = test01
|
||||
inactivitytimeout = 1
|
||||
reconnecttimeout = 3
|
||||
group = 1
|
||||
blockemm-unknown = 1
|
||||
blockemm-u = 1
|
||||
blockemm-s = 1
|
||||
blockemm-g = 1
|
||||
lb_weight = 100
|
||||
cccversion = 2.1.2
|
||||
cccmaxhops = 12
|
||||
ccckeepalive = 1
|
||||
audisabled = 1
|
||||
cccdisableautoblock = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
[account]
|
||||
user = 001
|
||||
pwd = 001
|
||||
group = 1
|
||||
keepalive = 1
|
||||
uniq = 0
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@epg[-1]
|
||||
add ucitrack epg
|
||||
set ucitrack.@epg[-1].init=epg
|
||||
delete ucitrack.@oscam[-1]
|
||||
add ucitrack oscam
|
||||
set ucitrack.@oscam[-1].init=oscam
|
||||
add_list ucitrack.@oscam[-1].affects=cron
|
||||
commit ucitrack
|
||||
EOF
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
@ -1,199 +0,0 @@
|
||||
#!/bin/sh
|
||||
# copyrights
|
||||
# (1)epg dowload Script VER 0.10for openwrt by zjhzzyf
|
||||
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
|
||||
epg_down()
|
||||
{
|
||||
bsuc=1
|
||||
echo "File Path:"$path
|
||||
filename="epg.xml"
|
||||
echo "Setup FileName:"$filename
|
||||
sfullfilename=`echo $path$filename`
|
||||
echo "sFullFileName:"$sfullfilename
|
||||
|
||||
index=0
|
||||
echo "Try Times Max:"$trytimes
|
||||
while [ "$index" -lt "$trytimes" ]
|
||||
do
|
||||
echo "Try Times:"$index
|
||||
if wget -qO- -t3 $url > $sfullfilename;then
|
||||
break
|
||||
fi
|
||||
index=`expr $index + 1`
|
||||
done
|
||||
if [ "$index" -eq "$trytimes" ]; then
|
||||
ErrMsg=`date`
|
||||
ErrMsg=$ErrMsg" 下载配置文件失败"
|
||||
bsuc=0
|
||||
return
|
||||
fi
|
||||
echo "down $filename completed"
|
||||
mfullfilename=`echo ${path}store/${filename}.md5`
|
||||
echo "MD5 File Name:"$mfullfilename
|
||||
md5old=`cat $mfullfilename`
|
||||
md5old=`echo $md5old|awk '{print $1}'|tr "[a-z]" "[A-Z]"`
|
||||
echo "Old File MD5:"$md5old
|
||||
md5new=`/usr/bin/md5sum $sfullfilename`
|
||||
md5new=`echo $md5new|awk '{print $1}'|tr "[a-z]" "[A-Z]"`
|
||||
echo "New File MD5:"$md5new
|
||||
if [ "$md5old" = "$md5new" ]; then
|
||||
ErrMsg=`date`
|
||||
ErrMsg=$ErrMsg" 数据不需要更新"
|
||||
bsuc=1
|
||||
return
|
||||
else
|
||||
|
||||
counttimes=0
|
||||
suctimes=0
|
||||
counttimes=`expr $counttimes + 1`
|
||||
url=$(grep -m 1 "URL" $sfullfilename |awk -F "<URL>" '{print $2}'|awk -F "</URL>" '{print $1}')
|
||||
echo "Down Data URL:" $url
|
||||
|
||||
filename=`echo ${url##*/}`
|
||||
echo "Down File Name:"$filename
|
||||
|
||||
echo "====="
|
||||
echo $url
|
||||
replaces=`echo ${url%/*}`
|
||||
|
||||
replaces=`echo ${replaces#*//}`
|
||||
|
||||
echo replaces: $replaces
|
||||
echo -e `sed -e "s#$replaces#$replaced#g" $sfullfilename` > `echo $sfullfilename`
|
||||
echo "====="
|
||||
|
||||
dfullfilename=`echo $path$filename`
|
||||
echo "Down Data Save File Name:"$dfullfilename
|
||||
|
||||
index=0
|
||||
while [ "$index" -lt "$trytimes" ]
|
||||
do
|
||||
echo "Try Times:"$index
|
||||
if wget -t3 -T120 -qO- $url > $dfullfilename;then
|
||||
suctimes=`expr $suctimes + 1`
|
||||
|
||||
break
|
||||
fi
|
||||
index=`expr $index + 1`
|
||||
|
||||
done
|
||||
|
||||
if [ "$index" -eq "$trytimes" ]; then
|
||||
bsuc=0
|
||||
ErrMsg=`date`
|
||||
ErrMsg=$ErrMsg" 下载"$url"失败"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$counttimes" -eq "$suctimes" ]; then
|
||||
echo $md5new > `echo $mfullfilename`
|
||||
|
||||
mount -o bind /tmp/epg/ /www/atmosphere
|
||||
rm -rf ${path}/epg/*
|
||||
|
||||
cp ${path}$filename ${path}/epg
|
||||
cp ${path}epg.xml ${path}/epg
|
||||
rm -rf ${path}$filename
|
||||
rm -rf ${path}epg.xml
|
||||
ErrMsg=`date`
|
||||
ErrMsg=$ErrMsg" 下载EPG数据成功"
|
||||
echo $ErrMsg
|
||||
exit 0
|
||||
else
|
||||
ErrMsg=`date`
|
||||
ErrMsg= $ErrMsg " 未知原因失败"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
epg_start() {
|
||||
|
||||
config_get enable $1 enable
|
||||
config_get interval $1 interval
|
||||
[ "$enable" = "" ]&&enable=0
|
||||
|
||||
#make scheduler
|
||||
|
||||
epg_cron=`cat /etc/crontabs/root | grep "/usr/bin/epg scheduler"`
|
||||
if [ "$enable" == "1" -a "${interval}" != "0" ]; then
|
||||
mkdir -p /tmp/epg/
|
||||
mkdir -p /tmp/epg/store
|
||||
mkdir -p /tmp/epg/epg
|
||||
mkdir -p /www/atmosphere
|
||||
epg_new="*/${interval} * * * * /usr/bin/epg scheduler"
|
||||
if [ "z${epg_cron}" != "z${epg_new}" ] ; then
|
||||
cat /etc/crontabs/root | grep -v "/etc/init.d/epg scheduler" > /tmp/crontabs_epg
|
||||
echo "*/${interval} * * * * /etc/init.d/epg scheduler" >> /tmp/crontabs_epg
|
||||
echo "" >> /tmp/crontabs_epg
|
||||
cat /tmp/crontabs_epg | grep -v ^$ > /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
else
|
||||
if [ "z${epg_cron}" != "z" ] ; then
|
||||
cat /etc/crontabs/root | grep -v "/etc/init.d/epg scheduler" > /tmp/crontabs_epg
|
||||
cat /tmp/crontabs_epg | grep -v ^$ > /etc/crontabs/root
|
||||
/etc/init.d/cron restart
|
||||
fi
|
||||
rm -f /tmp/crontabs_epg
|
||||
|
||||
fi
|
||||
|
||||
/etc/init.d/cron restart
|
||||
|
||||
}
|
||||
|
||||
|
||||
con_get_addr(){
|
||||
|
||||
config_get addr_enable $1 addr_enable
|
||||
config_get address $1 address
|
||||
|
||||
[ "$addr_enable" == "1" ]&&{
|
||||
url=$address
|
||||
echo $url
|
||||
ErrMsg=`date`
|
||||
ErrMsg=$ErrMsg" 开始从"$url"下载"
|
||||
echo $ErrMsg >> `echo /tmp/epglog.txt`
|
||||
rm `echo $path"*"`
|
||||
epg_down
|
||||
echo $ErrMsg >> `echo /tmp/epglog.txt`
|
||||
echo $bsuc
|
||||
echo "******************************************************************" >> `echo /tmp/epglog.txt`
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
epg_scheduler(){
|
||||
|
||||
path="/tmp/epg/"
|
||||
trytimes=3
|
||||
bsuc=1
|
||||
ErrMsg=""
|
||||
lan_ipaddr=$(uci get network.lan.ipaddr)
|
||||
replaced="${lan_ipaddr}/atmosphere/epg"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
config_load epg
|
||||
case "$1" in
|
||||
start)
|
||||
config_foreach epg_start epg_set
|
||||
;;
|
||||
stop)
|
||||
echo "stop test "
|
||||
;;
|
||||
scheduler)
|
||||
epg_scheduler
|
||||
config_foreach con_get_addr downaddress
|
||||
;;
|
||||
esac
|
||||
|
@ -1,37 +0,0 @@
|
||||
[global]
|
||||
# Prozess
|
||||
nice = -10
|
||||
pidfile = /tmp/oscam.pid
|
||||
# Logging
|
||||
logfile = /tmp/oscam.log
|
||||
disablelog = 0
|
||||
maxlogsize = 256
|
||||
usrfile = /tmp/oscam_user.log
|
||||
disableuserfile = 0
|
||||
usrfileflag = 1
|
||||
# Timeouts - If you have problems adjust or remove rows!
|
||||
clienttimeout = 2000
|
||||
fallbacktimeout = 1000
|
||||
serialreadertimeout = 800
|
||||
# Sonstiges
|
||||
clientdyndns = 0
|
||||
unlockparental = 1
|
||||
saveinithistory = 1
|
||||
|
||||
[monitor]
|
||||
port = 15990
|
||||
nocrypt = 127.0.0.1,192.168.1.1-192.168.1.255 # "No entry for other IP's!"
|
||||
aulow = 30
|
||||
hideclient_to = 0
|
||||
monlevel = 4
|
||||
appendchaninfo = 0
|
||||
|
||||
[camd35]
|
||||
port = 15991
|
||||
|
||||
[webif]
|
||||
httpport = 16000
|
||||
httprefresh = 0
|
||||
httpallowed = 127.0.0.1,192.168.1.1-192.168.1.255 # "No entry for other IP's!"
|
||||
httphideidleclients = 0
|
||||
httpreadonly = 0
|
@ -1,240 +0,0 @@
|
||||
menu "OSCam build options"
|
||||
depends on PACKAGE_oscam
|
||||
|
||||
|
||||
config OSCAM_USE_LIBCRYPTO
|
||||
bool "Build with OpenSSL libcrypto"
|
||||
help
|
||||
"Use OpenSSL libcrypto instead of OSCam internal crypto functions"
|
||||
default n
|
||||
|
||||
config OSCAM_USE_LIBUSB
|
||||
bool "Build with libusb"
|
||||
default n
|
||||
|
||||
|
||||
menu "Protocols"
|
||||
depends on PACKAGE_oscam
|
||||
|
||||
config OSCAM_MODULE_CAMD33
|
||||
bool "camd 3.3"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_CAMD35
|
||||
bool "camd 3.5 UDP"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_CAMD35_TCP
|
||||
bool "camd 3.5 TCP"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_NEWCAMD
|
||||
bool "newcamd"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_CCCAM
|
||||
bool "CCcam"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_CCCSHARE
|
||||
bool "CCcam share"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_GBOX
|
||||
bool "gbox"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_RADEGAST
|
||||
bool "radegast"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_SERIAL
|
||||
bool "Serial"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_CONSTCW
|
||||
bool "constant CW"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_PANDORA
|
||||
bool "Pandora"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_GHTTP
|
||||
bool "Ghttp"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_SCAM
|
||||
bool "scam"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Readers"
|
||||
depends on PACKAGE_oscam
|
||||
|
||||
config OSCAM_READER_NAGRA
|
||||
bool "Nagravision"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_IRDETO
|
||||
bool "Irdeto"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_CONAX
|
||||
bool "Conax"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_CRYPTOWORKS
|
||||
bool "Cryptoworks"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_SECA
|
||||
bool "Seca"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_VIACCESS
|
||||
bool "Viaccess"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_VIDEOGUARD
|
||||
bool "NDS Videoguard"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_DRE
|
||||
bool "DRE Crypt"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_TONGFANG
|
||||
bool "Tongfang"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_BULCRYPT
|
||||
bool "Bulcrypt"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_GRIFFIN
|
||||
bool "Griffin"
|
||||
default n
|
||||
|
||||
config OSCAM_READER_DGCRYPT
|
||||
bool "DGCrypt"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Card readers"
|
||||
depends on PACKAGE_oscam
|
||||
|
||||
config OSCAM_USE_PCSC
|
||||
bool "PCSC"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
config OSCAM_CARDREADER_PHOENIX
|
||||
bool "Phoenix/mouse"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
config OSCAM_CARDREADER_SC8IN1
|
||||
bool "SC8in1"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
config OSCAM_CARDREADER_MP35
|
||||
bool "AD-Teknik MP 3.6/USB Phoenix"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
config OSCAM_CARDREADER_SMARGO
|
||||
bool "Argolis Smargo Smartreader"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
config OSCAM_CARDREADER_STINGER
|
||||
bool "STINGER"
|
||||
select OSCAM_USE_LIBUSB
|
||||
default n
|
||||
|
||||
endmenu
|
||||
|
||||
comment "Addons"
|
||||
config OSCAM_HAVE_DVBAPI
|
||||
bool "DVB API"
|
||||
default y
|
||||
|
||||
config OSCAM_READ_SDT_CHARSETS
|
||||
bool "DVB API read-sdt charsets"
|
||||
default y
|
||||
|
||||
config OSCAM_IRDETO_GUESSING
|
||||
bool "Irdeto guessing"
|
||||
default n
|
||||
|
||||
config OSCAM_CS_ANTICASC
|
||||
bool "Anti cascading"
|
||||
default y
|
||||
|
||||
config OSCAM_WITH_DEBUG
|
||||
bool "Debug messages"
|
||||
default n
|
||||
|
||||
config OSCAM_MODULE_MONITOR
|
||||
bool "Monitor"
|
||||
default n
|
||||
|
||||
config OSCAM_WITH_LB
|
||||
bool "Loadbalancing"
|
||||
default y
|
||||
|
||||
config OSCAM_S_CACHEEX
|
||||
bool "Cache exchange"
|
||||
default y
|
||||
|
||||
config OSCAM_CW_CYCLE_CHECK
|
||||
bool "CW Cycle Check"
|
||||
default y
|
||||
|
||||
config OSCAM_LCDSUPPORT
|
||||
bool "LCD support"
|
||||
default n
|
||||
|
||||
config OSCAM_LEDSUPPORT
|
||||
bool "LED support"
|
||||
default n
|
||||
|
||||
config OSCAM_CLOCKFIX
|
||||
bool "Clockfix (disable on old systems!)"
|
||||
default y
|
||||
|
||||
config OSCAM_IPV6SUPPORT
|
||||
bool "IPv6 support (experimental)"
|
||||
default n
|
||||
|
||||
|
||||
config OSCAM_WEBIF
|
||||
bool "Web Interface"
|
||||
default n
|
||||
|
||||
config OSCAM_WEBIF_LIVELOG
|
||||
bool "LiveLog"
|
||||
depends on OSCAM_WEBIF
|
||||
default n
|
||||
|
||||
config OSCAM_WEBIF_JQUERY
|
||||
bool "Jquery onboard (if disabled webload)"
|
||||
depends on OSCAM_WEBIF
|
||||
default n
|
||||
|
||||
config OSCAM_TOUCH
|
||||
bool "Touch Web Interface"
|
||||
depends on OSCAM_WEBIF
|
||||
default n
|
||||
|
||||
config OSCAM_WITH_SSL
|
||||
bool "SSL support"
|
||||
depends on OSCAM_WEBIF
|
||||
select OSCAM_USE_LIBCRYPTO
|
||||
default n
|
||||
|
||||
endmenu
|
@ -1,204 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=oscam
|
||||
PKG_VERSION:=1.20-$(PKG_REV)
|
||||
PKG_RELEASE:=1
|
||||
PKG_REV:=2780c48789c8e1427df4078ea9b06e0b51594bbc
|
||||
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/coolsnowwolf/oscam.git
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.bz2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=tmn505
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
OSCAM_USE_LIBCRYPTO \
|
||||
OSCAM_USE_LIBUSB \
|
||||
OSCAM_USE_PCSC \
|
||||
OSCAM_WEBIF \
|
||||
OSCAM_WEBIF_LIVELOG \
|
||||
OSCAM_WEBIF_JQUERY \
|
||||
OSCAM_TOUCH \
|
||||
OSCAM_WITH_SSL \
|
||||
OSCAM_HAVE_DVBAPI \
|
||||
OSCAM_READ_SDT_CHARSETS \
|
||||
OSCAM_IRDETO_GUESSING \
|
||||
OSCAM_CS_ANTICASC \
|
||||
OSCAM_WITH_DEBUG \
|
||||
OSCAM_MODULE_MONITOR \
|
||||
OSCAM_WITH_LB \
|
||||
OSCAM_CS_CACHEEX \
|
||||
OSCAM_CW_CYCLE_CHECK \
|
||||
OSCAM_LCDSUPPORT \
|
||||
OSCAM_LEDSUPPORT \
|
||||
OSCAM_CLOCKFIX \
|
||||
OSCAM_IPV6SUPPORT \
|
||||
OSCAM_MODULE_CAMD33 \
|
||||
OSCAM_MODULE_CAMD35 \
|
||||
OSCAM_MODULE_CAMD35_TCP \
|
||||
OSCAM_MODULE_NEWCAMD \
|
||||
OSCAM_MODULE_CCCAM \
|
||||
OSCAM_MODULE_CCCSHARE \
|
||||
OSCAM_MODULE_GBOX \
|
||||
OSCAM_MODULE_RADEGAST \
|
||||
OSCAM_MODULE_SCAM \
|
||||
OSCAM_MODULE_SERIAL \
|
||||
OSCAM_MODULE_CONSTCW \
|
||||
OSCAM_MODULE_PANDORA \
|
||||
OSCAM_MODULE_GHTTP \
|
||||
OSCAM_READER_NAGRA \
|
||||
OSCAM_READER_IRDETO \
|
||||
OSCAM_READER_CONAX \
|
||||
OSCAM_READER_CRYPTOWORKS \
|
||||
OSCAM_READER_SECA \
|
||||
OSCAM_READER_VIACCESS \
|
||||
OSCAM_READER_VIDEOGUARD \
|
||||
OSCAM_READER_DRE \
|
||||
OSCAM_READER_TONGFANG \
|
||||
OSCAM_READER_BULCRYPT \
|
||||
OSCAM_READER_GRIFFIN \
|
||||
OSCAM_READER_DGCRYPT \
|
||||
OSCAM_CARDREADER_PHOENIX \
|
||||
OSCAM_CARDREADER_SC8IN1 \
|
||||
OSCAM_CARDREADER_MP35 \
|
||||
OSCAM_CARDREADER_SMARGO \
|
||||
OSCAM_CARDREADER_STINGER
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/oscam/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
config_files=oscam.ac oscam.cacheex oscam.cert oscam.conf oscam.dvbapi oscam.guess oscam.ird oscam.provid oscam.server oscam.services oscam.srvid oscam.tiers oscam.user oscam.whitelist
|
||||
|
||||
define Package/oscam/conffiles
|
||||
/etc/oscam/
|
||||
endef
|
||||
|
||||
define Package/oscam
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Open Source Conditional Access Modul
|
||||
URL:=http://www.streamboard.tv/oscam
|
||||
DEPENDS:=+OSCAM_USE_LIBCRYPTO:libopenssl +OSCAM_USE_LIBUSB:libusb-1.0 +OSCAM_USE_PCSC:pcscd
|
||||
endef
|
||||
|
||||
define Package/list-smargo
|
||||
$(call Package/oscam)
|
||||
TITLE:=List smargo readers
|
||||
DEPENDS:=oscam
|
||||
endef
|
||||
|
||||
CONFIGURE_CMD = ./config.sh
|
||||
CONFIGURE_ARGS = \
|
||||
--restore \
|
||||
$(if $(CONFIG_OSCAM_WEBIF),--enable,--disable) WEBIF \
|
||||
$(if $(CONFIG_OSCAM_WEBIF_LIVELOG),--enable,--disable) WEBIF_LIVELOG \
|
||||
$(if $(CONFIG_OSCAM_WEBIF_JQUERY),--enable,--disable) WEBIF_JQUERY \
|
||||
$(if $(CONFIG_OSCAM_TOUCH),--enable,--disable) TOUCH \
|
||||
$(if $(CONFIG_OSCAM_WITH_SSL),--enable,--disable) WITH_SSL \
|
||||
$(if $(CONFIG_OSCAM_HAVE_DVBAPI),--enable,--disable) HAVE_DVBAPI \
|
||||
$(if $(CONFIG_OSCAM_READ_SDT_CHARSETS),--enable,--disable) READ_SDT_CHARSETS \
|
||||
$(if $(CONFIG_OSCAM_IRDETO_GUESSING),--enable,--disable) IRDETO_GUESSING \
|
||||
$(if $(CONFIG_OSCAM_CS_ANTICASC),--enable,--disable) CS_ANTICASC \
|
||||
$(if $(CONFIG_OSCAM_WITH_DEBUG),--enable,--disable) WITH_DEBUG \
|
||||
$(if $(CONFIG_OSCAM_MODULE_MONITOR),--enable,--disable) MODULE_MONITOR \
|
||||
$(if $(CONFIG_OSCAM_WITH_LB),--enable,--disable) WITH_LB \
|
||||
$(if $(CONFIG_OSCAM_CS_CACHEEX),--enable,--disable) CS_CACHEEX \
|
||||
$(if $(CONFIG_OSCAM_CW_CYCLE_CHECK),--enable,--disable) CW_CYCLE_CHECK \
|
||||
$(if $(CONFIG_OSCAM_LCDSUPPORT),--enable,--disable) LCDSUPPORT \
|
||||
$(if $(CONFIG_OSCAM_LEDSUPPORT),--enable,--disable) LEDSUPPORT \
|
||||
$(if $(CONFIG_OSCAM_CLOCKFIX),--enable,--disable) CLOCKFIX \
|
||||
$(if $(CONFIG_OSCAM_IPV6SUPPORT),--enable,--disable) IPV6SUPPORT \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CAMD33),--enable,--disable) MODULE_CAMD33 \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CAMD35),--enable,--disable) MODULE_CAMD35 \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CAMD35_TCP),--enable,--disable) MODULE_CAMD35_TCP \
|
||||
$(if $(CONFIG_OSCAM_MODULE_NEWCAMD),--enable,--disable) MODULE_NEWCAMD \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CCCAM),--enable,--disable) MODULE_CCCAM \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CCCSHARE),--enable,--disable) MODULE_CCCSHARE \
|
||||
$(if $(CONFIG_OSCAM_MODULE_GBOX),--enable,--disable) MODULE_GBOX \
|
||||
$(if $(CONFIG_OSCAM_MODULE_RADEGAST),--enable,--disable) MODULE_RADEGAST \
|
||||
$(if $(CONFIG_OSCAM_MODULE_SCAM),--enable,--disable) MODULE_SCAM \
|
||||
$(if $(CONFIG_OSCAM_MODULE_SERIAL),--enable,--disable) MODULE_SERIAL \
|
||||
$(if $(CONFIG_OSCAM_MODULE_CONSTCW),--enable,--disable) MODULE_CONSTCW \
|
||||
$(if $(CONFIG_OSCAM_MODULE_PANDORA),--enable,--disable) MODULE_PANDORA \
|
||||
$(if $(CONFIG_OSCAM_MODULE_GHTTP),--enable,--disable) MODULE_GHTTP \
|
||||
$(if $(CONFIG_OSCAM_READER_NAGRA),--enable,--disable) READER_NAGRA \
|
||||
$(if $(CONFIG_OSCAM_READER_IRDETO),--enable,--disable) READER_IRDETO \
|
||||
$(if $(CONFIG_OSCAM_READER_CONAX),--enable,--disable) READER_CONAX \
|
||||
$(if $(CONFIG_OSCAM_READER_CRYPTOWORKS),--enable,--disable) READER_CRYPTOWORKS \
|
||||
$(if $(CONFIG_OSCAM_READER_SECA),--enable,--disable) READER_SECA \
|
||||
$(if $(CONFIG_OSCAM_READER_VIACCESS),--enable,--disable) READER_VIACCESS \
|
||||
$(if $(CONFIG_OSCAM_READER_VIDEOGUARD),--enable,--disable) READER_VIDEOGUARD \
|
||||
$(if $(CONFIG_OSCAM_READER_DRE),--enable,--disable) READER_DRE \
|
||||
$(if $(CONFIG_OSCAM_READER_TONGFANG),--enable,--disable) READER_TONGFANG \
|
||||
$(if $(CONFIG_OSCAM_READER_BULCRYPT),--enable,--disable) READER_BULCRYPT \
|
||||
$(if $(CONFIG_OSCAM_READER_GRIFFIN),--enable,--disable) READER_GRIFFIN \
|
||||
$(if $(CONFIG_OSCAM_READER_DGCRYPT),--enable,--disable) READER_DGCRYPT \
|
||||
$(if $(CONFIG_OSCAM_CARDREADER_PHOENIX),--enable,--disable) CARDREADER_PHOENIX \
|
||||
$(if $(CONFIG_OSCAM_CARDREADER_SC8IN1),--enable,--disable) CARDREADER_SC8IN1 \
|
||||
$(if $(CONFIG_OSCAM_CARDREADER_MP35),--enable,--disable) CARDREADER_MP35 \
|
||||
$(if $(CONFIG_OSCAM_CARDREADER_SMARGO),--enable,--disable) CARDREADER_SMARGO \
|
||||
$(if $(CONFIG_OSCAM_CARDREADER_STINGER),--enable,--disable) CARDREADER_STINGER \
|
||||
--disable CARDREADER_INTERNAL_AZBOX \
|
||||
--disable CARDREADER_INTERNAL_COOLAPI \
|
||||
--disable CARDREADER_INTERNAL_COOLAPI2 \
|
||||
--disable CARDREADER_INTERNAL_SCI \
|
||||
--disable CARDREADER_DB2COM \
|
||||
--disable CARDREADER_STAPI \
|
||||
--disable CARDREADER_STAPI5
|
||||
|
||||
MAKE_FLAGS +=
|
||||
|
||||
ifeq ($(CONFIG_OSCAM_USE_LIBUSB),y)
|
||||
MAKE_FLAGS += USE_LIBUSB=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OSCAM_USE_PCSC),y)
|
||||
MAKE_FLAGS += USE_PCSC=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OSCAM_USE_LIBCRYPTO),y)
|
||||
MAKE_FLAGS += USE_LIBCRYPTO=1
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OSCAM_WITH_SSL),y)
|
||||
MAKE_FLAGS += USE_SSL=1
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += CONF_DIR=/etc/oscam
|
||||
MAKE_FLAGS += OSCAM_BIN=Distribution/oscam
|
||||
MAKE_FLAGS += LIST_SMARGO_BIN=Distribution/list-smargo
|
||||
|
||||
|
||||
define Package/oscam/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/oscam $(1)/usr/sbin/oscam
|
||||
$(INSTALL_DIR) $(1)/etc/oscam
|
||||
$(INSTALL_DATA) $(addprefix $(PKG_BUILD_DIR)/Distribution/doc/example/,$(config_files)) $(1)/etc/oscam/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/oscam.init $(1)/etc/init.d/oscam
|
||||
endef
|
||||
|
||||
define Package/list-smargo/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/Distribution/list-smargo $(1)/usr/bin/list-smargo
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,oscam))
|
||||
$(eval $(call BuildPackage,list-smargo))
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2016 OpenWrt.org
|
||||
|
||||
START=50
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/oscam
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
Loading…
Reference in New Issue
Block a user