3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Modified to make a template file for a multi-binary package with separated
7 # build-arch and build-indep targets by Bill Allombert 2001
9 # Uncomment this to turn on verbose mode.
12 # This has to be exported to make some magic below work.
15 # These are used for cross-compiling and for saving the configure script
16 # from having to guess our platform (since we know it already)
17 DEB_HOST_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_HOST_GNU_TYPE
)
18 DEB_BUILD_GNU_TYPE ?
= $(shell dpkg-architecture
-qDEB_BUILD_GNU_TYPE
)
22 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
27 ifeq (,$(findstring nostrip
,$(DEB_BUILD_OPTIONS
)))
31 objdir
= $(CURDIR
)/obj-
$(DEB_BUILD_GNU_TYPE
)
33 -include debian
/debiandirs
35 debian
/debiandirs
: admin
/debianrules
36 perl
-w admin
/debianrules echodirs
> debian
/debiandirs
38 configure
: configure-stamp
42 # Apply Debian specific patches
43 if
test -d
$(CURDIR
)/debian
/patches
;\
45 for i in
$(CURDIR
)/debian
/patches
/*.diff.uu
;\
47 cd
$(CURDIR
)/debian
/patches
;\
51 patches
=$$(find
$(CURDIR
)/debian
/patches
-name
*.diff |
sort);\
53 if
test ! -f patch-stamp
; then \
54 for patch in
$$patches ;\
56 echo APPLYING PATCH\
: "$${patch##*/}" ;\
57 patch
-p1
< "$$patch" ;\
62 # KDE CVS does not have aclocal.m4 or configure
63 if
test ! -f configure
; then \
64 $(MAKE
) -f admin
/Makefile.common
;\
67 # ensure configure is executable
70 # make build directory
73 # run configure with build tree $(objdir)
75 ..
/configure
$(configkde
) --enable-final
80 build
: build-arch build-indep
82 build-arch
: build-arch-stamp
83 build-arch-stamp
: configure-stamp
90 #for i in debian/man/*.sgml; do \
91 docbook-to-man
$$i > `dirname $$i`/`basename $$i .sgml`.1 ;\
95 set
-e
; while read package binary
; do \
96 soelim
-Idebian
/man debian
/man
/$$binary.man \
97 >debian
/man
/$$binary.1; \
98 done
<debian
/man
/manpages.in
100 touch build-arch-stamp
102 build-indep
: build-indep-stamp
103 build-indep-stamp
: configure-stamp
112 touch build-indep-stamp
123 rm -f build-arch-stamp build-indep-stamp configure-stamp \
124 debian
/debiandirs debian
/man
/*.1
126 # Remove Debian specific patches
127 if
test -d
$(CURDIR
)/debian
/patches
;\
129 patches
=$$(find
$(CURDIR
)/debian
/patches
-name
*.diff |
sort -r
);\
131 if
test -f patch-stamp
; then \
132 for patch in
$$patches ;\
134 echo REMOVING PATCH\
: "$${patch##*/}" ;\
135 patch
-p1
-R
< "$$patch" ;\
137 for i in
$(CURDIR
)/debian
/patches
/*.diff.uu
;\
139 rm -f
"$${i%%.uu}" ;\
147 # if Makefile exists run distclean
148 if
test -f Makefile
; then \
152 if
test -d CVS
; then \
153 $(MAKE
) -f admin
/Makefile.common cvs-clean
;\
158 install: install-arch install-indep
167 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tmp
178 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tmp
181 $(MAKE
) install-apidox DESTDIR
=$(CURDIR
)/debian
/tmp
185 # Must not depend on anything. This is to be called by
186 # binary-arch/binary-indep
187 # in another 'make' thread.
196 # dh_installlogrotate
206 dh_compress
-X.bz2
-X.css
-X.dcl
-X.docbook
-X-license
-X.tag
217 # Build architecture independant packages using the common target.
218 binary-indep
: build-indep install-indep
219 $(MAKE
) -f debian
/rules DH_OPTIONS
=-i binary-common
221 # Build architecture dependant packages using the common target.
222 binary-arch
: build-arch install-arch
223 $(MAKE
) -f debian
/rules DH_OPTIONS
=-s binary-common
225 binary
: binary-arch binary-indep
226 .PHONY
: build
clean binary-indep binary-arch binary
install install-indep install-arch configure