add debian directory to create debian binary packages
authorgreg
Mon, 31 Dec 2007 08:45:27 +0100
changeset 346 59dbdcc99264
parent 345 62d6b770a85f
child 347 1bded8bd8997
add debian directory to create debian binary packages
debian/README.Debian
debian/canfestival-devel.install
debian/canfestival-doc.docs
debian/canfestival-doc.install
debian/canfestival-examples.install
debian/canfestival-objdictedit.install
debian/canfestival-objdictedit.postinst
debian/canfestival-objdictedit.postrm
debian/canfestival-peak.install
debian/canfestival-peak.postinst
debian/canfestival-socket.install
debian/canfestival-virtual.install
debian/changelog
debian/compat
debian/control
debian/control-peak
debian/control-socket
debian/control-virtual
debian/copyright
debian/dirs
debian/docs
debian/files
debian/objdictedit.desktop
debian/objdictedit.png
debian/patches/00list
debian/patches/01-makefile.dpatch
debian/patches/02-makefile_examples.dpatch
debian/patches/03-makefile_objdictgen.dpatch
debian/rules
debian/substvars
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/README.Debian	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,6 @@
+canfestival for Debian
+----------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- lolitech <gregory.trelat@lolitech.net>  Fri, 16 Nov 2007 11:22:17 +0100
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-devel.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,3 @@
+usr/include/canfestival/*
+usr/lib/libcanfestival.a
+usr/lib/libcanfestival_unix.a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-doc.docs	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+debian/canfestival/usr/share/objdictgen/doc/*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-doc.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,2 @@
+#DOCS#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-examples.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,4 @@
+usr/bin/TestMasterSlave
+usr/bin/TestMasterMicroMod
+usr/bin/DS401_Slave_Gui
+usr/bin/DS401_Master
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-objdictedit.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,2 @@
+usr/share/objdictgen/*
+usr/share/applications/objdictedit.desktop
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-objdictedit.postinst	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,43 @@
+#!/bin/sh
+# postinst script for canfestival
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+	ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictedit 
+	ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictgen
+	;;
+	
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-objdictedit.postrm	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,36 @@
+#!/bin/sh
+# postrm script for canfestival-objdictedit
+#
+# see: dh_installdeb(1)
+
+set -e
+
+OBJDICTEDIT=/usr/bin/objdictedit
+OBJDICTGEN=/usr/bin/objdictgen
+
+case "$1" in
+    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+	
+	if [ -f "$OBJDICTEDIT" ]; then		
+		rm $OBJDICTEDIT
+	fi
+
+	if [ -f "$OBJDICTGEN" ]; then		
+		rm $OBJDICTGEN
+	fi
+	;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-peak.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+usr/lib/libcanfestival_can_peak_linux.so
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-peak.postinst	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,42 @@
+#!/bin/sh
+# postinst script for canfestival
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+	ldconfig    
+	;;
+	
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-socket.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+usr/lib/libcanfestival_can_socket.so
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/canfestival-virtual.install	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+usr/lib/libcanfestival_can_virtual.so
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/changelog	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,6 @@
+canfestival (3-1) unstable; urgency=low
+
+  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+
+ -- lolitech <gregory.trelat@lolitech.net>  Fri, 16 Nov 2007 11:22:17 +0100
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/compat	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,42 @@
+Source: canfestival
+Section: devel
+Priority: standard
+Maintainer: lolitech <gregory.trelat@lolitech.fr>
+Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev
+Standards-Version: 3.7.2
+
+Package: canfestival
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+
+Package: canfestival-devel
+Architecture: all
+Description: Canfestival library
+ This package contains the CanFestival library for unix platform.
+
+Package: canfestival-examples
+Architecture: all
+Description: Program's Examples for canfestival
+ This package contains some test programs you can use as example
+ for your own developments.
+ - TestMasterSlave : Two CanOpen nodes in the same process
+ - TestMasterMicromod : A CanOpen master that control a peak MicroMod module
+ - DS401_Master : Master Node for the DS401_Slave_Gui
+ - DS401_Slave_Gui : Simulate an I/O module with GUI
+
+Package: canfestival-doc
+Architecture: all
+Description: Documentation for canfestival
+
+Package: canfestival-${CAN_INTERFACE}
+Architecture: all
+Description: Can Driver Interface for Peak Driver
+
+Package: canfestival-objdictedit
+Architecture: all
+Depends: python-wxgtk2.8, xpdf
+Description: A CanOpen Node Editor
+ Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to
+ create the C file needed to create a new CanOpen node.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control-peak	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,42 @@
+Source: canfestival
+Section: devel
+Priority: standard
+Maintainer: lolitech <gregory.trelat@lolitech.fr>
+Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev
+Standards-Version: 3.7.2
+
+Package: canfestival
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+
+Package: canfestival-devel
+Architecture: all
+Description: Canfestival library
+ This package contains the CanFestival library for unix platform.
+
+Package: canfestival-examples
+Architecture: all
+Description: Program's Examples for canfestival
+ This package contains some test programs you can use as example
+ for your own developments.
+ - TestMasterSlave : Two CanOpen nodes in the same process
+ - TestMasterMicromod : A CanOpen master that control a peak MicroMod module
+ - DS401_Master : Master Node for the DS401_Slave_Gui
+ - DS401_Slave_Gui : Simulate an I/O module with GUI
+
+Package: canfestival-doc
+Architecture: all
+Description: Documentation for canfestival
+
+Package: canfestival-peak
+Architecture: all
+Description: Can Driver Interface for Peak Driver
+
+Package: canfestival-objdictedit
+Architecture: all
+Depends: python-wxgtk2.8, xpdf
+Description: A CanOpen Node Editor
+ Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to
+ create the C file needed to create a new CanOpen node.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control-socket	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,42 @@
+Source: canfestival
+Section: devel
+Priority: standard
+Maintainer: lolitech <gregory.trelat@lolitech.fr>
+Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev
+Standards-Version: 3.7.2
+
+Package: canfestival
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+
+Package: canfestival-devel
+Architecture: all
+Description: Canfestival library
+ This package contains the CanFestival library for unix platform.
+
+Package: canfestival-examples
+Architecture: all
+Description: Program's Examples for canfestival
+ This package contains some test programs you can use as example
+ for your own developments.
+ - TestMasterSlave : Two CanOpen nodes in the same process
+ - TestMasterMicromod : A CanOpen master that control a peak MicroMod module
+ - DS401_Master : Master Node for the DS401_Slave_Gui
+ - DS401_Slave_Gui : Simulate an I/O module with GUI
+
+Package: canfestival-doc
+Architecture: all
+Description: Documentation for canfestival
+
+Package: canfestival-socket
+Architecture: all
+Description: Can interface for Socket-CAN
+
+Package: canfestival-objdictedit
+Architecture: all
+Depends: python-wxgtk2.8, xpdf
+Description: A CanOpen Node Editor
+ Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to
+ create the C file needed to create a new CanOpen node.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/control-virtual	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,42 @@
+Source: canfestival
+Section: devel
+Priority: standard
+Maintainer: lolitech <gregory.trelat@lolitech.fr>
+Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev
+Standards-Version: 3.7.2
+
+Package: canfestival
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+
+Package: canfestival-devel
+Architecture: all
+Description: Canfestival library
+ This package contains the CanFestival library for unix platform.
+
+Package: canfestival-examples
+Architecture: all
+Description: Program's Examples for canfestival
+ This package contains some test programs you can use as example
+ for your own developments.
+ - TestMasterSlave : Two CanOpen nodes in the same process
+ - TestMasterMicromod : A CanOpen master that control a peak MicroMod module
+ - DS401_Master : Master Node for the DS401_Slave_Gui
+ - DS401_Slave_Gui : Simulate an I/O module with GUI
+
+Package: canfestival-doc
+Architecture: all
+Description: Documentation for canfestival
+
+Package: canfestival-virtual
+Architecture: all
+Description: Virtual Can Interfaces 
+
+Package: canfestival-objdictedit
+Architecture: all
+Depends: python-wxgtk2.8, xpdf
+Description: A CanOpen Node Editor
+ Objdictedit, the Object Dictionary Editor, is a WxPython based GUI that is used to
+ create the C file needed to create a new CanOpen node.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/copyright	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,30 @@
+This package was debianized by lolitech <gregory.trelat@lolitech.fr> on
+Thu, 22 Nov 2007 09:23:34 +0100.
+
+It was downloaded from : http://www.canfestival.org
+
+Upstream Author: Edouard Tisserant <edouard.tisserant@lolitech.fr>
+
+License:
+
+    This package is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2007, lolitech <gregory.trelat@lolitech.fr> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/dirs	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+/usr/share/applications
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/files	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,6 @@
+canfestival_3-1_i386.deb devel standard
+canfestival-devel_3-1_all.deb devel standard
+canfestival-examples_3-1_all.deb devel standard
+canfestival-doc_3-1_all.deb devel standard
+canfestival-peak_3-1_all.deb devel standard
+canfestival-objdictedit_3-1_all.deb devel standard
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/objdictedit.desktop	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Objdictedit
+Comment=A CanOpen Node Editor
+Comment[fr]=Un Editeur de Noeud CanOpen
+Exec=/usr/bin/objdictedit
+Icon=/usr/share/objdictgen/objdictedit.png
+Terminal=false
+MultipleArgs=false
+Type=Application
+Categories=Application;Development;
+StartupNotify=true
+
Binary file debian/objdictedit.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/00list	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,3 @@
+#01-makefile
+#02-makefile_examples
+#03-makefile_objdictgen
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/01-makefile.dpatch	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-makefile.dpatch by  <lolitech@lolitech-desktop>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad canfestival-3~/Makefile.in canfestival-3/Makefile.in
+--- canfestival-3~/Makefile.in	2007-08-08 08:51:09.000000000 +0200
++++ canfestival-3/Makefile.in	2007-11-21 09:32:00.000000000 +0100
+@@ -46,7 +46,6 @@
+ 	$(MAKE) -C src $@
+ 	$(MAKE) -C examples $@
+ 	$(MAKE) -C objdictgen $@
+-	ldconfig
+ 
+ uninstall:
+ 	$(MAKE) -C drivers $@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/02-makefile_examples.dpatch	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02-makefile_examples.dpatch by  <lolitech@lolitech-desktop>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad canfestival-3~/examples/Makefile.in canfestival-3/examples/Makefile.in
+--- canfestival-3~/examples/Makefile.in	2007-10-11 09:13:05.000000000 +0200
++++ canfestival-3/examples/Makefile.in	2007-11-21 10:22:39.000000000 +0100
+@@ -30,8 +30,8 @@
+ 
+ ifeq ($(TARGET),unix)
+ 	$(MAKE) -C TestMasterSlave $@
+-#	$(MAKE) -C DS401_Master $@
+-#	$(MAKE) -C DS401_Slave_Gui $@
++	$(MAKE) -C DS401_Master $@
++	$(MAKE) -C DS401_Slave_Gui $@
+ 	$(MAKE) -C TestMasterMicroMod $@
+ endif
+ 
+@@ -49,8 +49,8 @@
+ 
+ ifeq ($(TARGET),unix)
+ 	$(MAKE) -C TestMasterSlave $@
+-#	$(MAKE) -C DS401_Master $@
+-#	$(MAKE) -C DS401_Slave_Gui $@
++	$(MAKE) -C DS401_Master $@
++	$(MAKE) -C DS401_Slave_Gui $@
+ 	$(MAKE) -C TestMasterMicroMod $@
+ endif
+ 
+@@ -70,15 +70,15 @@
+ install:
+ ifeq ($(TARGET),unix)
+ 	$(MAKE) -C TestMasterSlave $@
+-#	$(MAKE) -C DS401_Master $@
+-#	$(MAKE) -C DS401_Slave_Gui $@
++	$(MAKE) -C DS401_Master $@
++	$(MAKE) -C DS401_Slave_Gui $@
+ 	$(MAKE) -C TestMasterMicroMod $@
+ endif
+ 
+ uninstall:
+ ifeq ($(TARGET),unix)
+ 	$(MAKE) -C TestMasterSlave $@
+-#	$(MAKE) -C DS401_Master $@
+-#	$(MAKE) -C DS401_Slave_Gui $@
++	$(MAKE) -C DS401_Master $@
++	$(MAKE) -C DS401_Slave_Gui $@
+ 	$(MAKE) -C TestMasterMicroMod $@
+ endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/03-makefile_objdictgen.dpatch	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03-makefile_objdictgen.dpatch by  <lolitech@lolitech-desktop>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad CanFestival-3~/objdictgen/Makefile.in CanFestival-3/objdictgen/Makefile.in
+--- CanFestival-3~/objdictgen/Makefile.in	2007-09-30 22:36:59.000000000 +0200
++++ CanFestival-3/objdictgen/Makefile.in	2007-11-21 14:54:03.000000000 +0100
+@@ -35,17 +35,17 @@
+ 	rm -rf gnosis_extract
+ 
+ install: gnosis
+-	mkdir -p $(PREFIX)/objdictgen
+-	cp -r *.py* config doc doc_index examples gnosis $(PREFIX)/objdictgen
+-	chmod -R a+r $(PREFIX)/objdictgen
++	mkdir -p $(PREFIX)/share/objdictgen
++	cp -r *.py* config doc doc_index examples gnosis $(PREFIX)/share/objdictgen
++	chmod -R a+r $(PREFIX)/share/objdictgen
+ 	mkdir -p $(PREFIX)/bin
+-	ln -sf $(PREFIX)/objdictgen/objdictedit.py $(PREFIX)/bin/objdictedit
+-	chmod 755 $(PREFIX)/objdictgen/objdictedit.py
+-	ln -sf $(PREFIX)/objdictgen/objdictgen.py $(PREFIX)/bin/objdictgen
+-	chmod 755 $(PREFIX)/objdictgen/objdictgen.py
++	ln -sf $(PREFIX)/share/objdictgen/objdictedit.py $(PREFIX)/bin/objdictedit
++	chmod 755 $(PREFIX)/share/objdictgen/objdictedit.py
++	ln -sf $(PREFIX)/share/objdictgen/objdictgen.py $(PREFIX)/bin/objdictgen
++	chmod 755 $(PREFIX)/share/objdictgen/objdictgen.py
+ 
+ uninstall:
+-	rm -rf $(PREFIX)/objdictgen
++	rm -rf $(PREFIX)/share/objdictgen
+ 	rm -f $(PREFIX)/bin/objdictedit
+ 	rm -f $(PREFIX)/bin/objdictgen
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/rules	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,156 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets  by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: configure
+	#### CONFIG.STATUS ####	
+	dh_testdir
+	# Add here commands to configure the package.
+	cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control
+	./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr 
+
+##############
+# And now the simple things for dpatch. Here we only apply/unapply the patches.
+# You can do more things with dpatch, like having patches only applied on
+# a special architecture - see the non-dh version of the sample for this!
+patch: patch-stamp
+patch-stamp:
+	dpatch apply-all
+	dpatch cat-all >patch-stamp
+	touch patch-stamp
+
+unpatch:
+	dpatch deapply-all
+	rm -rf patch-stamp debian/patched
+
+##################
+#Architecture 
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp:  config.status patch
+	#### BUILD-ARCH-STAMP ####
+	# Add here commands to compile the arch part of the package.
+	$(MAKE) 
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp:  config.status
+	#### BUILD-INDEP-STAMP ####
+	# Add here commands to compile the indep part of the package.
+
+clean: unpatch
+	#### CLEAN ####
+	dh_testdir
+	dh_testroot
+	rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+	dh_clean 
+
+install: install-indep install-arch
+install-indep:
+	#### INSTALL-INDEP ####
+	dh_testdir
+	dh_testroot
+	dh_clean -k -i 
+	dh_installdirs -i
+
+	# Add here commands to install the indep part of the package into
+	# debian/<package>-doc.
+	
+	dh_install -i --sourcedir=debian/canfestival
+
+install-arch:
+	#### INSTALL-ARCH ####
+	dh_testdir
+	dh_testroot
+	dh_clean -k -s 
+	dh_installdirs -s
+
+	# Add here commands to install the arch part of the package into 
+	# debian/tmp.
+
+	$(MAKE) -C src PREFIX=$(CURDIR)/debian/canfestival/usr install	
+	$(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install
+	$(MAKE) -C examples PREFIX=$(CURDIR)/debian/canfestival/usr install
+	$(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share install
+	cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop
+	cp debian/objdictedit.png $(CURDIR)/debian/canfestival/usr/share/objdictgen/objdictedit.png
+	dh_install -s
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common:
+	#### BINARY-COMMON ####
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs CHANGES
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate	
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+#	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_shlibdeps -l /usr/lib
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+	#### BINARY-INDEP ####
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build-arch install-arch
+	#### BINARY-ARCH ####
+	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch patch unpatch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/substvars	Mon Dec 31 08:45:27 2007 +0100
@@ -0,0 +1,1 @@
+CAN_INTERFACE:$CAN_INTERFACE
\ No newline at end of file