summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules80
1 files changed, 47 insertions, 33 deletions
diff --git a/debian/rules b/debian/rules
index 441fcb59..68ffd546 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,6 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
TMPBIN:=debian/tmp/usr/bin
PY3VERS:=$(shell py3versions -vs)
-DEFAULT_PY3VER=$(shell py3versions -vd)
-REMAINING_PY3VERS:=$(filter-out $(DEFAULT_PY3VER), $(PY3VERS))
DHFLAGS+=--buildsystem=cmake
@@ -21,8 +19,8 @@ ifeq (, $(ALLOW_PARALLEL))
endif
# The buildds run out of memory on some architectures. On those, we
-# force non-parallel building.
-ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 mips mipsel m68k powerpcspe x32))
+# tune the GCC garbage collector and force non-parallel building.
+ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),armhf arm64 i386 mips mipsel m68k powerpcspe x32))
export DEB_CXXFLAGS_MAINT_APPEND = --param ggc-min-expand=5
# We have disabled parallel builds in general now. Consider disabling
# for certain architectures if it's reenabled globally.
@@ -30,34 +28,37 @@ ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 mips mi
endif
# Disable tests on i386 due to rounding problem in some. See upstream GitHub issue #118.
-# Disable tests on s390x, as a few are broken. See #943384.
-ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 s390x x32))
+ifneq (, $(filter $(shell dpkg-architecture --query DEB_BUILD_ARCH),i386 x32))
export DEB_BUILD_MAINT_OPTIONS := $(DEB_BUILD_MAINT_OPTIONS) nocheck
endif
%:
-# The --buildirectory=build is there so that we can easily get a hold
-# of documentation and examples, which are not installed by upstream.
- dh $@ $(DHFLAGS) --with=python3 --builddirectory=build
- for py3ver in $(REMAINING_PY3VERS) ; do \
- dh $@ $(DHFLAGS) --with=python3 --builddirectory=build$$py3ver ; \
+ dh $@ $(DHFLAGS) --with=python3
+
+execute_before_dh_auto_configure:
+ dh_auto_configure $(DHFLAGS) --builddirectory=build -- -DWITH_GUDHI_BENCHMARK=true -DWITH_GUDHI_EXAMPLE=true -DWITH_GUDHI_PYTHON=false -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=true -DWITH_GUDHI_REMOTE_TEST=false -DUSER_VERSION_DIR=userversion -DHERA_INCLUDE_DIR=/usr/include/hera
+ make -C build user_version
+ for py3ver in $(PY3VERS) ; do \
+ dh_auto_configure $(DHFLAGS) --builddirectory=build-py$$py3ver -- -DWITH_GUDHI_BENCHMARK=false -DWITH_GUDHI_EXAMPLE=false -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=false -DWITH_GUDHI_REMOTE_TEST=false -DPython_ADDITIONAL_VERSIONS=$$py3ver -DUSER_VERSION_DIR=userversion -DWITH_GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS=false -DHERA_INCLUDE_DIR=/usr/include/hera ; \
+ make -C build-py$$py3ver user_version ; \
done
override_dh_auto_configure:
- dh_auto_configure $(DHFLAGS) -- -DWITH_GUDHI_BENCHMARK=true -DWITH_GUDHI_EXAMPLE=true -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=true -DPython_ADDITIONAL_VERSIONS=$(DEFAULT_PY3VER) -DUSER_VERSION_DIR=gudhi -DWITH_GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS=false -DHERA_WASSERSTEIN_INCLUDE_DIR=/usr/include/hera/wasserstein
- for py3ver in $(REMAINING_PY3VERS) ; do \
- dh_auto_configure $(DHFLAGS) --builddirectory=build$$py3ver -- -DWITH_GUDHI_BENCHMARK=false -DWITH_GUDHI_EXAMPLE=false -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=false -DPython_ADDITIONAL_VERSIONS=$$py3ver -DWITH_GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS=false -DHERA_WASSERSTEIN_INCLUDE_DIR=/usr/include/hera/wasserstein ; \
+ dh_auto_configure $(DHFLAGS) --sourcedir=build/userversion --builddirectory=build/userversion/build -- -DWITH_GUDHI_BENCHMARK=true -DWITH_GUDHI_EXAMPLE=true -DWITH_GUDHI_PYTHON=false -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=true -DWITH_GUDHI_REMOTE_TEST=false -DHERA_INCLUDE_DIR=/usr/include/hera
+ for py3ver in $(PY3VERS) ; do \
+ dh_auto_configure $(DHFLAGS) --sourcedir=build-py$$py3ver/userversion --builddirectory=build-py$$py3ver/userversion/build -- -DWITH_GUDHI_BENCHMARK=false -DWITH_GUDHI_EXAMPLE=false -DWITH_GUDHI_PYTHON=true -DWITH_GUDHI_TEST=true -DWITH_GUDHI_UTILITIES=false -DWITH_GUDHI_REMOTE_TEST=false -DPython_ADDITIONAL_VERSIONS=$$py3ver -DWITH_GUDHI_PYTHON_RUNTIME_LIBRARY_DIRS=false -DHERA_INCLUDE_DIR=/usr/include/hera ; \
done
override_dh_auto_build-arch:
- dh_auto_build $(DHFLAGS) --builddirectory=build
- for py3ver in $(REMAINING_PY3VERS) ; do \
- dh_auto_build $(DHFLAGS) --builddirectory=build$$py3ver ; \
+ dh_auto_build $(DHFLAGS) --sourcedir=build/userversion --builddirectory=build/userversion/build
+ for py3ver in $(PY3VERS) ; do \
+ cd build-py$$py3ver/userversion/build/python ; \
+ /usr/bin/python$$py3ver setup.py build ; \
done
override_dh_auto_build-indep:
- make -C build doxygen
- dh_auto_build $(DHFLAGS) --builddirectory=build
+ cd build/userversion/build ; \
+ make doxygen
override_dh_auto_test-indep:
@@ -65,26 +66,18 @@ override_dh_auto_test-arch:
# I believe this should be handled automatically by dh_auto_test,
# but see #901678.
ifeq (, $(filter nocheck,$(DEB_BUILD_MAINT_OPTIONS)))
- dh_auto_test $(DHFLAGS) --no-parallel --builddirectory=build
- for py3ver in $(REMAINING_PY3VERS) ; do \
- dh_auto_test $(DHFLAGS) --no-parallel --builddirectory=build$$py3ver ; \
- done
+ dh_auto_test $(DHFLAGS) --no-parallel --sourcedir=build/userversion --builddirectory=build/userversion/build
else
@echo "Skipping tests due to nocheck flag."
endif
-override_dh_auto_install:
- find src -type f -path '*/example/*' \( -name '*.cpp' -o \( -name '*.txt' -a ! -iname 'cmake*' \) \) -exec sh -c 'name=$$(echo $$0 | sed s/src\\/// | sed s/example\\///); install -D -m 644 $$0 debian/tmp/usr/share/doc/libgudhi-examples/$$name' {} \;
-
- dh_auto_install $(DHFLAGS) --builddirectory=build
- for py3ver in $(REMAINING_PY3VERS) ; do \
- dh_auto_install $(DHFLAGS) --builddirectory=build$$py3ver ; \
+override_dh_auto_install-arch:
+ dh_auto_install $(DHFLAGS) --sourcedir=build/userversion --builddirectory=build/userversion/build
+ for py3ver in $(PY3VERS) ; do \
+ cd build-py$$py3ver/userversion/build/python ; \
+ /usr/bin/python$$py3ver setup.py install --root=../../../../debian/tmp --single-version-externally-managed --install-layout=deb ; \
done
- # Remove installed information about Miniball header.
- rm -f build/gudhi/include/gudhi/Miniball.COPYRIGHT
- rm -f build/gudhi/include/gudhi/Miniball.README
-
mv $(TMPBIN)/Nerve \
$(TMPBIN)/gudhi-nerve
mv $(TMPBIN)/VoronoiGIC \
@@ -115,11 +108,32 @@ override_dh_auto_install:
$(TMPBIN)/gudhi-rips-persistence
mv $(TMPBIN)/sparse_rips_persistence \
$(TMPBIN)/gudhi-sparse-rips-persistence
+ mv $(TMPBIN)/distance_matrix_edge_collapse_rips_persistence \
+ $(TMPBIN)/gudhi-distance-matrix-edge-collapse-rips-persistence
+ mv $(TMPBIN)/point_cloud_edge_collapse_rips_persistence \
+ $(TMPBIN)/gudhi-point-cloud-edge-collapse-rips-persistence
mv $(TMPBIN)/GudhUI $(TMPBIN)/gudhui
+override_dh_auto_install-indep:
+ find src -type f -path '*/example/*' \( -name '*.cpp' -o \( -name '*.txt' -a ! -iname 'cmake*' \) \) -exec sh -c 'name=$$(echo $$0 | sed s/src\\/// | sed s/example\\///); install -D -m 644 $$0 debian/tmp/usr/share/doc/libgudhi-examples/$$name' {} \;
+
override_dh_compress:
dh_compress -X.cpp
override_dh_install:
dh_install -X__pycache__ -X.pyc -X.pyo
+
+override_dh_missing:
+ dh_missing --list-missing
+
+override_dh_python3:
+ for py3ver in $(PY3VERS) ; do \
+ dh_python3 -O--sourcedir=build-py$$py3ver/userversion ; \
+ done
+
+execute_before_dh_auto_clean:
+ rm -rf build
+ for py3ver in $(PY3VERS) ; do \
+ rm -rf build-py$$py3ver ; \
+ done