]> rtime.felk.cvut.cz Git - CanFestival-3.git/blob - debian/rules
fe613dee1b6ed67a83e192fd35895d65e0653d80
[CanFestival-3.git] / debian / rules
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
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 
33
34 ##############
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
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.
63
64 clean: unpatch
65         #### CLEAN ####
66         dh_testdir
67         dh_testroot
68         rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
69
70         # Add here commands to clean up after the build process.
71         -$(MAKE) clean
72 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
73         cp -f /usr/share/misc/config.sub config.sub
74 endif
75 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
76         cp -f /usr/share/misc/config.guess config.guess
77 endif
78
79
80         dh_clean 
81
82 install: install-indep install-arch
83 install-indep:
84         #### INSTALL-INDEP ####
85         dh_testdir
86         dh_testroot
87         dh_clean -k -i 
88         dh_installdirs -i
89
90         # Add here commands to install the indep part of the package into
91         # debian/<package>-doc.
92         
93         dh_install -i --sourcedir=debian/canfestival
94
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:
117         #### BINARY-COMMON ####
118         dh_testdir
119         dh_testroot
120         dh_installchangelogs CHANGES
121         dh_installdocs
122 #       dh_installexamples
123 #       dh_installmenu
124 #       dh_installdebconf       
125 #       dh_installlogrotate     
126 #       dh_installemacsen
127 #       dh_installpam
128 #       dh_installmime
129 #       dh_python
130 #       dh_installinit
131 #       dh_installcron
132 #       dh_installinfo
133 #       dh_installman
134         dh_link
135         dh_strip
136         dh_compress
137         dh_fixperms
138 #       dh_perl
139 #       dh_makeshlibs
140         dh_installdeb
141 #       dh_shlibdeps -l /usr/lib
142         dh_gencontrol
143         dh_md5sums
144         dh_builddeb
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
149
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
154
155 binary: binary-arch binary-indep
156 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch patch unpatch