]> rtime.felk.cvut.cz Git - CanFestival-3.git/blob - debian/rules
Bug in file fixed
[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         
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
34          
35 build: build-indep
36
37 build-indep: build-indep-stamp
38
39 build-indep-stamp:  config.status
40         #### BUILD-INDEP-STAMP ####
41         # Add here commands to compile the indep part of the package.
42         $(MAKE)
43         
44 clean:
45         #### CLEAN ####
46         dh_testdir
47         dh_testroot
48         rm -f build-indep-stamp #CONFIGURE-STAMP#
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.
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
89         
90         dh_install -i --sourcedir=debian/canfestival
91
92 binary-common:
93         #### BINARY-COMMON ####
94         dh_testdir
95         dh_testroot
96         dh_installchangelogs CHANGES
97         dh_installdocs
98 #       dh_installexamples
99 #       dh_installmenu
100 #       dh_installdebconf       
101 #       dh_installlogrotate     
102 #       dh_installemacsen
103 #       dh_installpam
104 #       dh_installmime
105 #       dh_python
106 #       dh_installinit
107 #       dh_installcron
108 #       dh_installinfo
109 #       dh_installman
110         dh_link
111         dh_strip
112         dh_compress
113         dh_fixperms
114 #       dh_perl
115 #       dh_makeshlibs
116         dh_installdeb
117 #       dh_shlibdeps -l /usr/lib
118         dh_gencontrol
119         dh_md5sums
120         dh_builddeb
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
124
125 binary: binary-indep
126 .PHONY: build clean binary-indep binary install install-indep