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)
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
24 # Use soft-float and thumb mode if it enabled.
25 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
29 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
33 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
34 DEB_CONFIGURE_EXTRA_FLAGS += --enable-debug
37 config.status: configure
40 CFLAGS="$(CFLAGS)" ./configure \
41 --host=$(DEB_HOST_GNU_TYPE) \
42 --build=$(DEB_BUILD_GNU_TYPE) \
44 --mandir=\$${prefix}/share-cli/man \
45 --infodir=\$${prefix}/share-cli/info \
46 $(DEB_CONFIGURE_EXTRA_FLAGS)
48 configure: configure-stamp
57 build-stamp: config.status
67 rm -f build-stamp configure-stamp
69 [ ! -f Makefile ] || $(MAKE) distclean
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
85 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
87 # Build architecture-independent files here.
88 binary-indep: build install
89 # We have nothing to do by default.
91 # Build architecture-dependent files here.
92 binary-arch: build install
97 dh_install --sourcedir=debian/tmp -v
107 dh_builddeb --destdir=$(DEBDIR)
109 binary: binary-indep binary-arch
110 .PHONY: build clean binary-indep binary-arch binary install