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 ;\
94 touch build-arch-stamp
96 build-indep
: build-indep-stamp
97 build-indep-stamp
: configure-stamp
106 touch build-indep-stamp
117 rm -f build-arch-stamp build-indep-stamp configure-stamp \
118 debian
/debiandirs debian
/man
/*.1
120 # Remove Debian specific patches
121 if
test -d
$(CURDIR
)/debian
/patches
;\
123 patches
=$$(find
$(CURDIR
)/debian
/patches
-name
*.diff |
sort -r
);\
125 if
test -f patch-stamp
; then \
126 for patch in
$$patches ;\
128 echo REMOVING PATCH\
: "$${patch##*/}" ;\
129 patch
-p1
-R
< "$$patch" ;\
131 for i in
$(CURDIR
)/debian
/patches
/*.diff.uu
;\
133 rm -f
"$${i%%.uu}" ;\
141 # if Makefile exists run distclean
142 if
test -f Makefile
; then \
146 if
test -d CVS
; then \
147 $(MAKE
) -f admin
/Makefile.common cvs-clean
;\
152 install: install-arch install-indep
161 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tmp
164 chown root
:dip debian
/tmp
/usr
/bin
/kppp
*
165 chmod
2754 debian
/tmp
/usr
/bin
/kppp
166 chmod
0754 debian
/tmp
/usr
/bin
/kppplogview
168 #chmod 4755 debian/tmp/usr/sbin/reslisa
179 $(MAKE
) install DESTDIR
=$(CURDIR
)/debian
/tmp
182 $(MAKE
) install-apidox DESTDIR
=$(CURDIR
)/debian
/tmp
186 # Must not depend on anything. This is to be called by
187 # binary-arch/binary-indep
188 # in another 'make' thread.
197 # dh_installlogrotate
207 dh_compress
-X.bz2
-X.css
-X.dcl
-X.docbook
-X-license
-X.tag
208 dh_fixperms
-Xusr
/bin
/kppp
-Xusr
/bin
/kppplogview
213 dh_shlibdeps
-ldebian
/kopete
/usr
/lib
:debian
/librss1
/usr
/lib
218 # Build architecture independant packages using the common target.
219 binary-indep
: build-indep install-indep
220 $(MAKE
) -f debian
/rules DH_OPTIONS
=-i binary-common
222 # Build architecture dependant packages using the common target.
223 binary-arch
: build-arch install-arch
224 $(MAKE
) -f debian
/rules DH_OPTIONS
=-s binary-common
226 binary
: binary-arch binary-indep
227 .PHONY
: build
clean binary-indep binary-arch binary
install install-indep install-arch configure