File: rules

package info (click to toggle)
netcdf 1%3A4.4.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 96,828 kB
  • ctags: 15,369
  • sloc: ansic: 163,650; sh: 9,294; yacc: 2,457; makefile: 1,208; lex: 1,161; xml: 173; f90: 7; fortran: 6; awk: 2
file content (53 lines) | stat: -rwxr-xr-x 1,408 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
#!/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

UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')

# 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

	$(RM) debian/tmp/usr/share/doc/netCDF/html/jquery.js

	# 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 --dbg-package=netcdf-dbg

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION)