File: rules

package info (click to toggle)
netcdf 1%3A4.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 101,340 kB
  • sloc: ansic: 200,241; sh: 10,808; yacc: 2,522; makefile: 1,234; lex: 1,153; xml: 173; awk: 2
file content (52 lines) | stat: -rwxr-xr-x 1,371 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

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

HDF5_INCLUDE_PATH=/usr/include/hdf5/serial
HDF5_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial

include /usr/share/dpkg/pkg-info.mk

UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//')

# Verbose test output
export VERBOSE=1

%:
	dh $@ --buildsystem=cmake --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_SKIP_RPATH:BOOL=OFF \
		-DCMAKE_VERBOSE_MAKEFILE=1 \
		-DENABLE_TESTS:BOOL=ON \
		-DENABLE_DOXYGEN:BOOL=ON \
		-DHDF5_INCLUDE_PATH=$(HDF5_INCLUDE_PATH) \
		-DHDF5_LIBRARY_PATH=$(HDF5_LIBRARY_PATH)

override_dh_auto_test:
	ARGS="--output-on-failure" dh_auto_test --max-parallel=1 || echo "Ignoring test failures"

override_dh_auto_install:
	dh_auto_install

	# Strip RPATH
	-find $(CURDIR)/debian/tmp/usr/bin -type f -not -name nc-config -exec chrpath --delete {} \;
	-find $(CURDIR)/debian/tmp/usr/lib -type f -name "*.so*" -exec chrpath --delete {} \;

override_dh_install:
	dh_install --list-missing

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.md

override_dh_strip:
	dh_strip --dbgsym-migration='netcdf-dbg (<< 1:4.5.0-2~)'

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION)