2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 # This is the debhelper compatibility version to use.
11 # This has to be exported to make some magic below work.
14 # These are used for cross-compiling and for saving the configure script
15 # from having to guess our platform (since we know it already)
16 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
17 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
19 objdir
= $(CURDIR
)/obj-
$(DEB_BUILD_GNU_TYPE
)
21 ifneq (,$(findstring debug
,$(DEB_BUILD_OPTIONS
)))
24 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
28 configure
: configure-stamp
32 # make build directory
35 # run configure with build tree $(objdir)
36 # change ../configure to ../autogen.sh for CVS build
38 ..
/configure
--build
=$(DEB_BUILD_GNU_TYPE
) --host
=$(DEB_HOST_GNU_TYPE
) \
44 build-stamp
: configure-stamp
53 OLDDATESUB
=`./config.sub -t | tr -d -` ;\
54 OLDDATEGUESS
=`./config.guess -t | tr -d -` ;\
55 NEWDATESUB
=`/usr/share/misc/config.sub -t | tr -d -` ;\
56 NEWDATEGUESS
=`/usr/share/misc/config.guess -t | tr -d -` ;\
57 if
[ $$OLDDATESUB -lt
$$NEWDATESUB -o \
58 $$OLDDATEGUESS -lt
$$NEWDATEGUESS ]; then \
59 dch
-a
-p
"GNU config automated update: config.sub\
60 ($$OLDDATESUB to $$NEWDATESUB), config.guess\
61 ($$OLDDATEGUESS to $$NEWDATEGUESS)" ;\
62 cp
-f
/usr
/share
/misc
/config.sub config.sub
;\
63 cp
-f
/usr
/share
/misc
/config.guess config.guess
;\
64 echo WARNING
: GNU config scripts updated from master copies
1>&2 ;\
76 rm -f build-stamp configure-stamp
81 # if Makefile exists run distclean
82 if
test -f Makefile
; then \
86 #if test -d CVS; then \
100 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tmp
102 dh_install
--list-missing
104 # This single target is used to build all the packages, all at once, or
105 # one at a time. So keep in mind: any options passed to commands here will
106 # affect _all_ packages. Anything you want to only affect one package
107 # should be put in another target, such as the install target.
117 # dh_installlogrotate
138 # Build architecture independant packages using the common target.
139 binary-indep
: build
install
140 # $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
142 # Build architecture dependant packages using the common target.
143 binary-arch
: build
install
144 $(MAKE
) -f debian
/rules DH_OPTIONS
=-a binary-common
146 # Any other binary targets build just one binary package at a time.
147 binary-
%: build
install
148 $(MAKE
) -f debian
/rules binary-common DH_OPTIONS
=-p
$*
150 binary
: binary-indep binary-arch
151 .PHONY
: build
clean binary-indep binary-arch binary
install configure