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 # maemo-launcher support is not working properly yet, so leave it disabled
29 # ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS)))
31 # conf_opt := --enable-maemo-launcher
34 config.status: configure
36 # commands to configure the package.
37 if [ ! -x configure ]; then ./autogen.sh; fi
38 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)
40 configure: configure-stamp
48 build-stamp: config.status
51 # commands to compile the package.
61 # commands to clean up after the build process.
63 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
64 cp -f /usr/share/misc/config.sub config.sub
66 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
67 cp -f /usr/share/misc/config.guess config.guess
77 # install the package into debian/tmp/
78 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
80 ifeq "$(strip $(LAUNCHER))" "yes"
81 mv $(CURDIR)/debian/tmp/usr/bin/modest \
82 $(CURDIR)/debian/modest/usr/bin/modest.launch
83 ln -s /usr/bin/maemo-invoker \
84 $(CURDIR)/debian/modest/usr/bin/modest
88 # we remove the modest.mo english localization, if the current control file contains a reference
89 # to modest-l10n-mr0; thus, the modest package will not conflict with that one.
90 # if modest-l10n-mr0 is not there, we'll install our own (en_GB) .mo file.
91 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
94 # Build architecture-independent files here.
95 binary-indep: build install
96 # We have nothing to do by default.
98 # Build architecture-dependent files here.
99 binary-arch: build install
105 dh_install --sourcedir=debian/tmp -v
108 # dh_installlogrotate
117 dh_strip --keep-debug --dbg-package=modest --dbg-package=libmodest-dbus-client
125 dh_gencontrol -- $(LAUNCHER_DEPENDS)
129 binary: binary-indep binary-arch
130 .PHONY: build clean binary-indep binary-arch binary install