author | edouard |
Tue, 27 Oct 2009 15:11:26 +0100 | |
changeset 611 | 3e0c776da33b |
parent 553 | e411fab0f72d |
child 612 | fc3399727a06 |
permissions | -rwxr-xr-x |
346 | 1 |
#!/usr/bin/make -f |
2 |
# -*- makefile -*- |
|
3 |
# Sample debian/rules that uses debhelper. |
|
4 |
# |
|
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. |
|
9 |
# |
|
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 |
|
12 |
||
13 |
# Uncomment this to turn on verbose mode. |
|
14 |
export DH_VERBOSE=1 |
|
15 |
||
16 |
# This has to be exported to make some magic below work. |
|
17 |
export DH_OPTIONS |
|
18 |
||
19 |
CFLAGS = -Wall -g |
|
20 |
||
21 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|
22 |
CFLAGS += -O0 |
|
23 |
else |
|
24 |
CFLAGS += -O2 |
|
25 |
endif |
|
26 |
||
27 |
config.status: configure |
|
28 |
#### CONFIG.STATUS #### |
|
29 |
dh_testdir |
|
531 | 30 |
|
346 | 31 |
# Add here commands to configure the package. |
531 | 32 |
cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control; \ |
33 |
./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr |
|
34 |
||
35 |
build: build-indep |
|
346 | 36 |
|
37 |
build-indep: build-indep-stamp |
|
531 | 38 |
|
346 | 39 |
build-indep-stamp: config.status |
40 |
#### BUILD-INDEP-STAMP #### |
|
41 |
# Add here commands to compile the indep part of the package. |
|
531 | 42 |
$(MAKE) |
43 |
||
44 |
clean: |
|
346 | 45 |
#### CLEAN #### |
46 |
dh_testdir |
|
47 |
dh_testroot |
|
531 | 48 |
rm -f build-indep-stamp #CONFIGURE-STAMP# |
346 | 49 |
|
50 |
# Add here commands to clean up after the build process. |
|
51 |
-$(MAKE) clean |
|
52 |
ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
|
53 |
cp -f /usr/share/misc/config.sub config.sub |
|
54 |
endif |
|
55 |
ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
|
56 |
cp -f /usr/share/misc/config.guess config.guess |
|
57 |
endif |
|
58 |
||
59 |
||
60 |
dh_clean |
|
61 |
||
62 |
install: install-indep install-arch |
|
63 |
install-indep: |
|
64 |
#### INSTALL-INDEP #### |
|
65 |
dh_testdir |
|
66 |
dh_testroot |
|
67 |
dh_clean -k -i |
|
68 |
dh_installdirs -i |
|
69 |
||
70 |
# Add here commands to install the indep part of the package into |
|
71 |
# debian/<package>-doc. |
|
531 | 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 |
|
553
e411fab0f72d
removed dead hidden files
'Gr?gory Tr?lat <gregory.trelat@lolitech.fr>'
parents:
531
diff
changeset
|
87 |
cp objdictgen/networkedit.ico $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen |
e411fab0f72d
removed dead hidden files
'Gr?gory Tr?lat <gregory.trelat@lolitech.fr>'
parents:
531
diff
changeset
|
88 |
cp objdictgen/networkedit.png $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen |
531 | 89 |
cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop |
346 | 90 |
|
91 |
dh_install -i --sourcedir=debian/canfestival |
|
92 |
||
93 |
binary-common: |
|
94 |
#### BINARY-COMMON #### |
|
95 |
dh_testdir |
|
96 |
dh_testroot |
|
97 |
dh_installchangelogs CHANGES |
|
98 |
dh_installdocs |
|
99 |
# dh_installexamples |
|
100 |
# dh_installmenu |
|
101 |
# dh_installdebconf |
|
102 |
# dh_installlogrotate |
|
103 |
# dh_installemacsen |
|
104 |
# dh_installpam |
|
105 |
# dh_installmime |
|
106 |
# dh_python |
|
107 |
# dh_installinit |
|
108 |
# dh_installcron |
|
109 |
# dh_installinfo |
|
110 |
# dh_installman |
|
111 |
dh_link |
|
112 |
dh_strip |
|
113 |
dh_compress |
|
114 |
dh_fixperms |
|
115 |
# dh_perl |
|
116 |
# dh_makeshlibs |
|
117 |
dh_installdeb |
|
118 |
# dh_shlibdeps -l /usr/lib |
|
119 |
dh_gencontrol |
|
120 |
dh_md5sums |
|
121 |
dh_builddeb |
|
122 |
# Build architecture independant packages using the common target. |
|
123 |
binary-indep: build-indep install-indep |
|
124 |
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
|
125 |
||
531 | 126 |
binary: binary-indep |
127 |
.PHONY: build clean binary-indep binary install install-indep |