File: rules

package info (click to toggle)
votca 2022.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 210,184 kB
  • sloc: xml: 431,868; cpp: 77,088; python: 13,593; sh: 4,514; perl: 2,169; javascript: 221; makefile: 37
file content (51 lines) | stat: -rwxr-xr-x 1,773 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export CTEST_OUTPUT_ON_FAILURE = On
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Decide whether to build tests.
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	export CONFIG_BUILD_TESTS = -DENABLE_TESTING=TRUE  -DENABLE_REGRESSION_TESTING=TRUE
else
	export CONFIG_BUILD_TESTS = -DENABLE_TESTING=FALSE -DENABLE_REGRESSION_TESTING=FALSE
endif

override_dh_auto_configure:
	dh_auto_configure -- \
	-DBUILD_XTP=TRUE \
	-DBUILD_CSGAPPS=TRUE \
	-DINJECT_MARCH_NATIVE=FALSE \
	$(CONFIG_BUILD_TESTS)
	# Override various blhc false positives.
	@echo 'blhc: ignore-line-regexp: .*Looking for c\+\+ gmx_.*'
	@echo 'blhc: ignore-line-regexp: .*C\+\+ vector data structures.*'
	@echo 'blhc: ignore-line-regexp: .*Building CXX object csg/src/libcsg/CMakeFiles/votca_csg.dir/beadmotifconnector.cc.o'
	@echo 'blhc: ignore-line-regexp: .*Building CXX object csg/src/libcsg/CMakeFiles/votca_csg.dir/beadstructurealgorithms.cc.o'

override_dh_auto_build-indep:
	dh_auto_build
	# temporarily use bundled copy of cma to build documentation - not yet packaged separately
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR)/debian/cma-3.2.0 \
	make -C $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) doc
endif

override_dh_installdocs:
	mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/votca/html
	-test -d $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/sphinx.html && \
	cp -aru $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/sphinx.html/* $(CURDIR)/debian/tmp/usr/share/doc/votca/html/
	dh_installdocs
	dh_link -i

override_dh_auto_clean:
	dh_auto_clean
	py3clean $(CURDIR)
	rm -rf $(CURDIR)/.pytest_cache

%:
	dh $@ --with bash-completion,python3,sphinxdoc