File: rules

package info (click to toggle)
systemtap 1.2-5%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,972 kB
  • ctags: 7,842
  • sloc: ansic: 35,121; cpp: 29,336; exp: 7,535; xml: 6,878; sh: 6,719; perl: 2,067; tcl: 821; makefile: 545; python: 473; ruby: 419
file content (97 lines) | stat: -rwxr-xr-x 3,154 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# get-orig-source target
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

get-orig-source:
	uscan --force-download --rename --repack --download-version=$(DEB_UPSTREAM_VERSION) --destdir=.


CFLAGS = -Wall -g -D_GNU_SOURCE

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif
CXXFLAGS = $(CFLAGS)
export CFLAGS CXXFLAGS

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(NUMJOBS)
endif

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

CONF_FLAGS = --enable-sqlite --disable-crash --enable-docs --disable-pie \
	     --enable-server --enable-grapher --without-rpm \
	     --enable-translator --disable-publican

# 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

# dh does it wrong...
CONF_FLAGS += --libexecdir=/usr/lib

DH = dh

# plus is to enable parallel build
binary binary-arch binary-indep build clean install patch:
	+$(DH) $@


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
	[ ! -d debian/tmp/usr/share/systemtap/tapset/test ] || rm -rf debian/tmp/usr/share/systemtap/tapset/test

	# Those files do not realy belong there
	rm debian/tmp/usr/share/doc/systemtap/examples/README
	rm debian/tmp/usr/share/doc/systemtap/examples/html/*.tmpl

	# make sure that all examples are executable (except tutorial)
	find debian/tmp/usr/share/doc/systemtap/examples/ -name \*.stp \! -executable -print -exec chmod +x "{}" \;

	# Install vim files
	install -d $(VIM_ADIR)/ftdetect
	install -d $(VIM_ADIR)/syntax
	install -d $(VIM_ADIR)/indent
	install -d $(VIM_ADIR)/ftplugin
	test -f vim/filetype.vim && cp vim/filetype.vim $(VIM_ADIR)/ftdetect/stap.vim
	test -f vim/syntax/stap.vim && cp vim/syntax/stap.vim $(VIM_ADIR)/syntax/stap.vim
	test -f vim/indent/stap.vim && cp vim/indent/stap.vim $(VIM_ADIR)/indent/stap.vim
	test -f vim/ftplugin/stap.vim && cp vim/ftplugin/stap.vim $(VIM_ADIR)/ftplugin/stap.vim
	test -f $(CURDIR)/debian/systemtap.yaml && install -d $(VIM_RDIR) && cp $(CURDIR)/debian/systemtap.yaml $(VIM_RDIR)/

override_dh_auto_clean:
	dh_auto_clean
	[ ! -d doc/beginners/build ] || rm -rf doc/beginners/build
	[ ! -d doc/beginners/en-US ] || rm -rf doc/beginners/en-US

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

override_dh_fixperms:
	dh_fixperms
	chmod 4750 debian/systemtap-runtime/usr/bin/staprun

override_dh_installchangelogs:
	        dh_installchangelogs debian/changelog

.PHONY: build clean binary-indep binary-arch binary install patch get-orig-source
.PHONY: override_dh_auto_configure override_dh_auto_test override_dh_auto_install
.PHONY: override_dh_auto_clean override_dh_compress override_dh_fixperms