From: Jan-Pascal van Best Date: Tue, 20 Aug 2013 21:47:00 +0000 (+0200) Subject: Allow multiple sasc-ng versions to be installed at the same time, pick the right... X-Git-Tag: debian/620-14^0 X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=14f38479fe0f2cf4bc56a3428fe047aa00b28575;p=sasc-ng.git Allow multiple sasc-ng versions to be installed at the same time, pick the right one on startup --- diff --git a/.gitignore b/.gitignore index 7121580..97e1122 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 fb5eab5..2d7d7d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sasc-ng (620-14) unstable; urgency=low + + * Allow simultaneous installation for multiple kernel versions + + -- Jan-Pascal van Best Tue, 20 Aug 2013 23:41:01 +0200 + sasc-ng (620-13) unstable; urgency=low * Enable kernel 3.2 for Wheezy users diff --git a/debian/control.flavor b/debian/control.flavor index 01b43bd..f56157d 100644 --- a/debian/control.flavor +++ b/debian/control.flavor @@ -2,9 +2,7 @@ Package: sasc-ng-#KERNEL#-#FLAVOR# Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sasc-ng-common (=${source:Version}), - linux-image-#KERNEL# (=#KERNEL_VERSION#) -Conflicts: sasc-ng-daemon -Replaces: sasc-ng-daemon + 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 @@ -20,9 +18,6 @@ Priority: extra Depends: sasc-ng-#KERNEL#-#FLAVOR# (= ${binary:Version}), ${misc:Depends} -Conflicts: sasc-ng-daemon-dbg -Replaces: sasc-ng-daemon-dbg -Provides: sasc-ng-daemon-dbg Description: debugging symbols for sasc-ng sasc-ng is a versatile SoftCAM which creates virtual DVB devices and outputs through them. diff --git a/debian/control.kernel b/debian/control.kernel new file mode 100644 index 0000000..52e606f --- /dev/null +++ b/debian/control.kernel @@ -0,0 +1,12 @@ +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/rules b/debian/rules index fe85f37..5eea100 100755 --- a/debian/rules +++ b/debian/rules @@ -58,7 +58,7 @@ build_sasc_%: 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; \ + install -m0644 dvbloopback.ko $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/modules/dvbloopback_$$FLAVOR.ko; \ install -m0644 sc/PLUGINS/lib/* $(CURDIR)/debian/tmp/$$KERNEL-$$FLAVOR/lib/; \ make module_clean; \ make clean @@ -110,7 +110,7 @@ dh_strip_%: .PHONY: override_dh_strip override_dh_strip: $(foreach kernel,$(KERNELS),$(foreach flav,$(FFDECSA_FLAVORS),dh_strip_$(kernel)_$(flav))) -CONTROL_FILES = debian/control.source debian/control.flavor debian/rules debian/rules.defs debian/sasc-ng.install.in +CONTROL_FILES = debian/control.source debian/control.flavor debian/control.kernel debian/rules debian/rules.defs debian/sasc-ng.install.in comma = , debian/control: $(CONTROL_FILES) @@ -134,6 +134,15 @@ define append-flavor-entries 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 + # call with $1 = kernel version, $2 = flavor define create-flavor-install sed -e 's/#KERNEL#/$1/g' \ @@ -142,6 +151,13 @@ define create-flavor-install 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 + +endef + debian/control-real: $(CONTROL_FILES) sed \ @@ -149,8 +165,10 @@ debian/control-real: $(CONTROL_FILES) -e 's/#LINUX_SOURCES#/$(LINUX_SOURCES)/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 $(foreach kernel,$(KERNELS),$(foreach flav,$(FFDECSA_FLAVORS),$(call create-flavor-install,$(kernel),$(flav)))) + $(foreach kernel,$(KERNELS),$(call create-kernel-install,$(kernel))) 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 new file mode 100644 index 0000000..992e57f --- /dev/null +++ b/debian/sasc-ng-common.install @@ -0,0 +1,9 @@ +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.init b/debian/sasc-ng-common.sasc-ng.init index a565b6b..d4aba00 100755 --- a/debian/sasc-ng-common.sasc-ng.init +++ b/debian/sasc-ng-common.sasc-ng.init @@ -18,14 +18,18 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="sasc-ng" NAME=sasc-ng -DAEMON=/usr/sbin/$NAME +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 dvbloopback || { +modprobe --dry-run --quiet $MODULE || { echo "Error: dvbloopback module not found" echo "Please install the sasc-ng-daemon package for your" echo "current kernel" @@ -53,7 +57,7 @@ fi # do_start() { - modprobe dvbloopback num_adapters=$NUM_LOOPBACK_ADAPTERS $ADDITIONAL_DVBLOOPBACK_PARAMS + modprobe $MODULE num_adapters=$NUM_LOOPBACK_ADAPTERS $ADDITIONAL_DVBLOOPBACK_PARAMS # Return # 0 if daemon has been started diff --git a/debian/sasc-ng.install-kernel.in b/debian/sasc-ng.install-kernel.in new file mode 100644 index 0000000..5a02975 --- /dev/null +++ b/debian/sasc-ng.install-kernel.in @@ -0,0 +1 @@ +debian/tmp/#KERNEL#/module-updates/* /lib/modules/#KERNEL#/updates diff --git a/debian/sasc-ng.install.in b/debian/sasc-ng.install.in index 14b4a13..e14dd0f 100644 --- a/debian/sasc-ng.install.in +++ b/debian/sasc-ng.install.in @@ -1,13 +1,3 @@ -debian/tmp/#KERNEL#-#FLAVOR#/bin/* /usr/sbin/ +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/ -debian/tmp/#KERNEL#/module-updates/* /lib/modules/#KERNEL#/updates -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/ +debian/tmp/#KERNEL#-#FLAVOR#/lib/* /usr/lib/sasc-ng/#KERNEL#-#FLAVOR#/lib/