File: rules

package info (click to toggle)
pdal 2.2.0+ds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 229,252 kB
  • sloc: cpp: 489,801; python: 5,398; xml: 2,382; sh: 827; makefile: 628; javascript: 397; sql: 26; perl: 19
file content (74 lines) | stat: -rwxr-xr-x 2,192 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
#!/usr/bin/make -f

# DH_VERBOSE := 1

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

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

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

CXXFLAGS += $(CPPFLAGS)

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

BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")

MANPAGES := $(wildcard debian/man/*.*.xml)

%:
	dh $@ --with pkgkde_symbolshelper,sphinxdoc

override_dh_clean:
	dh_clean debian/man/*.1

	$(RM) -r doc/html

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	                     -DCMAKE_INSTALL_LIBDIR=lib \
	                     -DBUILD_PLUGIN_E57=ON \
	                     -DBUILD_PLUGIN_HDF=ON \
	                     -DBUILD_PLUGIN_I3S=ON \
	                     -DBUILD_PLUGIN_ICEBRIDGE=ON \
	                     -DWITH_COMPLETION=ON

override_dh_auto_build:
	# Create man pages from DocBook XML
	for x in $(MANPAGES) ; do \
	  docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
	  mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
	done

	dh_auto_build

	sphinx-build doc/ doc/html/ && ln -s /usr/share/javascript/mathjax doc/html/_static/

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Exclude tests:
	# - pgpointcloudtest, requires configured PostgreSQL database
	# - pdal_spatial_reference_test, fails sometimes
	(cd obj-* && ctest --force-new-ctest-process --output-on-failure --exclude-regex "pgpointcloudtest|pdal_spatial_reference_test" || echo "Ignoring test failures")
endif

override_dh_auto_install:
	dh_auto_install

	# Strip RPATH
	chrpath --delete debian/tmp/usr/lib/libpdal_plugin_*.so

	# Move pkg-config file to Multi-Arch path
	mkdir debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
	mv debian/tmp/usr/lib/pkgconfig debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/

	# Remove empty directories
	rmdir $(CURDIR)/debian/*/usr/include/pdal/filters/private/csf
	rmdir $(CURDIR)/debian/*/usr/include/pdal/filters/private/miniball

override_dh_install:
	dh_install --list-missing

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(UPSTREAM_VERSION) -c0