File: rules

package info (click to toggle)
pdal 1.8.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 203,324 kB
  • sloc: cpp: 501,008; sh: 11,840; python: 3,263; xml: 2,389; makefile: 603; sql: 26; perl: 19
file content (88 lines) | stat: -rwxr-xr-x 2,739 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
#!/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 python2,pkgkde_symbolshelper,sphinxdoc --parallel

override_dh_clean:
	if [ -e debian/gtest.config.guess ]; then \
		mv debian/gtest.config.guess vendor/gtest/build-aux/config.guess ; \
	fi
	if [ -e debian/gtest.config.sub ]; then \
		mv debian/gtest.config.sub   vendor/gtest/build-aux/config.sub ; \
	fi

	dh_clean debian/man/*.1

	$(RM) -r doc/html

override_dh_auto_configure:
	# Don't use outdated autotools helper files
	mv vendor/gtest/build-aux/config.guess debian/gtest.config.guess
	mv vendor/gtest/build-aux/config.sub   debian/gtest.config.sub

	cp /usr/share/misc/config.guess vendor/gtest/build-aux/config.guess
	cp /usr/share/misc/config.sub   vendor/gtest/build-aux/config.sub

	dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
	                     -DCMAKE_INSTALL_LIBDIR=lib \
	                     -DBUILD_PLUGIN_GREYHOUND=ON \
	                     -DBUILD_PLUGIN_ICEBRIDGE=ON \
	                     -DBUILD_PLUGIN_PYTHON=ON \
	                     -DBUILD_PLUGIN_SQLITE=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

	/usr/share/sphinx/scripts/python2/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)/

override_dh_install:
	dh_install --list-missing

override_dh_python2:
	dh_python2 -plibpdal-plugin-python
	dh_numpy -plibpdal-plugin-python

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