- changed maintainer scripts and rpm.spec to use bzip2 instead of gzip
[barry.git] / debian / rules
blob382f0488ec69dbd0faec8484bc618bd202356ad0
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
31 configure-stamp:
32 dh_testdir
33 # Add here commands to configure the package.
35 touch configure-stamp
38 #Architecture
39 build: build-arch build-indep
41 build-arch: build-arch-stamp
42 build-arch-stamp: configure-stamp
44 # Add here commands to compile the arch part of the package.
45 ./configure --prefix=/usr --with-boost=/usr
46 $(MAKE)
47 (cd gui && ./configure PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src" --prefix=/usr)
48 (cd gui && $(MAKE))
50 touch build-arch-stamp
52 build-indep: build-indep-stamp
53 build-indep-stamp: configure-stamp
55 # Add here commands to compile the indep part of the package.
56 $(MAKE) doc
57 #touch build-indep-stamp
59 clean:
60 dh_testdir
61 dh_testroot
62 rm -rf $(CURDIR)/debian/everything
63 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
65 # Add here commands to clean up after the build process.
66 $(MAKE) distclean
67 (cd gui && $(MAKE) distclean)
69 dh_clean --exclude ./src/Makefile.orig
71 install: install-indep install-arch
72 install-indep:
73 dh_testdir
74 dh_testroot
75 dh_clean -k -i --exclude ./src/Makefile.orig
76 dh_installdirs -i
78 # Add here commands to install the indep part of the package into
79 # debian/<package>-doc.
80 #INSTALLDOC#
82 dh_install -i
84 install-arch:
85 dh_testdir
86 dh_testroot
87 dh_clean -k -s --exclude ./src/Makefile.orig
88 dh_installdirs -s
90 # Add here commands to install the arch part of the package into
91 # debian/tmp.
93 # Install EVERYTHING from the base library portion into
94 # a temporary directory, then split them out into their
95 # respective package directories. Anything left behind
96 # needs to be looked at!
97 $(MAKE) install DESTDIR=$(CURDIR)/debian/everything
99 # Move the basic libbarry files
100 install -d $(CURDIR)/debian/libbarry/usr/lib
101 mv $(CURDIR)/debian/everything/usr/lib/libbarry.so.* $(CURDIR)/debian/libbarry/usr/lib
103 # Move the devel library files
104 install -d $(CURDIR)/debian/libbarry-dev/usr/include
105 mv $(CURDIR)/debian/everything/usr/include/* $(CURDIR)/debian/libbarry-dev/usr/include
106 mv $(CURDIR)/debian/everything/usr/lib $(CURDIR)/debian/libbarry-dev/usr
108 # Move the command line utils
109 mkdir $(CURDIR)/debian/barry-util/usr
110 mv $(CURDIR)/debian/everything/usr/bin $(CURDIR)/debian/barry-util/usr
111 mv $(CURDIR)/debian/everything/usr/sbin $(CURDIR)/debian/barry-util/usr
112 install -d $(CURDIR)/debian/barry-util/usr/share
113 mv $(CURDIR)/debian/everything/usr/share/man $(CURDIR)/debian/barry-util/usr/share
115 # Install udev rules for the barry-util package
116 install -d $(CURDIR)/debian/barry-util/etc/udev/rules.d
117 install -m 0644 $(CURDIR)/udev/10-blackberry.rules.Debian $(CURDIR)/debian/barry-util/etc/udev/rules.d/10-blackberry.rules
119 # The GUI has its own install, so we go directly to target package dir
120 (cd gui && $(MAKE) install DESTDIR=$(CURDIR)/debian/barrybackup-gui)
122 # Display anything remaining
123 echo "NOTE: IF ANYTHING IS LISTED HERE, IT IS NOT BEING PACKAGED:"
124 find $(CURDIR)/debian/everything
126 dh_install -s
128 # Must not depend on anything. This is to be called by
129 # binary-arch/binary-indep
130 # in another 'make' thread.
131 binary-common:
132 dh_testdir
133 dh_testroot
134 dh_installchangelogs ChangeLog
135 dh_installdocs
136 dh_installexamples
137 dh_installmenu
138 # dh_installdebconf
139 # dh_installlogrotate
140 # dh_installemacsen
141 # dh_installpam
142 # dh_installmime
143 # dh_installinit
144 # dh_installcron
145 # dh_installinfo
146 dh_installman
147 dh_link
148 dh_strip
149 dh_compress
150 dh_fixperms
151 # dh_perl
152 # dh_python
153 dh_makeshlibs
154 dh_installdeb
155 dh_shlibdeps
156 dh_gencontrol
157 dh_md5sums
158 dh_builddeb
159 # Build architecture independant packages using the common target.
160 binary-indep: build-indep install-indep
161 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
163 # Build architecture dependant packages using the common target.
164 binary-arch: build-arch install-arch
165 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
167 binary: binary-arch binary-indep
168 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure