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)
17 LDFLAGS= -Wl,--as-needed
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
28 # shared library versions, option 1
31 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
32 #version=`ls src/.libs/lib*.so.* | \
33 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
34 #major=`ls src/.libs/lib*.so.* | \
35 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
37 config.status: configure
39 # Add here commands to configure the package.
40 CFLAGS="$(CFLAGS)" ./configure \
41 --host=$(DEB_HOST_GNU_TYPE) \
42 --build=$(DEB_BUILD_GNU_TYPE) \
44 --mandir=\$${prefix}/share/man \
45 --infodir=\$${prefix}/share/info \
50 aclocal-1.7 || aclocal
53 automake-1.7 --add-missing --foreign || automake --add-missing> --foreign
57 build-stamp: config.status
60 perl -pi -e's/archive_cmds="\\\$$CC -shared/archive_cmds="\$$CC -Wl,--as-needed -shared/' libtool
61 # Add here commands to compile the package.
71 # Add here commands to clean up after the build process.
73 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
74 cp -f /usr/share/misc/config.sub config.sub
76 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
77 cp -f /usr/share/misc/config.guess config.guess
89 # Add here commands to install the package into debian/tmp
90 $(MAKE) install DESTDIR=$(CURDIR)/debian/build
92 -rm -rf $(CURDIR)/debian/build/usr/lib/debug
93 mkdir -p $(CURDIR)/debian/build/usr/lib/debug
94 for l in `find $(CURDIR)/debian/build/usr/lib/hildon-input-method -name '*.so*'`; do \
96 $(CURDIR)/debian/build/usr/lib/debug/; \
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/build -v
113 # dh_installlogrotate
134 binary: binary-indep binary-arch
135 .PHONY: build clean binary-indep binary-arch binary install