Debian Codegraph @

debian/rules

raw
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 STAMP_DIR = stampdir
11
12 # This package contains multiple modules as shipped by upstream. Each module is
13 # 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 XKB_SUBDIRS=setxkbmap xkbcomp xkbevd xkbprint xkbutils
16 SUBDIRS=$(XKB_SUBDIRS)
17 CONFIG_STAMPS = $(addprefix $(STAMP_DIR)/configure-,$(SUBDIRS))
18 BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
19
20 %:
21 dh $@ --with quilt
22
23 override_dh_autoreconf:
24 dh_autoreconf debian/rules -- autoreconf
25
26 autoreconf-%:
27 cd $* && autoreconf -vfi
28
29 .PHONY: autoreconf
30 autoreconf: $(addprefix autoreconf-, $(SUBDIRS))
31
32 override_dh_auto_configure: $(CONFIG_STAMPS)
33
34 $(STAMP_DIR)/configure-%:
35 mkdir -p $(STAMP_DIR)
36 dh_auto_configure -D$* -B$*-build -- \
37 --disable-silent-rules
38 >$@
39
40 override_dh_auto_build: $(BUILD_STAMPS)
41
42 $(STAMP_DIR)/build-%:
43 mkdir -p $(STAMP_DIR)
44 dh_auto_build -D$* -B$*-build
45 >$@
46
47 override_dh_auto_install:
48 for FILE in $(SUBDIRS); do \
49 cd "$$FILE"-build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
50 cd ..; \
51 done
52 install -d debian/tmp/usr/share/doc/x11-xkb-utils
53 install -m 644 xkbevd/example.cf debian/tmp/usr/share/doc/x11-xkb-utils/xkbevd-example.cf
54
55 override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS))
56 rm -rf $(STAMP_DIR)
57
58 clean-%:
59 dh_auto_clean -D$* -B$*-build
60
61 .PHONY: get-tarballs
62 get-tarballs: $(addprefix get-tarball-,$(SUBDIRS))
63
64 .PHONY: get-tarball-%
65 get-tarball-%:
66 uscan --no-conf --destdir . --download --no-symlink --package $* --upstream-version $(shell awk -F = '/^PACKAGE_VERSION=/ { print $$2 }' < $*/configure ) --watchfile debian/watch.$* || test $$? = 1