3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
11 # These are used for cross-compiling and for saving the configure script
12 # from having to guess our platform (since we know it already)
13 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 # Use soft-float and thumb mode if it enabled.
26 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
30 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
34 # shared library versions, option 1
37 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
38 version=`ls src/.libs/lib*.so.* | \
39 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
41 major=`ls src/.libs/lib*.so.* | \
42 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
44 config.status: $(SOURCE_DIR)/configure
46 # Add here commands to configure the package.
47 CFLAGS="$(CFLAGS)" ./configure \
48 --host=$(DEB_HOST_GNU_TYPE) \
49 --build=$(DEB_BUILD_GNU_TYPE) \
51 --mandir=\$${prefix}/share/man \
52 --infodir=\$${prefix}/share/info \
53 --with-doc-dir=\$${prefix}/share/doc \
54 --disable-dependency-tracking \
57 $(SOURCE_DIR)/configure:
58 AUTOGEN_SUBDIR_MODE=1 NOCONFIGURE=yes $(SOURCE_DIR)/autogen.sh
62 build-stamp: config.status
64 # Add here commands to compile the package.
72 # Add here commands to clean up after the build process.
74 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
75 cp -f /usr/share/misc/config.sub config.sub
77 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
78 cp -f /usr/share/misc/config.guess config.guess
89 # Add here commands to install the package into debian/build
90 $(MAKE) install DESTDIR=$(CURDIR)/debian/build
92 ln -s -f libhildon-1.so $(CURDIR)/debian/build/usr/lib/libhildon_1.so
93 ln -s -f libhildon-1.so.0 $(CURDIR)/debian/build/usr/lib/libhildon_1.so.0
94 ln -s -f libhildon-1.so.0.0.0 $(CURDIR)/debian/build/usr/lib/libhildon_1.so.0.0.0
96 # for the -dbg package
97 rm -rf $(CURDIR)/debian/build/usr/lib/debug
98 # -mkdir -p $(CURDIR)/debian/build/usr/lib/debug
99 # -cp -vd $(CURDIR)/debian/build/usr/lib/lib*.so* $(CURDIR)/debian/build/usr/lib/debug
102 # Build architecture-independent files here.
103 binary-indep: build install
104 # We have nothing to do by default.
106 # Build architecture-dependent files here.
107 binary-arch: build install
113 @if [ -d debian/build/usr/share/gtk-doc ]; then \
114 echo "Installing gtk-doc" ; \
115 dh_install --sourcedir=debian/build -v ; \
117 echo "Skipping gtk-doc" ; \
118 dh_install --sourcedir=debian/build -v -Xgtk-doc ; \
122 dh_strip --dbg-package="libhildon1"
125 dh_makeshlibs -V "libhildon1 (>= 1.0.1)"
132 binary: binary-indep binary-arch
133 .PHONY: build clean binary-indep binary-arch binary install