25 endif |
25 endif |
26 |
26 |
27 config.status: configure |
27 config.status: configure |
28 #### CONFIG.STATUS #### |
28 #### CONFIG.STATUS #### |
29 dh_testdir |
29 dh_testdir |
|
30 |
30 # Add here commands to configure the package. |
31 # Add here commands to configure the package. |
31 cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control |
32 cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control; \ |
32 ./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr |
33 ./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr |
33 |
34 |
34 ############## |
35 build: build-indep |
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! |
|
38 patch: patch-stamp |
|
39 patch-stamp: |
|
40 dpatch apply-all |
|
41 dpatch cat-all >patch-stamp |
|
42 touch patch-stamp |
|
43 |
|
44 unpatch: |
|
45 dpatch deapply-all |
|
46 rm -rf patch-stamp debian/patched |
|
47 |
|
48 ################## |
|
49 #Architecture |
|
50 build: build-arch build-indep |
|
51 |
|
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. |
|
56 $(MAKE) |
|
57 touch $@ |
|
58 |
36 |
59 build-indep: build-indep-stamp |
37 build-indep: build-indep-stamp |
|
38 |
60 build-indep-stamp: config.status |
39 build-indep-stamp: config.status |
61 #### BUILD-INDEP-STAMP #### |
40 #### BUILD-INDEP-STAMP #### |
62 # Add here commands to compile the indep part of the package. |
41 # Add here commands to compile the indep part of the package. |
63 |
42 $(MAKE) |
64 clean: unpatch |
43 |
|
44 clean: |
65 #### CLEAN #### |
45 #### CLEAN #### |
66 dh_testdir |
46 dh_testdir |
67 dh_testroot |
47 dh_testroot |
68 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP# |
48 rm -f build-indep-stamp #CONFIGURE-STAMP# |
69 |
49 |
70 # Add here commands to clean up after the build process. |
50 # Add here commands to clean up after the build process. |
71 -$(MAKE) clean |
51 -$(MAKE) clean |
72 ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
52 ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
73 cp -f /usr/share/misc/config.sub config.sub |
53 cp -f /usr/share/misc/config.sub config.sub |
87 dh_clean -k -i |
67 dh_clean -k -i |
88 dh_installdirs -i |
68 dh_installdirs -i |
89 |
69 |
90 # Add here commands to install the indep part of the package into |
70 # Add here commands to install the indep part of the package into |
91 # debian/<package>-doc. |
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 |
|
77 |
|
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 |
|
85 |
|
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 |
92 |
89 |
93 dh_install -i --sourcedir=debian/canfestival |
90 dh_install -i --sourcedir=debian/canfestival |
94 |
91 |
95 install-arch: |
|
96 #### INSTALL-ARCH #### |
|
97 dh_testdir |
|
98 dh_testroot |
|
99 dh_clean -k -s |
|
100 dh_installdirs -s |
|
101 |
|
102 # Add here commands to install the arch part of the package into |
|
103 # debian/tmp. |
|
104 |
|
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 |
|
111 dh_install -s |
|
112 |
|
113 # Must not depend on anything. This is to be called by |
|
114 # binary-arch/binary-indep |
|
115 # in another 'make' thread. |
|
116 binary-common: |
92 binary-common: |
117 #### BINARY-COMMON #### |
93 #### BINARY-COMMON #### |
118 dh_testdir |
94 dh_testdir |
119 dh_testroot |
95 dh_testroot |
120 dh_installchangelogs CHANGES |
96 dh_installchangelogs CHANGES |
142 dh_gencontrol |
118 dh_gencontrol |
143 dh_md5sums |
119 dh_md5sums |
144 dh_builddeb |
120 dh_builddeb |
145 # Build architecture independant packages using the common target. |
121 # Build architecture independant packages using the common target. |
146 binary-indep: build-indep install-indep |
122 binary-indep: build-indep install-indep |
147 #### BINARY-INDEP #### |
|
148 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
123 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
149 |
124 |
150 # Build architecture dependant packages using the common target. |
125 binary: binary-indep |
151 binary-arch: build-arch install-arch |
126 .PHONY: build clean binary-indep binary install install-indep |
152 #### BINARY-ARCH #### |
|
153 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common |
|
154 |
|
155 binary: binary-arch binary-indep |
|
156 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch patch unpatch |
|