| 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 = x11-xserver-utils |
| 12 |
|
| 13 |
STAMP_DIR:=stampdir |
| 14 |
|
| 15 |
# 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 |
| 16 |
# subdirectory explicitly so that the build system knows what to build |
| 17 |
DEF_SUBDIRS=iceauth rgb sessreg xcmsdb xgamma xhost xmodmap xrandr xrdb xrefresh xset xsetmode xsetpointer xsetroot xstdcmap xvidtune |
| 18 |
SUBDIRS=$(DEF_SUBDIRS) |
| 19 |
CONFIG_STAMPS = $(addprefix $(STAMP_DIR)/configure-, $(SUBDIRS)) |
| 20 |
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS)) |
| 21 |
|
| 22 |
%: |
| 23 |
dh $@ --with quilt |
| 24 |
|
| 25 |
debian/autoreconf: |
| 26 |
echo $(SUBDIRS) > $@ |
| 27 |
|
| 28 |
override_dh_autoreconf: debian/autoreconf |
| 29 |
dh_autoreconf |
| 30 |
|
| 31 |
override_dh_auto_configure: $(CONFIG_STAMPS) |
| 32 |
|
| 33 |
$(STAMP_DIR)/configure-%: |
| 34 |
mkdir -p $(STAMP_DIR) |
| 35 |
dh_auto_configure -D$* -B$*-build -- \ |
| 36 |
--disable-silent-rules |
| 37 |
>$@ |
| 38 |
|
| 39 |
override_dh_auto_build: $(BUILD_STAMPS) |
| 40 |
|
| 41 |
$(STAMP_DIR)/build-%: |
| 42 |
mkdir -p $(STAMP_DIR) |
| 43 |
dh_auto_build -D$* -B$*-build |
| 44 |
>$@ |
| 45 |
|
| 46 |
override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS)) |
| 47 |
rm -rf $(STAMP_DIR) |
| 48 |
|
| 49 |
clean-%: |
| 50 |
dh_auto_clean -D$* -B$*-build |
| 51 |
|
| 52 |
override_dh_auto_install: |
| 53 |
for FILE in $(SUBDIRS); do \ |
| 54 |
cd "$$FILE"-build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \ |
| 55 |
cd ..; \ |
| 56 |
done |
| 57 |
|
| 58 |
override_dh_install: |
| 59 |
rm -f debian/tmp/usr/share/X11/rgb.txt |
| 60 |
dh_install |
| 61 |
|
| 62 |
.PHONY: get-tarballs |
| 63 |
get-tarballs: $(addprefix get-tarball-,$(SUBDIRS)) |
| 64 |
|
| 65 |
.PHONY: get-tarball-% |
| 66 |
get-tarball-%: |
| 67 |
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 |
| 68 |
|
| 69 |
.PHONY: update-copyright |
| 70 |
update-copyright: $(addsuffix /COPYING, $(SUBDIRS)) debian/copyright.head |
| 71 |
cp debian/copyright.head debian/copyright |
| 72 |
for subdir in $(SUBDIRS); do \ |
| 73 |
echo >> debian/copyright && \ |
| 74 |
echo $$subdir: >> debian/copyright && \ |
| 75 |
sed -e 's/^./ &/' < $$subdir/COPYING >> debian/copyright \ |
| 76 |
|| exit; done |