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)
16 CFLAGS = -Wall -Wno-format -g
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
26 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
31 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
32 version=`ls libmodest-dbus-client/.libs/lib*.so.* | \
33 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
34 major=`ls libmodest-dbus-client/.libs/lib*.so.* | \
35 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
39 if [ ! -x configure ]; then ./autogen.sh; fi
41 # Add here 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
47 build-stamp: config.status
50 # Add here commands to compile the package.
60 # Add here commands to clean up after the build process.
62 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
63 cp -f /usr/share/misc/config.sub config.sub
65 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
66 cp -f /usr/share/misc/config.guess config.guess
78 # Add here commands to install the package into debian/modest
79 $(MAKE) install DESTDIR=$(CURDIR)/debian/modest
82 # Build architecture-independent files here.
83 binary-indep: build install
84 # We have nothing to do by default.
86 # Build architecture-dependent files here.
87 binary-arch: build install
90 dh_installchangelogs ChangeLog
93 dh_install --sourcedir=debian/modest
105 dh_strip -a --dbg-package="modest"
117 binary: binary-indep binary-arch
118 .PHONY: build clean binary-indep binary-arch binary install