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)))
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 = -shared -export-dynamic
39 config.status: configure
41 # commands to configure the package.
42 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
44 configure: configure-stamp
52 build-stamp: config.status
55 # commands to compile the package.
57 MAEMO_LAUNCHER_CFLAGS="$(LAUNCHER_CFLAGS)" \
58 MAEMO_LAUNCHER_LDFLAGS="$(LAUNCHER_LDFLAGS)"
59 #/usr/bin/docbook-to-man debian/osso-sketch.sgml > osso-sketch.1
68 # commands to clean up after the build process.
70 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
71 cp -f /usr/share/misc/config.sub config.sub
73 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
74 cp -f /usr/share/misc/config.guess config.guess
86 # install the package into debian/tmp/
88 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
90 ifeq "$(strip $(LAUNCHER))" "yes"
91 mv $(CURDIR)/debian/tmp/usr/bin/modest \
92 $(CURDIR)/debian/tmp/usr/bin/modest.launch
93 ln -s /usr/bin/maemo-invoker \
94 $(CURDIR)/debian/tmp/usr/bin/modest
97 # Build architecture-independent files here.
98 binary-indep: build install
99 # We have nothing to do by default.
101 # Build architecture-dependent files here.
102 binary-arch: build install
108 dh_install --sourcedir=debian/tmp -v
111 # dh_installlogrotate
120 dh_strip --dbg-package=modest
128 dh_gencontrol -- $(LAUNCHER_DEPENDS)
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary install