From 7aeb55d85623e0182636691e182263efa6cdde33 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 2 Mar 2009 08:30:08 +0000 Subject: [PATCH] updated : debian package scripts --- debian/canfestival-devel.install | 3 + debian/canfestival-examples.install | 4 +- debian/canfestival-objdictedit.install | 2 +- debian/canfestival-objdictedit.postinst | 2 +- debian/canfestival-virtual.postinst | 53 +++++++++++++++ debian/canfestival-virtual.postrm | 57 ++++++++++++++++ debian/changelog | 2 +- debian/control | 3 +- debian/control-peak_linux | 35 +--------- debian/control-virtual | 10 +-- debian/objdictedit.desktop | 2 +- debian/rules | 86 ++++++++----------------- debian/substvars | 1 - 13 files changed, 154 insertions(+), 106 deletions(-) create mode 100755 debian/canfestival-virtual.postinst create mode 100755 debian/canfestival-virtual.postrm delete mode 100644 debian/substvars diff --git a/debian/canfestival-devel.install b/debian/canfestival-devel.install index db16473..6ca573d 100644 --- a/debian/canfestival-devel.install +++ b/debian/canfestival-devel.install @@ -1,3 +1,6 @@ usr/include/canfestival/* usr/lib/libcanfestival.a usr/lib/libcanfestival_unix.a +usr/share/CanFestival-3/src/* +usr/share/CanFestival-3/include/* +usr/share/CanFestival-3/drivers/* \ No newline at end of file diff --git a/debian/canfestival-examples.install b/debian/canfestival-examples.install index 06f3b04..7540c08 100644 --- a/debian/canfestival-examples.install +++ b/debian/canfestival-examples.install @@ -1,4 +1,4 @@ usr/bin/TestMasterSlave usr/bin/TestMasterMicroMod -usr/bin/DS401_Slave_Gui -usr/bin/DS401_Master +#usr/bin/DS401_Slave_Gui +#usr/bin/DS401_Master diff --git a/debian/canfestival-objdictedit.install b/debian/canfestival-objdictedit.install index aa306c0..0add5b3 100644 --- a/debian/canfestival-objdictedit.install +++ b/debian/canfestival-objdictedit.install @@ -1,2 +1,2 @@ -usr/share/objdictgen/* +usr/share/CanFestival-3/objdictgen/* usr/share/applications/objdictedit.desktop \ No newline at end of file diff --git a/debian/canfestival-objdictedit.postinst b/debian/canfestival-objdictedit.postinst index 0d20d3c..2f0320c 100644 --- a/debian/canfestival-objdictedit.postinst +++ b/debian/canfestival-objdictedit.postinst @@ -20,7 +20,7 @@ set -e case "$1" in configure) - ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictedit + ln -sf /usr/share/CanFestival-3/objdictgen/objdictedit.py /usr/bin/objdictedit ln -sf /usr/share/objdictgen/objdictedit.py /usr/bin/objdictgen ;; diff --git a/debian/canfestival-virtual.postinst b/debian/canfestival-virtual.postinst new file mode 100755 index 0000000..bafaa3b --- /dev/null +++ b/debian/canfestival-virtual.postinst @@ -0,0 +1,53 @@ +#!/bin/sh +# postinst script for canfestival +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +DLL_LIST= +CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py +CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py +case "$1" in + configure) + ldconfig + cd /usr/lib + DLL_LIST= + FILES= + for file in libcanfestival_can* + do + DLL_LIST="$file,""$DLL_LIST" + done + cat $CF_CONFIG_TEMP > $CF_CONFIG + echo "DLL_LIST=[$DLL_LIST]" >> $CF_CONFIG + ;; + + 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 + + diff --git a/debian/canfestival-virtual.postrm b/debian/canfestival-virtual.postrm new file mode 100755 index 0000000..811a78d --- /dev/null +++ b/debian/canfestival-virtual.postrm @@ -0,0 +1,57 @@ +#!/bin/sh +# postinst script for canfestival +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +DLL_LIST= +CF_CONFIG=/usr/share/CanFestival-3/objdictgen/canfestival_config.py +CF_CONFIG_TEMP=/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py + +case "$1" in + configure) + ;; + + remove|purge) + ldconfig + cd /usr/lib + DLL_LIST= + FILES= + for file in libcanfestival_can* + do + DLL_LIST="$file,""$DLL_LIST" + done + cat $CF_CONFIG_TEMP > $CF_CONFIG + echo 'DLL_LIST=["$DLL_LIST"]' >> $CF_CONFIG + ;; + + 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 + + diff --git a/debian/changelog b/debian/changelog index 55b6b3f..e601d88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -canfestival (3-1) unstable; urgency=low +canfestival (3.1-%DATEVERSION%) unstable; urgency=low * Initial release (Closes: #nnnn) diff --git a/debian/control b/debian/control index 84fa2ec..1d32c63 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: canfestival Section: devel Priority: standard Maintainer: lolitech -Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev +Build-Depends: debhelper (>= 5) +#, autotools-dev, libwxgtk2.8-dev Standards-Version: 3.7.2 Package: canfestival diff --git a/debian/control-peak_linux b/debian/control-peak_linux index 066b88b..67260cb 100644 --- a/debian/control-peak_linux +++ b/debian/control-peak_linux @@ -5,38 +5,7 @@ Maintainer: lolitech Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev Standards-Version: 3.7.2 -Package: canfestival -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -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. - +Depends: canfestival-devel, canfestival-objdictedit, peak-linux-driver-modules +Description: Can Driver Interface for Peak Driver \ No newline at end of file diff --git a/debian/control-virtual b/debian/control-virtual index 1954d26..6f0f709 100644 --- a/debian/control-virtual +++ b/debian/control-virtual @@ -5,11 +5,6 @@ Maintainer: lolitech Build-Depends: debhelper (>= 5), autotools-dev, libwxgtk2.8-dev Standards-Version: 3.7.2 -Package: canfestival -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: - Package: canfestival-devel Architecture: all Description: Canfestival library @@ -31,11 +26,12 @@ Description: Documentation for canfestival Package: canfestival-virtual Architecture: all -Description: Virtual Can Interfaces +Depends: canfestival-devel, canfestival-objdictedit +Description: Virtual Can Interfaces Package: canfestival-objdictedit Architecture: all -Depends: python-wxgtk2.8, xpdf +Depends: python-wxgtk2.8, xpdf, docutils 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. diff --git a/debian/objdictedit.desktop b/debian/objdictedit.desktop index 8a5b7a3..cde910b 100644 --- a/debian/objdictedit.desktop +++ b/debian/objdictedit.desktop @@ -4,7 +4,7 @@ Name=Objdictedit Comment=A CanOpen Node Editor Comment[fr]=Un Editeur de Noeud CanOpen Exec=/usr/bin/objdictedit -Icon=/usr/share/objdictgen/objdictedit.png +Icon=/usr/share/CanFestival-3/objdictgen/networkedit.png Terminal=false MultipleArgs=false Type=Application diff --git a/debian/rules b/debian/rules index fe613de..af3ff6b 100755 --- a/debian/rules +++ b/debian/rules @@ -27,45 +27,25 @@ 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 $@ + cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control; \ + ./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr + +build: build-indep 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 + $(MAKE) + +clean: #### CLEAN #### dh_testdir dh_testroot - rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# + rm -f build-indep-stamp #CONFIGURE-STAMP# # Add here commands to clean up after the build process. -$(MAKE) clean @@ -89,30 +69,26 @@ install-indep: # Add here commands to install the indep part of the package into # debian/-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 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 + $(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share/CanFestival-3 install + + mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src + mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include + mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix + cp -a $(CURDIR)/debian/canfestival/usr/include/canfestival/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include + cp -a $(CURDIR)/debian/canfestival/usr/lib/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src + cp -a $(CURDIR)/debian/canfestival/usr/lib/libcanfestival_unix.a $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix + cp $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config.py $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py + + mkdir -p $(CURDIR)/debian/canfestival/usr/share/applications + cp objdictgen/networkedit.png $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen 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 + + dh_install -i --sourcedir=debian/canfestival -# 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 @@ -144,13 +120,7 @@ binary-common: 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 +binary: binary-indep +.PHONY: build clean binary-indep binary install install-indep diff --git a/debian/substvars b/debian/substvars deleted file mode 100644 index 1f13108..0000000 --- a/debian/substvars +++ /dev/null @@ -1 +0,0 @@ -CAN_INTERFACE:$CAN_INTERFACE \ No newline at end of file -- 2.39.2