2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Modified to make a template file for a multi-binary package with separated
6 # build-arch and build-indep targets by Bill Allombert 2001
8 # Uncomment this to turn on verbose mode.
11 # This is the debhelper compatibility version to use.
14 # This has to be exported to make some magic below work.
17 # These are used for cross-compiling and for saving the configure script
18 # from having to guess our platform (since we know it already)
19 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
20 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
22 objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
26 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
35 configure: configure-stamp
39 # make build directory
42 # run configure with build tree $(objdir)
43 # change ../configure to ../autogen.sh for CVS build
45 ../configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
46 --prefix=/usr --enable-static
51 build: build-arch build-indep
53 build-arch: build-arch-stamp
54 build-arch-stamp: configure-stamp
59 touch build-arch-stamp
61 build-indep: build-indep-stamp
62 build-indep-stamp: configure-stamp
64 # Add here commands to compile the indep part of the package.
66 touch build-indep-stamp
77 rm -f build-arch-stamp build-indep-stamp configure-stamp
82 # if Makefile exists run distclean
83 if test -f Makefile; then \
87 #if test -d CVS; then \
93 install: install-indep install-arch
100 # dh_install -i --list-missing
109 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
111 dh_install -s --list-missing
113 # Must not depend on anything. This is to be called by
114 # binary-arch/binary-indep
115 # in another 'make' thread.
119 dh_installchangelogs CHANGES
124 # dh_installlogrotate
140 dh_shlibdeps -ldebian/libvorbis0a/usr/lib
145 # Build architecture independant packages using the common target.
146 binary-indep: build-indep install-indep
147 # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
149 # Build architecture dependant packages using the common target.
150 binary-arch: build-arch install-arch
151 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
153 binary: binary-arch binary-indep
154 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure