3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
16 # This has to be exported to make some magic below work.
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
27 config.status: configure
28 #### CONFIG.STATUS ####
31 # Add here commands to configure the package.
32 cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control; \
33 ./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr
37 build-indep: build-indep-stamp
39 build-indep-stamp: config.status
40 #### BUILD-INDEP-STAMP ####
41 # Add here commands to compile the indep part of the package.
48 rm -f build-indep-stamp #CONFIGURE-STAMP#
50 # Add here commands to clean up after the build process.
52 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
53 cp -f /usr/share/misc/config.sub config.sub
55 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
56 cp -f /usr/share/misc/config.guess config.guess
62 install: install-indep install-arch
64 #### INSTALL-INDEP ####
70 # Add here commands to install the indep part of the package into
71 # debian/<package>-doc.
72 $(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install
73 $(MAKE) -C src PREFIX=$(CURDIR)/debian/canfestival/usr install
74 $(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install
75 $(MAKE) -C examples PREFIX=$(CURDIR)/debian/canfestival/usr install
76 $(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share/CanFestival-3 install
78 mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src
79 mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include
80 mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix
81 cp -a $(CURDIR)/debian/canfestival/usr/include/canfestival/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include
82 cp -a $(CURDIR)/debian/canfestival/usr/lib/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src
83 cp -a $(CURDIR)/debian/canfestival/usr/lib/libcanfestival_unix.a $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix
84 cp $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config.py $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py
86 mkdir -p $(CURDIR)/debian/canfestival/usr/share/applications
87 cp objdictgen/networkedit.png $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen
88 cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop
90 dh_install -i --sourcedir=debian/canfestival
93 #### BINARY-COMMON ####
96 dh_installchangelogs CHANGES
101 # dh_installlogrotate
117 # dh_shlibdeps -l /usr/lib
121 # Build architecture independant packages using the common target.
122 binary-indep: build-indep install-indep
123 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
126 .PHONY: build clean binary-indep binary install install-indep