3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
16 # This has to be exported to make some magic below work.
19 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
20 DEBUG = --enable-debug
25 # Tell Autoconf the correct system types.
26 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
27 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
28 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
29 SYSTEM = --build $(DEB_HOST_GNU_TYPE)
31 SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
34 configure: configure-stamp
37 cp /usr/share/misc/config.guess config.guess
38 cp /usr/share/misc/config.sub config.sub
39 CFLAGS="$(CFLAGS)" LIBS=-lpthread ./configure --prefix=/usr \
40 --disable-dependency-tracking $(SYSTEM) $(DEBUG)
43 build: build-arch build-indep
44 build-arch: build-stamp
46 build-stamp: configure-stamp
54 rm -f configure-stamp build-stamp install-stamp
55 [ ! -f Makefile ] || $(MAKE) distclean
56 dh_clean config.guess config.sub
58 install: install-stamp
63 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
64 rm -r $(CURDIR)/debian/tmp/usr/share/doc/xmltooling*
65 dh_install -a -i --fail-missing
68 binary: binary-arch binary-indep
69 binary-arch: DH_OPTIONS=-a
70 binary-arch: install-stamp
74 dh_installdocs -A doc/NOTICE.txt
86 binary-indep: DH_OPTIONS=-i
87 binary-indep: install-stamp
91 dh_installdocs -A doc/NOTICE.txt
100 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean