TODO update
[barry.git] / debian / rules
blobb88cacc784c91b61f1c81da28ed0183ccb1bb677
1 #!/usr/bin/make -f
2 # -*- makefile -*-
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.
14 #export DH_VERBOSE=1
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
21 CFLAGS = -Wall -g
23 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24 CFLAGS += -O0
25 else
26 CFLAGS += -O2
27 endif
29 configure: configure-stamp
30 configure-stamp:
31 dh_testdir
32 # Add here commands to configure the package.
34 touch configure-stamp
37 #Architecture
38 build: build-arch build-indep
40 build-arch: build-arch-stamp
41 build-arch-stamp: configure-stamp
43 # Add here commands to compile the arch part of the package.
44 #$(MAKE)
45 g++-3.3 -Wall -o tools/bcharge tools/bcharge.cc -lusb
47 touch build-arch-stamp
49 build-indep: build-indep-stamp
50 build-indep-stamp: configure-stamp
52 # Add here commands to compile the indep part of the package.
53 #$(MAKE) doc
54 touch build-indep-stamp
56 clean:
57 dh_testdir
58 dh_testroot
59 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
61 # Add here commands to clean up after the build process.
62 #-$(MAKE) clean
64 rm -f tools/bcharge
66 dh_clean --exclude ./src/Makefile.orig
68 install: install-indep install-arch
69 install-indep:
70 dh_testdir
71 dh_testroot
72 dh_clean -k -i --exclude ./src/Makefile.orig
73 dh_installdirs -i
75 # Add here commands to install the indep part of the package into
76 # debian/<package>-doc.
77 #INSTALLDOC#
79 dh_install -i
81 install-arch:
82 dh_testdir
83 dh_testroot
84 dh_clean -k -s --exclude ./src/Makefile.orig
85 dh_installdirs -s
87 # Add here commands to install the arch part of the package into
88 # debian/tmp.
89 #$(MAKE) install DESTDIR=$(CURDIR)/debian/barry
90 install -d $(CURDIR)/debian/barry/usr/sbin
91 install -d $(CURDIR)/debian/barry/etc/udev/rules.d
92 install tools/bcharge $(CURDIR)/debian/barry/usr/sbin
93 install udev/10-blackberry.rules.Debian $(CURDIR)/debian/barry/etc/udev/rules.d/10-blackberry.rules
95 dh_install -s
96 # Must not depend on anything. This is to be called by
97 # binary-arch/binary-indep
98 # in another 'make' thread.
99 binary-common:
100 dh_testdir
101 dh_testroot
102 dh_installchangelogs ChangeLog
103 dh_installdocs
104 dh_installexamples
105 # dh_installmenu
106 # dh_installdebconf
107 # dh_installlogrotate
108 # dh_installemacsen
109 # dh_installpam
110 # dh_installmime
111 # dh_installinit
112 # dh_installcron
113 # dh_installinfo
114 dh_installman
115 dh_link
116 dh_strip
117 dh_compress
118 dh_fixperms
119 # dh_perl
120 # dh_python
121 dh_makeshlibs
122 dh_installdeb
123 dh_shlibdeps
124 dh_gencontrol
125 dh_md5sums
126 dh_builddeb
127 # Build architecture independant packages using the common target.
128 binary-indep: build-indep install-indep
129 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
131 # Build architecture dependant packages using the common target.
132 binary-arch: build-arch install-arch
133 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
135 binary: binary-arch binary-indep
136 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure