Query activesync for addressbooks too (if available).
[modest] / libmodest-dbus-client / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 # These are used for cross-compiling and for saving the configure script
8 # from having to guess our platform (since we know it already)
9 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11
12 CFLAGS = -Wall -g
13 PACKAGENAME = modest
14
15 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
16         CFLAGS += -O0
17 else
18         CFLAGS += -O2
19 endif
20 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21         INSTALL_PROGRAM += -s
22 endif
23
24 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
25         CFLAGS += -mthumb
26 endif
27
28 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
29         conf_opt += --enable-debug
30 endif
31
32 config.status: configure
33         dh_testdir
34         # commands to configure the package.
35         if [ ! -x configure ]; then ./autogen.sh; fi
36         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 $(conf_opt)
37
38 configure: configure-stamp
39 configure-stamp:
40         dh_testdir
41         ./autogen.sh
42         touch configure-stamp
43
44 build: build-stamp
45
46 build-stamp:  config.status
47         dh_testdir
48
49         # commands to compile the package.
50         $(MAKE)
51         touch build-stamp
52
53
54 clean:
55         dh_testdir
56         dh_testroot
57         rm -f build-stamp 
58
59 # commands to clean up after the build process.
60 #       -$(MAKE) distclean
61         [ ! -f Makefile ] || $(MAKE) distclean
62
63 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
64         cp -f /usr/share/misc/config.sub config.sub
65 endif
66 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
67         cp -f /usr/share/misc/config.guess config.guess
68 endif
69         dh_clean 
70
71 install: build
72         dh_testdir
73         dh_testroot
74         dh_clean -k 
75         dh_installdirs
76
77 # install the package into debian/tmp/
78         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
79
80 # ACHTUNG: hack
81 # we remove the modest.mo english localization, if the current control file contains a reference
82 # to modest-l10n-mr0; thus, the modest package will not conflict with that one.
83 # if modest-l10n-mr0 is not there, we'll install our own (en_GB) .mo file.
84         if grep -q modest-l10n-mr0 $(CURDIR)/debian/control ; then rm $(CURDIR)/debian/tmp/usr/share/locale/en_GB/LC_MESSAGES/modest.mo ; else echo "modest.mo not removed."; fi
85
86
87 # Build architecture-independent files here.
88 binary-indep: build install
89 # We have nothing to do by default.
90
91 # Build architecture-dependent files here.
92 binary-arch: build install
93         dh_testdir
94         dh_testroot
95         dh_installchangelogs 
96         dh_installdocs
97         dh_installexamples
98         dh_install --sourcedir=debian/tmp -v
99 #       dh_installmenu
100 #       dh_installdebconf       
101 #       dh_installlogrotate
102 #       dh_installemacsen
103 #       dh_installpam
104 #       dh_installmime
105 #       dh_installinit
106 #       dh_installcron
107 #       dh_installinfo
108 #       dh_installman
109         dh_link
110         dh_strip --keep-debug --dbg-package=modest --dbg-package=libmodest-dbus-client
111         dh_compress
112         dh_fixperms
113 #       dh_perl
114 #       dh_python
115         dh_makeshlibs
116         dh_installdeb
117         dh_shlibdeps
118         # Not a requirement by now, so don't fail if it's not installed
119 #       which dh_maemolauncher && dh_maemolauncher usr/bin/modest || true
120         dh_gencontrol
121 #       sh debian/scripts/renew_control_file.sh
122         dh_md5sums
123         dh_builddeb
124
125 binary: binary-indep binary-arch
126 .PHONY: build clean binary-indep binary-arch binary install