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 ####
30 # Add here commands to configure the package.
31 cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control
32 ./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr
35 # And now the simple things for dpatch. Here we only apply/unapply the patches.
36 # You can do more things with dpatch, like having patches only applied on
37 # a special architecture - see the non-dh version of the sample for this!
41 dpatch cat-all >patch-stamp
46 rm -rf patch-stamp debian/patched
50 build: build-arch build-indep
52 build-arch: build-arch-stamp
53 build-arch-stamp: config.status patch
54 #### BUILD-ARCH-STAMP ####
55 # Add here commands to compile the arch part of the package.
59 build-indep: build-indep-stamp
60 build-indep-stamp: config.status
61 #### BUILD-INDEP-STAMP ####
62 # Add here commands to compile the indep part of the package.
68 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
70 # Add here commands to clean up after the build process.
72 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
73 cp -f /usr/share/misc/config.sub config.sub
75 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
76 cp -f /usr/share/misc/config.guess config.guess
82 install: install-indep install-arch
84 #### INSTALL-INDEP ####
90 # Add here commands to install the indep part of the package into
91 # debian/<package>-doc.
93 dh_install -i --sourcedir=debian/canfestival
96 #### INSTALL-ARCH ####
102 # Add here commands to install the arch part of the package into
105 $(MAKE) -C src PREFIX=$(CURDIR)/debian/canfestival/usr install
106 $(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install
107 $(MAKE) -C examples PREFIX=$(CURDIR)/debian/canfestival/usr install
108 $(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share install
109 cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop
110 cp debian/objdictedit.png $(CURDIR)/debian/canfestival/usr/share/objdictgen/objdictedit.png
113 # Must not depend on anything. This is to be called by
114 # binary-arch/binary-indep
115 # in another 'make' thread.
117 #### BINARY-COMMON ####
120 dh_installchangelogs CHANGES
125 # dh_installlogrotate
141 # dh_shlibdeps -l /usr/lib
145 # Build architecture independant packages using the common target.
146 binary-indep: build-indep install-indep
147 #### BINARY-INDEP ####
148 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
150 # Build architecture dependant packages using the common target.
151 binary-arch: build-arch install-arch
152 #### BINARY-ARCH ####
153 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
155 binary: binary-arch binary-indep
156 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch patch unpatch