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)))
29 #ifneq (,$(findstring maemo-launcher,$(DEB_BUILD_OPTIONS)))
33 ifeq "$(strip $(LAUNCHER))" "yes"
34 LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher"
35 LAUNCHER_CFLAGS = -shared
36 LAUNCHER_LDFLAGS = -pie -shared -export-dynamic
41 config.status: configure
43 # commands to configure the package.
44 if [ ! -x configure ]; then ./autogen.sh; fi
45 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
47 configure: configure-stamp
55 build-stamp: config.status
58 # commands to compile the package.
60 MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
61 MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
69 # commands to clean up after the build process.
71 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
72 cp -f /usr/share/misc/config.sub config.sub
74 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
75 cp -f /usr/share/misc/config.guess config.guess
85 # install the package into debian/tmp/
86 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
88 ifeq "$(strip $(LAUNCHER))" "yes"
89 mv $(CURDIR)/debian/tmp/usr/bin/modest \
90 $(CURDIR)/debian/modest/usr/bin/modest.launch
91 ln -s /usr/bin/maemo-invoker \
92 $(CURDIR)/debian/modest/usr/bin/modest
95 # Build architecture-independent files here.
96 binary-indep: build install
97 # We have nothing to do by default.
99 # Build architecture-dependent files here.
100 binary-arch: build install
106 dh_install --sourcedir=debian/tmp -v
109 # dh_installlogrotate
118 dh_strip --keep-debug --dbg-package=modest --dbg-package=libmodest-dbus-client
126 dh_gencontrol -- $(LAUNCHER_DEPENDS)
130 binary: binary-indep binary-arch
131 .PHONY: build clean binary-indep binary-arch binary install