]> www.vanbest.org Git - sasc-ng.git/commitdiff
Initial Debianisation
authorJan-Pascal van Best <janpascal@vanbest.org>
Thu, 24 Jan 2013 13:08:58 +0000 (14:08 +0100)
committerJan-Pascal van Best <janpascal@vanbest.org>
Thu, 24 Jan 2013 13:24:55 +0000 (14:24 +0100)
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/patches/always-assume-recent-kernel.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/patches/use-proper-kernel-header-locations.patch [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..5d1464b
--- /dev/null
@@ -0,0 +1,5 @@
+sasc-ng (620-3.7.1+1~experimental.sasc1) UNRELEASED; urgency=low
+
+  * Initial release. (Closes: #XXXXXX)
+
+ -- Jan-Pascal van Best <janpascal@vanbest.org>  Tue, 22 Jan 2013 20:26:22 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..9b45e2f
--- /dev/null
@@ -0,0 +1,15 @@
+Source: sasc-ng
+Section: devel
+Priority: extra
+Maintainer: Jan-Pascal van Best <janpascal@vanbest.org>
+Standards-Version: 3.9.4
+#Build-Depends: debhelper (>= 5), ${kver:BuildDepends}
+Build-Depends: debhelper (>= 8)
+
+Package: sasc-ng-3.7-trunk-amd64
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${kver:Depends}
+Description: softcam to help decode DVB streams
+ sasc-ng is a versatile SoftCAM which creates virtual DVB devices 
+ and outputs through them.
+
diff --git a/debian/patches/always-assume-recent-kernel.patch b/debian/patches/always-assume-recent-kernel.patch
new file mode 100644 (file)
index 0000000..692fe85
--- /dev/null
@@ -0,0 +1,96 @@
+diff -ru sc/contrib/sasc-ng/dvbloopback/module/config_dvb.pl sc-build/contrib/sasc-ng/dvbloopback/module/config_dvb.pl
+--- sc/contrib/sasc-ng/dvbloopback/module/config_dvb.pl        2012-07-31 21:59:15.715706905 +0200
++++ sc-build/contrib/sasc-ng/dvbloopback/module/config_dvb.pl  2012-09-15 13:29:47.000000000 +0200
+@@ -17,79 +17,12 @@
+   $cmd = "cd config-dvb && make $vars" . ($debug ? "" : "2>/dev/null 1>/dev/null");
+   print "$cmd\n" if($debug);
+-  #test linux-version >= 2.6.22
+   system("ln -sf chkdvb-2.6.v4l.c config-dvb/chkdvb.c");
+-  if(system("$cmd") == 0) {
+-    print "Found dvbdev.h from 2.6.22 or later\n";
++    print "Assuming kernel 2.6.22 or later\n";
+     `echo "DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);" >> dvbdevwrap.h`; 
+     `echo "#define wrap_dvb_reg_adapter(a, b, c) dvb_register_adapter(a, b, c, &dvblb_basedev->dev, adapter_nr)" >> dvbdevwrap.h`; 
+     return 0;
+-  }
+-  
+-  #test linux-version >= 2.6.18
+-  system("ln -sf chkdvb-2.6.18.c config-dvb/chkdvb.c");
+-  if(system("$cmd") == 0) {
+-    print "Found dvbdev.h from 2.6.18 or later\n";
+-    `echo "#define wrap_dvb_reg_adapter(a, b, c) dvb_register_adapter(a, b, c, &dvblb_basedev->dev)" >> dvbdevwrap.h`;
+-    return 0;
+-  }
+-  
+-  #test linux-version >= 2.6.14
+-  system("ln -sf chkdvb-2.6.14.c config-dvb/chkdvb.c");
+-  if(system("$cmd") == 0) {
+-    print "Found dvbdev.h from 2.6.14 or later\n";
+-    `echo "#define wrap_dvb_reg_adapter dvb_register_adapter" >> dvbdevwrap.h`;
+-    return 0;
+-  }
+-
+-  #test linux-version >= 2.6.5
+-  system("ln -sf chkdvb-2.6.5.c config-dvb/chkdvb.c");
+-  if(system("$cmd") == 0) {
+-    print "Found dvbdev.h from 2.6.5 or later\n";
+-    print "But this is an unsupported kernel!\n";
+-    return 1;
+-  }
+-  #maybe kernel headers aren't available.  let's use canned dvbdev.h
+-  #this is dangerous!
+-  $uname = `uname -r`;
+-  if($uname =~ /2\.6\.(\d\d)/ && $1 >= 22) {
+-    system("ln -sf ../dvbdev-2.6.v4l.h config-dvb/dvbdev.h"); 
+-    system("ln -sf chkdvb-2.6.v4l.c config-dvb/chkdvb.c"); 
+-    if(system("$cmd") == 0) {
+-      print "Found 2.6.22 or later kernel, but no dvbdev.h\n";
+-      print "Using canned header\n";
+-      `echo "DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);" >> dvbdevwrap.h`; 
+-      `echo "#define wrap_dvb_reg_adapter(a, b, c) dvb_register_adapter(a, b, c, &dvblb_basedev->dev, adapter_nr)" >> dvbdevwrap.h`; 
+-      system("ln -sf dvbdev-2.6.v4l.h dvbdev.h"); 
+-      return 0;
+-    }
+-  }
+-  elsif($uname =~ /2\.6\.2[01]/ ||
+-        $uname =~ /2\.6\.1[89]/) {
+-    system("ln -sf ../dvbdev-2.6.18.h config-dvb/dvbdev.h");
+-    system("ln -sf chkdvb-2.6.18.c config-dvb/chkdvb.c");
+-    if(system("$cmd") == 0) {
+-      print "Found 2.6.18 or later kernel, but no dvbdev.h\n";
+-      print "Using canned header\n";
+-      `echo "#define wrap_dvb_reg_adapter(a, b, c) dvb_register_adapter(a, b, c, &dvblb_basedev->dev)" >> dvbdevwrap.h`;
+-      system("ln -sf dvbdev-2.6.18.h dvbdev.h");
+-      return 0;
+-    }
+-  }
+-  elsif($uname =~ /2\.6\.1[4-7]/) {
+-    system("ln -sf ../dvbdev-2.6.14.h config-dvb/dvbdev.h");
+-    system("ln -sf chkdvb-2.6.14.c config-dvb/chkdvb.c");
+-    if(system("$cmd") == 0) {
+-      print "Found 2.6.14 or later kernel, but no dvbdev.h\n";
+-      print "Using canned header\n";
+-      `echo "#define wrap_dvb_reg_adapter dvb_register_adapter" >> dvbdevwrap.h`;
+-      system("ln -sf dvbdev-2.6.14.h dvbdev.h");
+-      return 0;
+-    }
+-  }
+-  print "Could not identify kernel\n";
+-  return 1;
+ }
+ exit(test_dvb_adapter(@ARGV));
+--- sc/contrib/sasc-ng/configure.old   2013-01-04 16:08:36.000000000 +0100
++++ sc/contrib/sasc-ng/configure       2013-01-04 16:09:11.000000000 +0100
+@@ -221,6 +221,9 @@
+   elif test -e "${dvb_path}/linux/include/linux/dvb/frontend.h"; then
+     echo "DVB_DIR=${dvb_path}/linux" >> config.mak
+     echo "Using DVB_DIR: ${dvb_path}/linux"
++  elif test -e "${dvb_path}/include/uapi/linux/dvb/frontend.h"; then
++    echo "DVB_DIR=${dvb_path}" >> config.mak
++    echo "Using DVB_DIR: ${dvb_path}"
+   else
+     echo "Could not find DVB headers within $dvb_path"
+   fi
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..ccad3e2
--- /dev/null
@@ -0,0 +1,2 @@
+always-assume-recent-kernel.patch
+use-proper-kernel-header-locations.patch
diff --git a/debian/patches/use-proper-kernel-header-locations.patch b/debian/patches/use-proper-kernel-header-locations.patch
new file mode 100644 (file)
index 0000000..2a8ec62
--- /dev/null
@@ -0,0 +1,38 @@
+diff -r 29b7b5f231c8 Makefile
+--- a/contrib/sasc-ng/Makefile Sat Jul 21 20:51:33 2012 +0200
++++ b/contrib/sasc-ng/Makefile Tue Jan 08 13:14:13 2013 +0100
+@@ -12,7 +12,7 @@
+ CFLAGS   ?= -Wall -D__user= 
+ ifdef DVB_DIR
+-  INCLUDES = -I$(DVB_DIR)/include
++  INCLUDES = -I$(SOURCE_DIR)/include/uapi -I$(SOURCE_DIR)/arch/x86/include -I$(SOURCE_DIR)/include
+   DVB_MOD_DIR = DVB_DIR=$(DVB_DIR)
+ endif
+diff -r 29b7b5f231c8 dvbloopback/module/Makefile
+--- a/contrib/sasc-ng/dvbloopback/module/Makefile      Sat Jul 21 20:51:33 2012 +0200
++++ b/contrib/sasc-ng/dvbloopback/module/Makefile      Tue Jan 08 13:14:13 2013 +0100
+@@ -4,7 +4,9 @@
+ dvbloopback-objs := dvb_loopback.o dvblb_proc.o dvblb_forward.o
+ ifdef DVB_DIR
+-  EXTRA_CFLAGS = -I$(DVB_DIR) -I$(DVB_DIR)/drivers/media/dvb/dvb-core
++  EXTRA_CFLAGS = -I$(SOURCE_DIR) -I$(SOURCE_DIR)/include \
++     -I$(SOURCE_DIR)/include/uapi -I$(SOURCE_DIR)/arch/x86/include \
++     -I$(DVB_DIR)/drivers/media/dvb-core
+   DVB_SRC = $(DVB_DIR)
+   SYMVER = $(DVB_DIR)/../v4l/Module.symvers
+   have_modver := $(wildcard $(SYMVER))
+diff -r 29b7b5f231c8 dvbloopback/module/config-dvb/Makefile
+--- a/contrib/sasc-ng/dvbloopback/module/config-dvb/Makefile   Sat Jul 21 20:51:33 2012 +0200
++++ b/contrib/sasc-ng/dvbloopback/module/config-dvb/Makefile   Tue Jan 08 13:14:13 2013 +0100
+@@ -4,7 +4,7 @@
+ EXTRA_CFLAGS ?= -Idrivers/media/dvb/dvb-core/ -I$(PWD)
+-BUILD_DIR := /lib/modules/$(shell uname -r)/build
++BUILD_DIR ?= /lib/modules/$(shell uname -r)/build
+ all: clean
+       make -C $(BUILD_DIR) M=$(PWD) V=1 modules
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..0b49ae2
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+
+kernel_name = "3.7-trunk-amd64"
+kernel_version = "3.7.1-1~experimental.2.sasc1"
+
+DVB_DIR=/home/janpascal/src/tmp/linux/linux-3.7.1
+
+PACKAGE = $(firstword $(shell dh_listpackages))
+TMP     = $(CURDIR)/debian/$(PACKAGE)
+
+SUBSTVARS = \
+ -Vkver:Depends="linux-image-$(kernel_name) (=$(kernel_version))" \
+ -Vkver:BuildDepends="linux-headers-$(kernel_name) (=$(kernel_version))"
+
+#SUBSTVARS = -Vkver:BuildDepends="foo (>= 2)"
+
+%:
+       dh $@
+
+override_dh_gencontrol:
+       dh_gencontrol -- $(SUBSTVARS)
+
+override_dh_auto_configure:
+       cd contrib/sasc-ng; ./configure --dvb-dir=$(DVB_DIR)
+       
+override_dh_auto_clean:
+       cd contrib/sasc-ng; if [ -r config.mak ]; then make clean module_clean; fi
+       
+override_dh_auto_build:
+       cd contrib/sasc-ng; make module; make
+
+override_dh_auto_install:
+       mkdir -p $(TMP)/usr/bin
+       mkdir -p $(TMP)/lib/modules/$(kernel_name)/misc
+       mkdir -p $(TMP)/usr/lib/
+       install -m0755 contrib/sasc-ng/sasc-ng $(TMP)/usr/bin/
+       install -m0644 contrib/sasc-ng/dvbloopback.ko $(TMP)/lib/modules/$(kernel_name)/misc
+       install -m0644 contrib/sasc-ng/sc/PLUGINS/lib/* $(TMP)/usr/lib/
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)