dvb/linuxtv-dvb/debian/dvb-driver.debian rules

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Mon, 31 May 2004 13:55:09 +0000


Update of /cvsroot/pkg-vdr-dvb/dvb/linuxtv-dvb/debian/dvb-driver.debian
In directory haydn:/tmp/cvs-serv18599/dvb/linuxtv-dvb/debian/dvb-driver.debian

Modified Files:
	rules 
Log Message:
added code to download the dvb-ttpci-firmware at build-time

Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/dvb/linuxtv-dvb/debian/dvb-driver.debian/rules,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rules	31 May 2004 10:52:40 -0000	1.6
+++ rules	31 May 2004 13:55:07 -0000	1.7
@@ -38,6 +38,11 @@
        s!\$$KDREV!$(KDREV)!; \
        s!\$$DEBDATE!$(shell date +"%a, %d %b %Y %H:%M:%S %z")!
 
+# Variables for the firmware-download
+DOWNLOAD_DIR = $(CURDIR)/build-2.4
+BASEURL      = http://www.linuxtv.org/download/dvb
+FILENAME 	 = dvb-ttpci-01.fw
+
 debian/control: debian/control.in
 	sed -e "$(SED_SCRIPT)" debian/control.in > $@
 
@@ -54,8 +59,21 @@
 	sed 's/#KVERS#/$(KVERS)/g' debian/postinst.01.template > $(CURDIR)/debian/postinst.01
 	sed 's/#KVERS#/$(KVERS)/g' debian/postinst.04.template > $(CURDIR)/debian/postinst.04
 	cat debian/postinst.0? > debian/postinst
+
+	# Downloading of the dvb-ttpci-firmware, as it is not included in the 
+	# upstream-source-package, but it is needed at compile-time to compile 
+	# drivers for kernel 2.4
+	if [ ! -f $(DOWNLOAD_DIR)/$(FILENAME) ]; then \
+		echo "Firmware for dvb-ttpci-cards needs to be downloaded."; \
+		if ! `wget --passive-ftp -P $(DOWNLOAD_DIR) $(BASEURL)/$(FILENAME)`; then \
+			echo "http://www.linuxtv.org/download/dvb/dvb-ttpci-01.fw not on web server."; \
+			exit 1; \
+		fi; \
+	fi
+	
 	dh_testdir
 	dh_testroot
+	
 	touch configure_mod-stamp
 
 
@@ -63,7 +81,7 @@
 build_mod:
 	dh_testdir
 	dh_testroot
-
+	
 	cd build-2.4 && [ -L saa7146_video.c ] || ./getlinks
 	$(MAKE) 
 
@@ -75,12 +93,10 @@
 	dh_testdir
 	dh_testroot
 	dh_clean -k
-	dh_installdirs -p dvb-driver-$(KVERS) usr/lib/dvd lib/modules/$(KVERS)/misc lib/modules/$(KVERS)-dvb etc/modutils etc/devfs/symlinks.d etc/devfs/conf.d
+	dh_installdirs -p dvb-driver-$(KVERS) usr/lib/dvd lib/modules/$(KVERS)/misc etc/modutils etc/devfs/symlinks.d etc/devfs/conf.d
 	
 	cp -a build-2.4/*.o debian/dvb-driver-$(KVERS)/lib/modules/$(KVERS)/misc
-
-	cp debian/modules.conf debian/dvb-driver-$(KVERS)/etc/modutils/dvb-$(KVERS)
-
+	
 	cp debian/dvb.symlinks.d debian/dvb-driver-$(KVERS)/etc/devfs/symlinks.d/dvb-driver-$(KVERS)
 	cp debian/dvb.conf.d debian/dvb-driver-$(KVERS)/etc/devfs/conf.d/dvb-driver-$(KVERS)