File: rules

package info (click to toggle)
netcdf 1%3A4.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 115,904 kB
  • sloc: ansic: 278,886; sh: 14,183; cpp: 5,971; yacc: 2,612; makefile: 1,999; lex: 1,218; javascript: 280; xml: 173; awk: 2
file content (49 lines) | stat: -rwxr-xr-x 1,353 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

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

# Remove buildpath from binaries
export DEB_CFLAGS_MAINT_APPEND=-DNDEBUG

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

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_SKIP_RPATH:BOOL=OFF \
		-DCMAKE_VERBOSE_MAKEFILE=1 \
		-DENABLE_TESTS:BOOL=ON \
		-DENABLE_DOXYGEN:BOOL=ON \
		-DENABLE_LOGGING:BOOL=ON \
		-DENABLE_PLUGINS:BOOL=OFF \
		-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"

execute_after_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_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.md

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION)