From: Jan-Pascal van Best Date: Wed, 21 Aug 2013 19:55:35 +0000 (+0200) Subject: Merge all into a single package X-Git-Tag: debian/620-16^0 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=ae7379ece1e6a5fd0d2c9d5d94e786151f46cf19;p=sasc-ng.git Merge all into a single package --- diff --git a/.gitignore b/.gitignore index 97e1122..174b803 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .*.swp debian/control debian/control.md5sum -debian/sasc-ng-*-*.install +debian/sasc-ng.install diff --git a/debian/changelog b/debian/changelog index 768af3a..b0c7566 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sasc-ng (620-16) unstable; urgency=low + + * Merge all into a single Debian package + + -- Jan-Pascal van Best Wed, 21 Aug 2013 21:56:33 +0200 + sasc-ng (620-15) unstable; urgency=low * Added kernel 3.8 again diff --git a/debian/control.flavor b/debian/control.flavor deleted file mode 100644 index df8007d..0000000 --- a/debian/control.flavor +++ /dev/null @@ -1,26 +0,0 @@ -Package: sasc-ng-#KERNEL#-#FLAVOR# -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, - sasc-ng-common (=${source:Version}), - sasc-ng-kernel-#KERNEL# (=${source:Version}) -#Provides: sasc-ng-daemon -Description: softcam to help decode DVB streams - sasc-ng is a versatile SoftCAM which creates virtual DVB devices - and outputs through them. - . - This package contains the sasc-ng daemon and the dvbloopback - kernel module for kernel #KERNEL#, optimised for #FLAVOR# cpus. - -Package: sasc-ng-#KERNEL#-#FLAVOR#-dbg -Architecture: any -Section: debug -Priority: extra -Depends: - sasc-ng-#KERNEL#-#FLAVOR# (= ${binary:Version}), - ${misc:Depends} -Description: debugging symbols for sasc-ng - sasc-ng is a versatile SoftCAM which creates virtual DVB devices - and outputs through them. - . - This package contains the debugging symbols for sasc-ng-#KERNEL#-#FLAVOR#. - diff --git a/debian/control.kernel b/debian/control.kernel deleted file mode 100644 index 52e606f..0000000 --- a/debian/control.kernel +++ /dev/null @@ -1,12 +0,0 @@ -Package: sasc-ng-kernel-#KERNEL# -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, - sasc-ng-common (=${source:Version}), - linux-image-#KERNEL# (=#KERNEL_VERSION#) -Description: softcam to help decode DVB streams (dvb-core module) - sasc-ng is a versatile SoftCAM which creates virtual DVB devices - and outputs through them. - . - This package contains a fixed kernel dvb-core module needed - for dvbloopback. - diff --git a/debian/control.source b/debian/control.source index fc1dc0f..0352a58 100644 --- a/debian/control.source +++ b/debian/control.source @@ -6,12 +6,25 @@ Standards-Version: 3.9.4 Build-Depends: debhelper (>= 8), libssl-dev (>= 1.0), gcc-4.6, g++-4.6, #LINUX_HEADERS#, #LINUX_SOURCES# -Package: sasc-ng-common -Architecture: all -Depends: ${misc:Depends} +Package: sasc-ng +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: #LINUX_KERNELS# Description: softcam to help decode DVB streams sasc-ng is a versatile SoftCAM which creates virtual DVB devices and outputs through them. + +Package: sasc-ng-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + sasc-ng (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for sasc-ng + sasc-ng is a versatile SoftCAM which creates virtual DVB devices + and outputs through them. . - This package contains common files for the sasc-ng daemon + This package contains the debugging symbols for sasc-ng +# linux-image-#KERNEL# (=#KERNEL_VERSION#) diff --git a/debian/rules b/debian/rules index 8742dac..7fb65c1 100755 --- a/debian/rules +++ b/debian/rules @@ -54,12 +54,9 @@ build_sasc_%: cd contrib/sasc-ng; \ make module CC=gcc-4.6 CXX=g++-4.6 BUILD_DIR=$${BUILD_DIR}; \ make CC=gcc-4.6 CXX=g++-4.6 CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)"; \ - mkdir -p $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/bin; \ - mkdir -p $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/modules; \ - mkdir -p $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/lib; \ - install -m0755 sasc-ng $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/bin/; \ - install -m0644 dvbloopback.ko $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/modules/dvbloopback_$$FLAVOR.ko; \ - install -m0644 sc/PLUGINS/lib/* $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/lib/; \ + mkdir -p $(CURDIR)/debian/tmp/install/$$KERNEL/$$FLAVOR; \ + install -m0755 sasc-ng $(CURDIR)/debian/tmp/install/$$KERNEL/$$FLAVOR/; \ + install -m0644 dvbloopback.ko $(CURDIR)/debian/tmp/install/$$KERNEL/$$FLAVOR/; \ make module_clean; \ make clean @@ -106,16 +103,11 @@ override_dh_auto_build: override_dh_auto_install: build_kernel build_sasc -dh_strip_%: - VERSION="$*"; \ - FLAVOR=$${VERSION#*_}; \ - KERNEL=$${VERSION/_$$FLAVOR/}; \ - dh_strip -p sasc-ng-$$KERNEL-$$FLAVOR --dbg-package=sasc-ng-$$KERNEL-$$FLAVOR-dbg - .PHONY: override_dh_strip -override_dh_strip: $(foreach kernel,$(KERNELS),$(foreach flav,$(FFDECSA_FLAVORS),dh_strip_$(kernel)_$(flav))) +override_dh_strip: + dh_strip -p sasc-ng --dbg-package=sasc-ng-dbg -CONTROL_FILES = debian/control.source debian/control.flavor debian/control.kernel debian/rules debian/rules.defs debian/sasc-ng.install.in +CONTROL_FILES = debian/control.source debian/rules debian/rules.defs debian/sasc-ng.install.in debian/sasc-ng.install-flavor.in debian/sasc-ng.install-kernel.in comma = , debian/control: $(CONTROL_FILES) @@ -128,38 +120,20 @@ endif LINUX_HEADERS =$(foreach f,$(KERNELS),linux-headers-$(f) (=$(KERNEL_VERSION_$(f)))$(comma)) LINUX_SOURCES =$(foreach f,$(KERNELS),linux-source-$(call kernel_short_version,$(f)) (=$(KERNEL_VERSION_$(f)))$(comma)) - -# call with $1 = kernel version, $2 = full kernel version, $3 = flavor -define append-flavor-entries - sed \ - -e 's/#KERNEL#/$1/g' \ - -e 's/#KERNEL_VERSION#/$2/g' \ - -e 's/#FLAVOR#/$3/g' \ - debian/control.flavor >> debian/control.tmp - -endef - -# call with $1 = kernel version, $2 = full kernel version -define append-kernel-entries - sed \ - -e 's/#KERNEL#/$1/g' \ - -e 's/#KERNEL_VERSION#/$2/g' \ - debian/control.kernel >> debian/control.tmp - -endef +LINUX_KERNELS =$(foreach f,$(KERNELS),linux-image-$(call kernel_short_version,$(f)) (=$(KERNEL_VERSION_$(f)))$(comma)) # call with $1 = kernel version, $2 = flavor define create-flavor-install sed -e 's/#KERNEL#/$1/g' \ -e 's/#FLAVOR#/$2/g' \ - debian/sasc-ng.install.in > debian/sasc-ng-$1-$2.install + debian/sasc-ng.install-flavor.in >> debian/sasc-ng.install.tmp endef # call with $1 = kernel version define create-kernel-install sed -e 's/#KERNEL#/$1/g' \ - debian/sasc-ng.install-kernel.in > debian/sasc-ng-kernel-$1.install + debian/sasc-ng.install-kernel.in >> debian/sasc-ng.install.tmp endef @@ -168,12 +142,13 @@ debian/control-real: $(CONTROL_FILES) sed \ -e 's/#LINUX_HEADERS#/$(LINUX_HEADERS)/g' \ -e 's/#LINUX_SOURCES#/$(LINUX_SOURCES)/g' \ + -e 's/#LINUX_KERNELS#/$(LINUX_KERNELS)/g' \ debian/control.source > debian/control.tmp - $(foreach kernel,$(KERNELS),$(foreach flav,$(FFDECSA_FLAVORS),$(call append-flavor-entries,$(kernel),$(KERNEL_VERSION_$(kernel)),$(flav)))) - $(foreach kernel,$(KERNELS),$(call append-kernel-entries,$(kernel),$(KERNEL_VERSION_$(kernel)))) mv debian/control.tmp debian/control + cat debian/sasc-ng.install.in >debian/sasc-ng.install.tmp $(foreach kernel,$(KERNELS),$(foreach flav,$(FFDECSA_FLAVORS),$(call create-flavor-install,$(kernel),$(flav)))) $(foreach kernel,$(KERNELS),$(call create-kernel-install,$(kernel))) + mv debian/sasc-ng.install.tmp debian/sasc-ng.install md5sum debian/control $^ > debian/control.md5sum @echo @echo This target is made to fail intentionally, to make sure diff --git a/debian/sasc-ng-common.install b/debian/sasc-ng-common.install deleted file mode 100644 index 992e57f..0000000 --- a/debian/sasc-ng-common.install +++ /dev/null @@ -1,9 +0,0 @@ -examples/cardclient.conf.example /etc/sasc-ng/ -examples/cardslot.conf.example /etc/sasc-ng/ -examples/externalau.sh.example /etc/sasc-ng/ -examples/override.conf.example /etc/sasc-ng/ -examples/smartcard.conf.example /etc/sasc-ng/ -examples/SoftCam.Key /etc/sasc-ng/ -examples/Ird-Beta.KID /etc/sasc-ng/ -examples/Seca.KID /etc/sasc-ng/ -examples/Viaccess.KID /etc/sasc-ng/ diff --git a/debian/sasc-ng-common.sasc-ng.default b/debian/sasc-ng-common.sasc-ng.default deleted file mode 100755 index d28a9b3..0000000 --- a/debian/sasc-ng-common.sasc-ng.default +++ /dev/null @@ -1,19 +0,0 @@ -# Default settings for sasc-ng. This file is sourced by /bin/sh from -# /etc/init.d/sasc-ng-common. - -# Uncomment the following line when you've configured sasc-ng using -# this file and the files in /etc/sasc-ng -#CONFIGURED=yes - -PIDFILE=/var/run/$NAME.pid -LOGFILE=/var/log/$NAME.log - -ADDITIONAL_DVBLOOPBACK_PARAMS="adapter_nr=1" - -NUM_LOOPBACK_ADAPTERS=1 -DAEMON_JOIN_ARGS="--join 0:1" -DEBUG_MASK=0 - -# Using a log file seems to cause segfaults, use syslog instead -#DAEMON_ARGS="$DAEMON_JOIN_ARGS --cam-budget --cam-dir /etc/sasc-ng --sid-filt 12 --sid-allpid --sid-nocache --buffer 8M --sid-experimental --daemon --pidfile $PIDFILE --debug $DEBUG_MASK --log $LOGFILE" -DAEMON_ARGS="$DAEMON_JOIN_ARGS --cam-budget --cam-dir /etc/sasc-ng --sid-filt 12 --sid-allpid --sid-nocache --buffer 8M --sid-experimental --daemon --pidfile $PIDFILE --debug $DEBUG_MASK" diff --git a/debian/sasc-ng-common.sasc-ng.init b/debian/sasc-ng-common.sasc-ng.init deleted file mode 100755 index d4aba00..0000000 --- a/debian/sasc-ng-common.sasc-ng.init +++ /dev/null @@ -1,172 +0,0 @@ -#! /bin/sh - -### BEGIN INIT INFO -# Provides: sasc-ng -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: sasc-ng DVB decryption loopback device -### END INIT INFO - -# Author: Hein Rigolo -# - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="sasc-ng" -NAME=sasc-ng -KERNEL=$( uname -r ) -FLAVOR="corei5" -SASCNGDIR="/usr/lib/sasc-ng/$KERNEL-$FLAVOR" -DAEMON="$SASCNGDIR/$NAME" -SCRIPTNAME=/etc/init.d/$NAME -MODULE="dvbloopback_$FLAVOR" - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Exit if the module is not available -modprobe --dry-run --quiet $MODULE || { - echo "Error: dvbloopback module not found" - echo "Please install the sasc-ng-daemon package for your" - echo "current kernel" - exit 0 -} - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -if [ "$CONFIGURED" != "yes" ]; then - echo "Error: sasc-ng not configured, exiting" - echo "Please modify the files in /etc/sasc-ng and /etc/default/sasc-ng" - exit 0 -fi - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - modprobe $MODULE num_adapters=$NUM_LOOPBACK_ADAPTERS $ADDITIONAL_DVBLOOPBACK_PARAMS - - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - #start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - # || return 1 - start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --test \ - || return 1 - logrotate -f /etc/logrotate.d/sasc-ng - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS >> $LOGFILE 2>&1 \ - || return 2 - # Add code here, if necessary, that waits for the process to be ready - # to handle requests from services started subsequently which depend - # on this one. As a last resort, sleep for some time. -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || true ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 || true ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || true ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 || true ;; - esac - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 || true ;; - 1) log_end_msg 1 || true ;; # Old process is still running - *) log_end_msg 1 || true ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 3 - ;; -esac - diff --git a/debian/sasc-ng-common.sasc-ng.logrotate b/debian/sasc-ng-common.sasc-ng.logrotate deleted file mode 100644 index 4bec968..0000000 --- a/debian/sasc-ng-common.sasc-ng.logrotate +++ /dev/null @@ -1,10 +0,0 @@ -/var/log/sasc-ng.log { - daily - rotate 7 - delaycompress - compress - missingok - postrotate - # [ ! -f /var/run/sasc-ng.pid ] || kill -HUP `cat /var/run/sasc-ng.pid` - endscript -} diff --git a/debian/sasc-ng.default b/debian/sasc-ng.default new file mode 100755 index 0000000..d13807b --- /dev/null +++ b/debian/sasc-ng.default @@ -0,0 +1,23 @@ +# Default settings for sasc-ng. This file is sourced by /bin/sh from +# /etc/init.d/sasc-ng-common. + +# Uncomment the following line when you've configured sasc-ng using +# this file and the files in /etc/sasc-ng +#CONFIGURED=yes + +PIDFILE=/var/run/$NAME.pid +LOGFILE=/var/log/$NAME.log + +ADDITIONAL_DVBLOOPBACK_PARAMS="adapter_nr=1" + +NUM_LOOPBACK_ADAPTERS=1 +DAEMON_JOIN_ARGS="--join 0:1" +DEBUG_MASK=0 + +# FFDECSA flavor, choose from athlon64, atom, core2, corei5 +# See source code for cpu specification needed for each flavor +FLAVOR="corei5" + +# Using a log file seems to cause segfaults, use syslog instead +#DAEMON_ARGS="$DAEMON_JOIN_ARGS --cam-budget --cam-dir /etc/sasc-ng --sid-filt 12 --sid-allpid --sid-nocache --buffer 8M --sid-experimental --daemon --pidfile $PIDFILE --debug $DEBUG_MASK --log $LOGFILE" +DAEMON_ARGS="$DAEMON_JOIN_ARGS --cam-budget --cam-dir /etc/sasc-ng --sid-filt 12 --sid-allpid --sid-nocache --buffer 8M --sid-experimental --daemon --pidfile $PIDFILE --debug $DEBUG_MASK" diff --git a/debian/sasc-ng.init b/debian/sasc-ng.init new file mode 100755 index 0000000..870d4fd --- /dev/null +++ b/debian/sasc-ng.init @@ -0,0 +1,181 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: sasc-ng +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# X-Start-Before: mythtv-backend +# X-Stop-After: mythtv-backend +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: sasc-ng DVB decryption loopback device +### END INIT INFO + +# Author: Hein Rigolo +# + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="sasc-ng" +NAME=sasc-ng +KERNEL=$( uname -r ) +FLAVOR="corei5" +SASCNGDIR="/usr/lib/sasc-ng" + +DAEMON="$SASCNGDIR/$KERNEL/$FLAVOR/$NAME" +SCRIPTNAME=/etc/init.d/$NAME +MODULE="$SASCNGDIR/$KERNEL/$FLAVOR/dvbloopback.ko" + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# Exit if the package is not configured +if [ "$CONFIGURED" != "yes" ]; then + echo "Error: sasc-ng not configured, exiting" + echo "Please modify the files in /etc/sasc-ng and /etc/default/sasc-ng" + exit 0 +fi + +# Exit if the package is not installed +[ -x "$DAEMON" ] || { + echo "Error: could not find sasc-ng daemon $DAEMON" + echo "Make sure you're running a supported kernel and you've " + echo "selected the proper cpu type (FLAVOR) in /etc/default/sasc-ng" + exit 0 +} + +# Exit if the module is not available +[ -r "$MODULE" ] || { + echo "Error: dvbloopback module not found" + echo "Make sure you're running a supported kernel and you've " + echo "selected the proper cpu type (FLAVOR) in /etc/default/sasc-ng" + exit 0 +} + +# +# Function that starts the daemon/service +# +do_start() +{ + insmod $MODULE num_adapters=$NUM_LOOPBACK_ADAPTERS $ADDITIONAL_DVBLOOPBACK_PARAMS + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + #start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + # || return 1 + start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --test \ + || return 1 + logrotate -f /etc/logrotate.d/sasc-ng + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS >> $LOGFILE 2>&1 \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || true ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 || true ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || true ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 || true ;; + esac + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 || true ;; + 1) log_end_msg 1 || true ;; # Old process is still running + *) log_end_msg 1 || true ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac + diff --git a/debian/sasc-ng.install-flavor.in b/debian/sasc-ng.install-flavor.in new file mode 100644 index 0000000..103c601 --- /dev/null +++ b/debian/sasc-ng.install-flavor.in @@ -0,0 +1 @@ +debian/tmp/install/#KERNEL#/#FLAVOR#/* /usr/lib/sasc-ng/#KERNEL#/#FLAVOR# diff --git a/debian/sasc-ng.install.in b/debian/sasc-ng.install.in index e14dd0f..992e57f 100644 --- a/debian/sasc-ng.install.in +++ b/debian/sasc-ng.install.in @@ -1,3 +1,9 @@ -debian/tmp/#KERNEL#-#FLAVOR#/bin/* /usr/lib/sasc-ng/#KERNEL#-#FLAVOR#/bin/ -debian/tmp/#KERNEL#-#FLAVOR#/modules/* /lib/modules/#KERNEL#/misc -debian/tmp/#KERNEL#-#FLAVOR#/lib/* /usr/lib/sasc-ng/#KERNEL#-#FLAVOR#/lib/ +examples/cardclient.conf.example /etc/sasc-ng/ +examples/cardslot.conf.example /etc/sasc-ng/ +examples/externalau.sh.example /etc/sasc-ng/ +examples/override.conf.example /etc/sasc-ng/ +examples/smartcard.conf.example /etc/sasc-ng/ +examples/SoftCam.Key /etc/sasc-ng/ +examples/Ird-Beta.KID /etc/sasc-ng/ +examples/Seca.KID /etc/sasc-ng/ +examples/Viaccess.KID /etc/sasc-ng/ diff --git a/debian/sasc-ng.logrotate b/debian/sasc-ng.logrotate new file mode 100644 index 0000000..4bec968 --- /dev/null +++ b/debian/sasc-ng.logrotate @@ -0,0 +1,10 @@ +/var/log/sasc-ng.log { + daily + rotate 7 + delaycompress + compress + missingok + postrotate + # [ ! -f /var/run/sasc-ng.pid ] || kill -HUP `cat /var/run/sasc-ng.pid` + endscript +}