File: rules

package info (click to toggle)
rrdtool 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 5,848 kB
  • sloc: ansic: 37,722; sh: 6,295; perl: 1,240; cs: 652; makefile: 543; python: 140; ruby: 61; awk: 30
file content (103 lines) | stat: -rwxr-xr-x 3,499 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
98
99
100
101
102
103
#!/usr/bin/make -f
# -*- makefile -*-

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

# Helps reproducible builds, and required by some tests (first day of week):
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export TZ=UTC

#tcl version we're building for
TCL_VERS := $(shell dpkg -s tcl-dev | grep '^Depends' \
	| sed 's,.*\<tcl\([0-9.]*\)-dev\>.*,\1,')

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

# Bindings perls-shared and ruby need this:
export ABS_TOP_SRCDIR=$(CURDIR)
export ABS_TOP_BUILDDIR=$(CURDIR)

%:
	dh $@ --with lua,python2,python3,ruby

override_dh_auto_configure:
	dh_auto_configure -- \
	 --disable-silent-rules \
	 --disable-rpath \
	 --disable-lua \
	 --disable-perl \
	 --disable-python \
	 --disable-ruby \
	 --with-tcllib=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$(TCL_VERS) \
	 RRDDOCDIR=/usr/share/doc/rrdtool
	dh_auto_configure --buildsystem=lua
	dh_auto_configure --sourcedirectory=bindings/perl-shared
	dh_auto_configure --sourcedirectory=bindings/perl-piped
	dh_auto_configure --buildsystem=pybuild --sourcedirectory=bindings/python
	dh_auto_configure --buildsystem=ruby

override_dh_auto_clean:
	dh_auto_clean --buildsystem=lua
	dh_auto_clean --sourcedirectory=bindings/perl-shared
	dh_auto_clean --sourcedirectory=bindings/perl-piped
	dh_auto_clean --buildsystem=pybuild --sourcedirectory=bindings/python
	dh_auto_clean --buildsystem=ruby
	dh_auto_clean  # Must be called last, after other debhelper's clean

override_dh_auto_build:
	dh_auto_build
	dh_auto_build --buildsystem=lua
	dh_auto_build --sourcedirectory=bindings/perl-shared
	dh_auto_build --sourcedirectory=bindings/perl-piped
	dh_auto_build --buildsystem=pybuild --sourcedirectory=bindings/python
	dh_auto_build --buildsystem=ruby
	# Fix library path to tcl bindings:
	sed -i -e 's|lib/|lib/tcltk/|' -e 's|/tclrrd|/rrdtool-tcl/tclrrd|' bindings/tcl/pkgIndex.tcl

override_dh_auto_test:
	dh_auto_test
	# rrdcached doesn't work on hurd yet:
	# sigwaitinfo exists, but returns ENOSYS (not implemented)
	test $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) = hurd \
	  || dh_auto_test -- TESTS_STYLE="rrdcached"
	dh_auto_test --buildsystem=lua
	LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(CURDIR)/src/.libs \
	 dh_auto_test --sourcedirectory=bindings/perl-shared
	dh_auto_test --sourcedirectory=bindings/perl-piped
	LD_LIBRARY_PATH=$(CURDIR)/src/.libs \
	PYBUILD_SYSTEM=custom \
	PYBUILD_BEFORE_TEST='cp -r {dir}/tests {build_dir}' \
	PYBUILD_AFTER_TEST='rm -rf {build_dir}/tests' \
	PYBUILD_TEST_ARGS='cd {build_dir}; {interpreter} -m unittest discover' \
	  dh_auto_test --buildsystem=pybuild --sourcedirectory=bindings/python
	dh_auto_test --buildsystem=ruby

override_dh_auto_install:
	dh_auto_install
	dh_auto_install --buildsystem=lua
	dh_auto_install --sourcedirectory=bindings/perl-shared
	dh_auto_install --sourcedirectory=bindings/perl-piped
	dh_auto_install --buildsystem=pybuild --sourcedirectory=bindings/python
	dh_auto_install --buildsystem=ruby

override_dh_install:
	# We don't install systemd files yet, because it changes socket location.
	# This may need a transition with other packages (TODO).
	dh_install -X.la -X.txt -X.pod -Xsystemd

override_dh_installdocs:
	dh_installdocs -A CONTRIBUTORS NEWS

override_dh_missing:
	dh_missing -X.la -X.txt -X.pod -Xsystemd --fail-missing

override_dh_strip:
	dh_strip --dbg-package=rrdtool-dbg

override_dh_gencontrol:
	tcltk-depends
	dh_gencontrol