diff -Nru sc/debian/changelog sc-debian//debian/changelog --- sc/debian/changelog 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/changelog 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,6 @@ +vdr-plugin-sc (13.10.2010-1) unstable; urgency=low + + * Initial release + + -- micky979 Mon, 28 Feb 2011 13:29:55 +0000 + diff -Nru sc/debian/compat sc-debian//debian/compat --- sc/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/compat 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1 @@ +7 diff -Nru sc/debian/configure_FFdecsa sc-debian//debian/configure_FFdecsa --- sc/debian/configure_FFdecsa 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/configure_FFdecsa 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,190 @@ +#!/bin/sh + +die_unknown(){ + echo "Unknown option \"$1\"." + echo "See $0 --help for available options." + exit 1 +} + +#check whether option is supported by this cpu +check_cpu(){ + ok=0 + grep "^flags.* $1 " /proc/cpuinfo >/dev/null 2>&1 + if test $? -eq 0; then + ok=1 + else + grep "^flags.* $1\$" /proc/cpuinfo >/dev/null 2>&1 + if test $? -eq 0; then + ok=1 + fi + fi + eval test $ok -eq 1 +} + +#try to figure out best FFdecsa compiler options +get_cpu_optimization() { + FLAGS="FLAGS=-O3 -fomit-frame-pointer -fexpensive-optimizations -funroll-loops" + arch=`uname -m` + processors_flags=`cat /proc/cpuinfo | grep "flags" | head -n 1` + vendor=`cat /proc/cpuinfo |grep "vendor_id" | head -n 1 | sed -e "s/.*:\W*//"` + gcc_ver=`$CXX -v 2>&1 | grep "gcc version" | head -n 1` + gcc_major=`echo $gcc_ver | sed -e 's/^gcc version \([0-9]*\)\..*/\1/'` + gcc_minor=`echo $gcc_ver | sed -e 's/^gcc version [0-9]*\.\([0-9]*\).*/\1/'` + if test $gcc_major -gt 4; then + ARCH="native" + elif test $gcc_major -eq 4 && test $gcc_minor -ge 2; then + ARCH="native" + elif test "x$arch" = "xx86_64"; then + if test "x$vendor" = "xAuthenticAMD"; then + ARCH="k8" + elif test "x$vendor" = "xGenuineIntel"; then + ARCH="nocona" + else + echo **WARNING** - Unknown vendor $vendor - assuming nocona + ARCH="nocona" + fi + FLAGS="$FLAGS -finline-limit=6000000 --param max-unrolled-insns=500" + elif test "x$arch" = "xathlon-xp"; then + ARCH="athlon-xp" + FLAGS="$FLAGS -finline-limit=6000000 --param max-unrolled-insns=500" + else + ARCH="pentium" + fi + OPTS="" + for opt in mmx sse sse2; do + if check_cpu $opt; then + OPTS="$OPTS $opt" + FLAGS="$FLAGS -m$opt" + fi + done + FLAGS="$FLAGS -march=$ARCH" + echo "Processor capabilities: $ARCH ($OPTS )" +} + +show_help() { + echo "Usage: configure [options]" + echo "Options: [defaults in brackets after descriptions]" + echo + echo "Standard options:" + echo " --help print this message" + echo " --dvb-dir= use for DVB headers" + echo " --optimize= set FFDecsa optimiation detection" + echo " yes: Try most common optimizations" + echo " long: Try all known optimizations (default)" + echo " no: Don't do any optimizations" + echo " --ffdecsa_mode= use optimization" + echo " -cxx= command for C++ compilation (default: g++)" + exit 0 +} +MAX_MODE=PARALLEL_32_INT +ffdecsa_opt="long" +for opt do + optval="${opt#*=}" + case "$opt" in + --dvb-dir=*) dvb_path=`eval echo $optval` + ;; + --cxx=*) CXX="$optval" + ;; + --ffdecsa_mode=*) ffdecsa_opt="no"; MAX_MODE="$optval" + ;; + --ffdecsa_flags=*) ffdecsa_flags="$optval" + ;; + --optimize=*) ffdecsa_opt="$optval" + ;; + --help) show_help + ;; + *) + die_unknown $opt + ;; + esac +done + +if test "x$CXX" = "x"; then + CXX=g++ +fi + +if test "x$ffdecsa_opt" = "xlong"; then + FFDECSA_MODES="PARALLEL_32_INT PARALLEL_32_4CHAR PARALLEL_32_4CHARA \ + PARALLEL_64_8CHAR PARALLEL_64_8CHARA PARALLEL_64_2INT \ + PARALLEL_64_LONG PARALLEL_64_MMX PARALLEL_128_16CHAR \ + PARALLEL_128_16CHARA PARALLEL_128_4INT PARALLEL_128_2LONG \ + PARALLEL_128_2MMX PARALLEL_128_SSE PARALLEL_128_SSE2" +elif test "x$ffdecsa_opt" = "xyes"; then + FFDECSA_MODES="PARALLEL_32_INT PARALLEL_64_2INT PARALLEL_64_LONG \ + PARALLEL_64_MMX PARALLEL_128_2LONG PARALLEL_128_2MMX \ + PARALLEL_128_SSE PARALLEL_128_SSE2" +elif test "x$ffdecsa_opt" != "xno"; then + echo "Bad option to --optimize '$ffdecsa_opt'. Should be 'yes, no, long'" + exit 1 +fi +if test "x${TMPDIR}" = "x"; then + TMPDIR="/tmp" +fi + +TMPDIR="${TMPDIR}/sc.$$" +mkdir ${TMPDIR} + +#Test FFDECSA compile +MAX_val=0 +if test "x$ffdecsa_opt" != "xno"; then + if test "x$ffdecsa_flags" = "x"; then + if test -f /proc/cpuinfo; then + get_cpu_optimization + fi + else + FLAGS=$ffdecsa_flags + fi + FFdecsaDIR="FFdecsa" + TMPOUT="${TMPDIR}/FFdecsa/out" + mkdir "${TMPDIR}/FFdecsa" + cp $FFdecsaDIR/*.c $FFdecsaDIR/*.h $FFdecsaDIR/Makefile "${TMPDIR}/FFdecsa/" + echo "Trying various FFdecsa optimizations..." + for var in ${FFDECSA_MODES}; do + make -C "${TMPDIR}/FFdecsa" FFdecsa_test "PARALLEL_MODE=${var}" "${FLAGS}" "COMPILER=$CXX" > /dev/null 2>&1 + if test $? -ne 0 ; then + echo " ${var}: build failed" + else + rm -f ${TMPOUT} + sync;sleep 2; "${TMPDIR}/FFdecsa/FFdecsa_test" > /dev/null 2>"${TMPOUT}" + if test $? -ne 0; then + echo " ${var}: test failed" + else + grep FAILED "${TMPOUT}" >/dev/null 2>&1 + if test $? -ne 1; then + echo " ${var}: test failed" + else + res=`grep "speed=.*Mbit" "${TMPOUT}" | sed -e 's/^.*=\([0-9]*\)\.[0-9]* Mbit.*$/\1/'` + echo " ${var}: $res" + if test $res -gt $MAX_val; then + MAX_val=$res + MAX_MODE=$var + fi + fi + fi + fi + make -C "${TMPDIR}/FFdecsa" clean >/dev/null 2>&1 + done + echo "Choosing PARALLEL_MODE = ${MAX_MODE}" + echo "CPUOPT ?= $(echo "$FLAGS" | sed 's/^.* -march=\(.*\)/\1/'g)" > Make.config + echo "PARALLEL ?= ${MAX_MODE}" >> Make.config + echo "CSAFLAGS ?= -Wall -fPIC -g $(echo "$FLAGS" | sed 's/FLAGS=\(.*\) -march=native/\1/'g)" >> Make.config +else + if test "x$ffdecsa_flags" != "x"; then + echo "FFDECSA_OPTS = \"$ffdecsa_flags\" PARALLEL_MODE=${MAX_MODE} COMPILER=$CXX" + elif test "x$MAX_MODE" != "xPARALLEL_32_INT"; then + echo "FFDECSA_OPTS = PARALLEL_MODE=${MAX_MODE} COMPILER=$CXX" + fi +fi + +if test "x$dvb_path" != "x"; then + if test -e "${dvb_path}/include/linux/dvb/frontend.h"; then + echo "DVB_DIR=${dvb_path}" + echo "Using DVB_DIR: ${dvb_path}" + elif test -e "${dvb_path}/linux/include/linux/dvb/frontend.h"; then + echo "DVB_DIR=${dvb_path}/linux" + echo "Using DVB_DIR: ${dvb_path}/linux" + else + echo "Could not find DVB headers within $dvb_path" + fi +fi +rm -rf "${TMPDIR}" diff -Nru sc/debian/control sc-debian//debian/control --- sc/debian/control 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/control 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,19 @@ +Source: vdr-plugin-sc +Section: video +Priority: extra +Maintainer: micky979 +Build-Depends: debhelper (>= 7.0.50~), vdr-dev, gettext, libssl-dev, cdbs, dpatch, mercurial, devscripts +Standards-Version: 3.9.1 +Vcs-Svn: svn://svn.debian.org/pkg-vdr-dvb/vdr/vdr-plugin-sc/trunk/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr-plugin-sc/trunk/ +Homepage: + +Package: vdr-plugin-sc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${vdr:Depends} +Description: SoftCAM for Irdeto, Seca, Viaccess, Nagra, Conax & Cryptoworks + +Package: libvdr-sc-cardclient +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, vdr-plugin-sc (= ${binary:Version}) +Description: CardClient for SoftCam diff -Nru sc/debian/copyright sc-debian//debian/copyright --- sc/debian/copyright 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/copyright 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,46 @@ +Upstream Homepage: + + +Upstream Author(s): + + +Debian Maintainer(s): + micky979 + +Copyright: + + +Copyright (Debian packaging): + (C) 2011 micky979 + +License: + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + The complete text of the GNU General Public License can be found + in /usr/share/common-licenses/GPL-2 on most Debian systems. + +License (Debian packaging): + The Debian packaging is licensed under the GPL, version 2 or any + later version, see /usr/share/common-licenses/GPL-2. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them in this file. +# +# Check if the upstream sources explicitly state which licenses apply to +# which action. If this is not the case, ask the upstream author to add such a +# license disclaimer to all source files or at least to the README. For the +# GPL2 or GPL3 the small license disclaimer mentioned at the end of the full license +# text in "How to Apply These Terms to Your New Programs" should be sufficient. diff -Nru sc/debian/get-orig-source.sh sc-debian//debian/get-orig-source.sh --- sc/debian/get-orig-source.sh 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/get-orig-source.sh 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,8 @@ +#!/bin/sh + +test -x /usr/bin/hg || ( echo "you have to install the mercurial package!" && exit 1 ) +#hg clone http://85.17.209.13:6100/sc +hg update -C -q +HG_SHA=$(hg identify -i) +VERSION_DATE=$(/bin/date --utc +%0d-%0m-%0Y) +dch -v "${VERSION_DATE}-1" "New Upstream Snapshot (hg revision $HG_SHA)" diff -Nru sc/debian/libvdr-sc-cardclient.install sc-debian//debian/libvdr-sc-cardclient.install --- sc/debian/libvdr-sc-cardclient.install 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/libvdr-sc-cardclient.install 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,3 @@ +systems/cardclient/libsc-*.so.* usr/lib/vdr/plugins/ +examples/cardclient.conf.example etc/vdr/plugins/sc/ +examples/override.conf.example etc/vdr/plugins/sc/ diff -Nru sc/debian/patches/00list sc-debian//debian/patches/00list --- sc/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/patches/00list 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1 @@ +01_Makefile diff -Nru sc/debian/patches/01_Makefile.dpatch sc-debian//debian/patches/01_Makefile.dpatch --- sc/debian/patches/01_Makefile.dpatch 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/patches/01_Makefile.dpatch 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,56 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_Makefile.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ + +diff -urNad a/Makefile b/Makefile +--- a/Makefile 2011-02-28 13:28:05.000000000 +0000 ++++ b/Makefile 2011-02-28 13:40:42.000000000 +0000 +@@ -54,7 +54,7 @@ + + ### Includes and Defines + +-INCLUDES = -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR) + DEFINES = -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + SHAREDDEFINES = -DAPIVERSNUM=$(APIVERSNUM) -D_GNU_SOURCE + LIBS = -lcrypto +@@ -67,13 +67,13 @@ + + ### The version number of VDR (taken from VDR's "config.h"): + +-VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h) +-APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h) ++VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) ++APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) + ifeq ($(strip $(APIVERSION)),) + APIVERSION = $(VDRVERSION) + endif +-VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h) +-APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h) ++VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h) ++APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h) + ifeq ($(strip $(APIVERSNUM)),) + APIVERSNUM = $(VDRVERSNUM) + endif +@@ -97,7 +97,7 @@ + # test VDR version + BYVERS = $(strip $(shell if test $(APIVERSNUM) -ge 010703; then echo "*"; fi)) + # test if PlayTsVideo() exists (e.g. TSplay patch) +-BYTSPL = $(strip $(shell grep -l 'PlayTsVideo' $(VDRDIR)/include/vdr/device.h)) ++BYTSPL = $(strip $(shell grep -l 'PlayTsVideo' $(VDRDIR)/device.h)) + + ifneq ($(BYVERS)$(BYTSPL),) + SHAREDDEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE +@@ -118,7 +118,7 @@ + endif + + # max number of CAIDs per slot +-MAXCAID := $(shell sed -ne '/define MAXCASYSTEMIDS/ s/^.[a-zA-Z ]*\([0-9]*\).*$$/\1/p' $(VDRDIR)/ci.c) ++MAXCAID = 64 + ifneq ($(strip $(MAXCAID)),) + DEFINES += -DVDR_MAXCAID=$(MAXCAID) + endif diff -Nru sc/debian/plugin.sc.conf sc-debian//debian/plugin.sc.conf --- sc/debian/plugin.sc.conf 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/plugin.sc.conf 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,11 @@ +# +# Command line parameters for softcam plugins +# +# See /usr/share/doc/vdr-plugin-sc/README.gz for a documentation +# about all available command line parameters. + +# example forces DVB device N to budget mode (using FFdecsa) +# --budget=N + +# example script for external key updates +# --external-au=CMD diff -Nru sc/debian/postinst sc-debian//debian/postinst --- sc/debian/postinst 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/postinst 2011-06-03 21:28:15.000000000 +0000 @@ -0,0 +1,55 @@ +#!/bin/sh +# postinst script for vdr-plugin-sc +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + configure) + if [ ! -L /var/lib/vdr/plugins/sc ] + then + rm -fr /var/lib/vdr/plugins/sc/ + ln -s /etc/vdr/plugins/sc/ /var/lib/vdr/plugins/sc + fi + + if [ ! -e /etc/vdr/plugins/sc/override.conf ] + then + cp -p /etc/vdr/plugins/sc/override.conf.example* /etc/vdr/plugins/sc/override.conf + fi + + if [ ! -e /etc/vdr/plugins/sc/cardclient.conf ] + then + cp -p /etc/vdr/plugins/sc/cardclient.conf.example* /etc/vdr/plugins/sc/cardclient.conf + fi + + chown -R vdr:vdr /etc/vdr/plugins/sc/ + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru sc/debian/rules sc-debian//debian/rules --- sc/debian/rules 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/rules 2011-06-03 21:12:21.000000000 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/dpatch.mk + +DEB_INSTALL_CHANGELOGS_ALL = HISTORY + +MAKE_OPTIONS = DVBDIR=/usr VDRDIR=/usr/include/vdr LIBDIR=. \ + LOCALEDIR=debian/tmp/usr/share/locale + +common-build-arch:: + /bin/sh debian/configure_FFdecsa + $(MAKE) all $(MAKE_OPTIONS) + +cleanbuilddir:: + $(MAKE) -o .dependencies clean $(MAKE_OPTIONS) + rm -f libvdr-*.so.* systems/*/libsc* + rm -f Make.config + +common-binary-predeb-arch:: + sh /usr/share/vdr-dev/dependencies.sh + +update:: + sh debian/get-orig-source.sh diff -Nru sc/debian/source/format sc-debian//debian/source/format --- sc/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/source/format 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru sc/debian/vdr-plugin-sc.dirs sc-debian//debian/vdr-plugin-sc.dirs --- sc/debian/vdr-plugin-sc.dirs 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/vdr-plugin-sc.dirs 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1 @@ +etc/vdr/plugins/sc diff -Nru sc/debian/vdr-plugin-sc.docs sc-debian//debian/vdr-plugin-sc.docs --- sc/debian/vdr-plugin-sc.docs 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/vdr-plugin-sc.docs 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,3 @@ +README +README.CCcam +README.FFdecsa diff -Nru sc/debian/vdr-plugin-sc.install sc-debian//debian/vdr-plugin-sc.install --- sc/debian/vdr-plugin-sc.install 1970-01-01 00:00:00.000000000 +0000 +++ sc-debian//debian/vdr-plugin-sc.install 2011-06-03 21:12:11.000000000 +0000 @@ -0,0 +1,4 @@ +libvdr-sc.so.* usr/lib/vdr/plugins/ +examples/* usr/share/vdr-plugin-sc/examples/ +debian/plugin.sc.conf etc/vdr/plugins/ +debian/tmp/usr/share/locale