4 # Uncomment this to turn on verbose mode.
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)
15 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
24 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
28 ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS)))
29 conf_opt = --enable-maemo-launcher
32 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
33 conf_opt += --enable-debug
36 config.status: configure
38 # commands to configure the package.
39 if [ ! -x configure ]; then ./autogen.sh; fi
40 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)
42 configure: configure-stamp
50 build-stamp: config.status
53 # commands to compile the package.
63 # commands to clean up after the build process.
65 [ ! -f Makefile ] || $(MAKE) distclean
67 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
68 cp -f /usr/share/misc/config.sub config.sub
70 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
71 cp -f /usr/share/misc/config.guess config.guess
81 # install the package into debian/tmp/
82 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
85 # we remove the modest.mo english localization, if the current control file contains a reference
86 # to modest-l10n-mr0; thus, the modest package will not conflict with that one.
87 # if modest-l10n-mr0 is not there, we'll install our own (en_GB) .mo file.
88 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
91 # Build architecture-independent files here.
92 binary-indep: build install
93 # We have nothing to do by default.
95 # Build architecture-dependent files here.
96 binary-arch: build install
102 dh_install --sourcedir=debian/tmp -v
105 # dh_installlogrotate
114 dh_strip --keep-debug --dbg-package=modest
122 # Not a requirement by now, so don't fail if it's not installed
123 which dh_maemolauncher && dh_maemolauncher usr/bin/modest || true
125 # sh debian/scripts/renew_control_file.sh
129 binary: binary-indep binary-arch
130 .PHONY: build clean binary-indep binary-arch binary install