]> www.vanbest.org Git - sasc-ng.git/commitdiff
Allow multiple sasc-ng versions to be installed at the same time, pick the right... debian/620-14
authorJan-Pascal van Best <janpascal@vanbest.org>
Tue, 20 Aug 2013 21:47:00 +0000 (23:47 +0200)
committerJan-Pascal van Best <janpascal@vanbest.org>
Tue, 20 Aug 2013 21:47:00 +0000 (23:47 +0200)
.gitignore
debian/changelog
debian/control.flavor
debian/control.kernel [new file with mode: 0644]
debian/rules
debian/sasc-ng-common.install [new file with mode: 0644]
debian/sasc-ng-common.sasc-ng.init
debian/sasc-ng.install-kernel.in [new file with mode: 0644]
debian/sasc-ng.install.in

index 7121580f1bcdfb2fbe54e0afe9e28b2da3c546e2..97e11226caa8b6f0952fd7b301bf52cc39b7d54d 100644 (file)
@@ -1,4 +1,4 @@
 .*.swp
 debian/control
 debian/control.md5sum
-debian/sasc-ng-*.install
+debian/sasc-ng-*-*.install
index fb5eab5113289c5b30a54e80971f5882943c397f..2d7d7d0cc29a0eb300bc028c9ef9ed82b6df3d71 100644 (file)
@@ -1,3 +1,9 @@
+sasc-ng (620-14) unstable; urgency=low
+
+  * Allow simultaneous installation for multiple kernel versions
+
+ -- Jan-Pascal van Best <janpascal@vanbest.org>  Tue, 20 Aug 2013 23:41:01 +0200
+
 sasc-ng (620-13) unstable; urgency=low
 
   * Enable kernel 3.2 for Wheezy users
index 01b43bd3d0242b4511244f901dd894920a3412ba..f56157de763a739f4749e07dab658cb17f082201 100644 (file)
@@ -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 (file)
index 0000000..52e606f
--- /dev/null
@@ -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.
+
index fe85f376841dc1aa522ab7f98d566841ad07a017..5eea10048797d0bf6ec5c3b7fc6618e2b79ab3c1 100755 (executable)
@@ -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 (file)
index 0000000..992e57f
--- /dev/null
@@ -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/
index a565b6b449fb5415c0b084a33dfc021f42853969..d4aba0032d771d21d15b598f2d9d26c38f19c011 100755 (executable)
 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 (file)
index 0000000..5a02975
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/#KERNEL#/module-updates/* /lib/modules/#KERNEL#/updates
index 14b4a130c380c95a7829b5ba362a36fab1022fb1..e14dd0fdb12aabf4678b2e10af21a37e94efb1c1 100644 (file)
@@ -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/