File: rules

package info (click to toggle)
systemtap 4.1-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 41,792 kB
  • sloc: cpp: 74,955; ansic: 59,007; xml: 47,831; exp: 41,400; sh: 10,820; python: 2,758; perl: 2,252; tcl: 1,305; makefile: 1,119; lisp: 105; java: 102; awk: 101; asm: 91; sed: 16
file content (81 lines) | stat: -rwxr-xr-x 2,818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f

VIM_ADIR = $(CURDIR)/debian/tmp/usr/share/vim/addons
VIM_RDIR = $(CURDIR)/debian/tmp/usr/share/vim/registry

EMACS_ADIR = $(CURDIR)/debian/tmp/usr/share/emacs/site-lisp/systemtap-common

CONF_FLAGS = --enable-sqlite --disable-crash --disable-pie \
	     --enable-docs --enable-htmldocs --enable-refdocs \
	     --enable-server --without-rpm --disable-silent-rules \
	     --enable-translator --disable-publican --with-python3 \
	     --libexecdir=/usr/lib $(shell dpkg-buildflags --export=configure)

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Building of man pages takes A LOT of time
ifeq (,$(filter stap_disable_refdocs,$(DEB_BUILD_OPTIONS)))
	CONF_FLAGS += --enable-refdocs
else
	CONF_FLAGS += --disable-refdocs
endif

ifeq (,$(filter systemtap-runtime,$(shell dh_listpackages -a)))
  sdt_only := yes
endif

%:
	dh $@ --with autoreconf

override_dh_auto_test:
	# Tests cannot be run during build, see #526957

override_dh_auto_configure:
	dh_auto_configure -- $(CONF_FLAGS)

override_dh_auto_install:
	dh_auto_install

	# Install vim files
	install -m 644 -D vim/ftdetect/stp.vim $(VIM_ADIR)/ftdetect/stp.vim
	install -m 644 -D vim/ftplugin/stp.vim $(VIM_ADIR)/ftplugin/stp.vim
	install -m 644 -D vim/indent/stp.vim $(VIM_ADIR)/indent/stp.vim
	install -m 644 -D vim/syntax/stp.vim $(VIM_ADIR)/syntax/stp.vim
	install -m 644 -D $(CURDIR)/debian/systemtap.yaml $(VIM_RDIR)/systemtap.yaml

	# Install emacs files
	install -m 644 -D emacs/systemtap-init.el $(EMACS_ADIR)/systemtap-init.el
	install -m 644 -D emacs/systemtap-mode.el $(EMACS_ADIR)/systemtap-mode.el

	# Install stap-prep
	install -D stap-prep $(CURDIR)/debian/tmp/usr/bin/stap-prep

	# Make all examples not executable. Some of them could be, but
	# this is not consistently enforced.
	find debian/tmp/usr/share/doc/systemtap*/examples/ -type f -executable | xargs --no-run-if-empty chmod -x

	# Remove empty file to make lintian happy, patch sent to xmlto upstream
	rm -f debian/tmp/usr/share/doc/systemtap/tapsets/tapsets.proc

override_dh_install:
	dh_install
ifeq ($(sdt_only),yes)
	install -m 755 -D dtrace debian/systemtap-sdt-dev/usr/bin/dtrace
	install -m 644 -D man/dtrace.1 debian/systemtap-sdt-dev/usr/share/man/man1/dtrace.1
	mkdir -p debian/systemtap-sdt-dev/usr/include/$(DEB_HOST_MULTIARCH)/sys
	install -m 644 includes/sys/*.h \
		debian/systemtap-sdt-dev/usr/include/$(DEB_HOST_MULTIARCH)/sys/.
else
	mkdir -p debian/systemtap-sdt-dev/usr/include/$(DEB_HOST_MULTIARCH)
	mv debian/systemtap-sdt-dev/usr/include/sys \
		debian/systemtap-sdt-dev/usr/include/$(DEB_HOST_MULTIARCH)/.
endif

override_dh_compress:
	dh_compress -X.stp -X.wav -Xsocktop -Xsyscalltimes -X.pdf

override_dh_fixperms:
	dh_fixperms
ifneq ($(sdt_only),yes)
	chmod 4754 debian/systemtap-runtime/usr/bin/staprun
endif