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 # contained in a subdirectory in the root dir of the package. You must list each
13 # subdirectory explicitly so that the build system knows what to build
14 DEF_SUBDIRS=rstart smproxy xsm
15 SUBDIRS=$(DEF_SUBDIRS)
16 CONFIG_STAMPS = $(addprefix $(STAMP_DIR)/configure-, $(SUBDIRS))
17 BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
18
19 %:
20 dh $@ --with quilt
21
22 override_dh_autoreconf:
23 dh_autoreconf debian/rules -- autoreconf
24
25 autoreconf-%:
26 cd $* && autoreconf -vfi
27
28 .PHONY: autoreconf
29 autoreconf: $(addprefix autoreconf-, $(SUBDIRS))
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 --with-rsh=rsh \
38 $(shell DEB_CFLAGS_MAINT_APPEND=-Wall dpkg-buildflags --export=configure)
39 >$@
40
41 override_dh_auto_build: $(BUILD_STAMPS)
42
43 $(STAMP_DIR)/build-%:
44 dh_auto_build -D$* -B$*-build
45 >$@
46
47 override_dh_auto_clean: $(addprefix clean-, $(SUBDIRS))
48 rm -rf $(STAMP_DIR)
49
50 clean-%:
51 dh_auto_clean -D$* -B$*-build
52
53 override_dh_auto_install:
54 for FILE in $(SUBDIRS); do \
55 cd "$$FILE"-build && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install ; \
56 cd ..; \
57 done
58 find debian/tmp/usr/lib/*/X11/rstart/commands -type f ! -name '@*' -print0 | xargs -0 chmod +x
59
60 .PHONY: get-tarballs
61 get-tarballs: $(addprefix get-tarball-,$(SUBDIRS))
62
63 .PHONY: get-tarball-%
64 get-tarball-%:
65 uscan --no-conf --destdir . --download --no-symlink --package $* --upstream-version $(shell awk -F = '/^PACKAGE_VERSION=/ { print $$2 }' < $*/configure ) --watchfile debian/watch.$* || test $$? = 1
66
67 .PHONY: update-copyright
68 update-copyright: $(addsuffix /COPYING, $(SUBDIRS)) debian/copyright.head
69 cp debian/copyright.head debian/copyright
70 for subdir in $(SUBDIRS); do \
71 echo >> debian/copyright && \
72 echo $$subdir: >> debian/copyright && \
73 sed -e 's/^./ &/' < $$subdir/COPYING >> debian/copyright \
74 || exit; done