| 1 |
#!/usr/bin/make -f |
| 2 |
# debian/rules for the Debian xutils package. |
| 3 |
# Copyright © 2004 Scott James Remnant <[email protected]> |
| 4 |
# Copyright © 2005 Daniel Stone <[email protected]> |
| 5 |
# Copyright © 2005 David Nusinow <[email protected]> |
| 6 |
|
| 7 |
# Uncomment this to turn on verbose mode. |
| 8 |
#export DH_VERBOSE=1 |
| 9 |
|
| 10 |
# set this to the name of the main shlib's binary package |
| 11 |
PACKAGE = xutils-dev |
| 12 |
|
| 13 |
# This package contains multiple modules as shipped by upstream. Each module is # contained in a subdirectory in the root dir of the package. You must list each |
| 14 |
# subdirectory explicitly so that the build system knows what to build |
| 15 |
SUBDIRS= gccmakedep imake lndir makedepend util-macros xorg-cf-files |
| 16 |
SUBDIRS_CHECK= makedepend |
| 17 |
|
| 18 |
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 19 |
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
| 20 |
MAKEFLAGS += -j$(NUMJOBS) |
| 21 |
endif |
| 22 |
|
| 23 |
%: |
| 24 |
dh $@ --with quilt |
| 25 |
|
| 26 |
override_dh_auto_configure: $(foreach dir, $(SUBDIRS), configure-$(dir)-stamp) |
| 27 |
|
| 28 |
configure-%-stamp: |
| 29 |
dh_auto_configure -D$* -B$*-build -- \ |
| 30 |
--disable-silent-rules \ |
| 31 |
--disable-ccmakedep \ |
| 32 |
--libdir=\$${exec_prefix}/lib \ |
| 33 |
$(shell DEB_CFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure) |
| 34 |
|
| 35 |
override_dh_auto_build: $(foreach dir, $(SUBDIRS), build-$(dir)-stamp) |
| 36 |
|
| 37 |
build-%-stamp: |
| 38 |
dh_auto_build -D$* -B$*-build |
| 39 |
|
| 40 |
override_dh_auto_test: $(addprefix test-, $(SUBDIRS)) |
| 41 |
|
| 42 |
.PHONY: test-% |
| 43 |
test-%: |
| 44 |
dh_auto_test -D$* -B$*-build |
| 45 |
|
| 46 |
override_dh_auto_install: |
| 47 |
set -e; for FILE in $(SUBDIRS); do \ |
| 48 |
$(MAKE) -C $${FILE}-build DESTDIR=$(CURDIR)/debian/tmp install; \ |
| 49 |
done |
| 50 |
|
| 51 |
override_dh_installdocs: |
| 52 |
dh_installdocs debian/versions |
| 53 |
|
| 54 |
override_dh_install: |
| 55 |
dh_install --fail-missing |
| 56 |
|
| 57 |
override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS)) |
| 58 |
|
| 59 |
.PHONY: clean-% |
| 60 |
clean-%: |
| 61 |
dh_auto_clean -D$* -B$*-build |
| 62 |
|
| 63 |
.PHONY: get-tarballs |
| 64 |
get-tarballs: $(addprefix get-tarball-,$(SUBDIRS)) |
| 65 |
|
| 66 |
.PHONY: get-tarball-% |
| 67 |
get-tarball-%: |
| 68 |
uscan --no-conf --download --no-symlink --destdir . --package $* --upstream-version $(shell awk -F = '/^PACKAGE_VERSION=/ { print $$2 }' < $*/configure || echo 0) --watchfile debian/watch.$* || test $$? = 1 |
| 69 |
|
| 70 |
# vim:set ai noet sw=8 ts=8 tw=80: |