3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
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)
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
31 ifneq (,$(findstring maemo-launcher,$(DEB_BUILD_OPTIONS)))
35 ifeq "$(strip $(LAUNCHER))" "yes"
36 LAUNCHER_DEPENDS = -Vlauncher:Depends="maemo-launcher"
37 LAUNCHER_CFLAGS = -shared
38 LAUNCHER_LDFLAGS = -pie -shared -export-dynamic
43 config.status: configure
45 # commands to configure the package.
46 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
48 configure: configure-stamp
56 build-stamp: config.status
59 # commands to compile the package.
61 MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
62 MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
70 # commands to clean up after the build process.
72 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
73 cp -f /usr/share/misc/config.sub config.sub
75 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
76 cp -f /usr/share/misc/config.guess config.guess
88 # install the package into debian/tmp/
90 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
92 ifeq "$(strip $(LAUNCHER))" "yes"
93 mv $(CURDIR)/debian/modest/usr/bin/modest \
94 $(CURDIR)/debian/modest/usr/bin/modest.launch
95 ln -s /usr/bin/maemo-invoker \
96 $(CURDIR)/debian/modest/usr/bin/modest
99 # Build architecture-independent files here.
100 binary-indep: build install
101 # We have nothing to do by default.
103 # Build architecture-dependent files here.
104 binary-arch: build install
110 dh_install --sourcedir=debian/tmp -v
113 # dh_installlogrotate
122 dh_strip --keep-debug --dbg-package=modest --dbg-package=libmodest-dbus-client
130 dh_gencontrol -- $(LAUNCHER_DEPENDS)
134 binary: binary-indep binary-arch
135 .PHONY: build clean binary-indep binary-arch binary install