* OSSO1.1 build fix
[modest] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9
10 # These are used for cross-compiling and for saving the configure script
11 # from having to guess our platform (since we know it already)
12 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
13 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14
15
16 CFLAGS = -Wall -g
17 PACKAGENAME = modest
18
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20         CFLAGS += -O0
21 else
22 #       CFLAGS += -O2
23         CFLAGS += -O2
24 endif
25 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
26         INSTALL_PROGRAM += -s
27 endif
28
29 config.status: configure
30         dh_testdir
31         # commands to configure the package.
32         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
33
34 configure: configure-stamp
35 configure-stamp:
36         dh_testdir
37         ./autogen.sh
38         touch configure-stamp
39
40 build: build-stamp
41
42 build-stamp:  config.status
43         dh_testdir
44
45         # commands to compile the package.
46         $(MAKE) 
47         touch build-stamp
48
49 clean:
50         dh_testdir
51         dh_testroot
52         rm -f build-stamp 
53
54         # commands to clean up after the build process.
55         -$(MAKE) distclean
56 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
57         cp -f /usr/share/misc/config.sub config.sub
58 endif
59 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
60         cp -f /usr/share/misc/config.guess config.guess
61 endif
62
63
64         dh_clean 
65
66 install: build
67         dh_testdir
68         dh_testroot
69         dh_clean -k 
70         dh_installdirs
71
72         # install the package into debian/tmp/
73         #
74         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
75
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # We have nothing to do by default.
79
80 # Build architecture-dependent files here.
81 binary-arch: build install
82         dh_testdir
83         dh_testroot
84         dh_installchangelogs 
85         dh_installdocs
86         dh_installexamples
87         dh_install --sourcedir=debian/tmp -v
88         dh_installmenu
89 #       dh_installdebconf       
90 #       dh_installlogrotate
91 #       dh_installemacsen
92 #       dh_installpam
93 #       dh_installmime
94 #       dh_installinit
95 #       dh_installcron
96 #       dh_installinfo
97         dh_installman
98         dh_link
99         dh_strip 
100         dh_compress
101         dh_fixperms
102 #       dh_perl
103 #       dh_python
104 #       dh_makeshlibs
105         dh_installdeb
106         dh_shlibdeps
107         dh_gencontrol 
108         dh_md5sums
109         dh_builddeb
110
111 binary: binary-indep binary-arch
112 .PHONY: build clean binary-indep binary-arch binary install