diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..3cd05121 --- /dev/null +++ b/debian/rules @@ -0,0 +1,100 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) +CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) +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)) + +%: +# The --buildirectory=build is there so that we can easily get a hold +# of documentation and examples, which are not installed by upstream. + dh $@ --with=python3 --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh $@ --with=python3 --builddirectory=build$$py3ver ; \ + done + +override_dh_auto_configure: + dh_auto_configure -- -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) + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_configure --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 ; \ + done + +override_dh_auto_build-arch: + dh_auto_build --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_build --builddirectory=build$$py3ver ; \ + done + +override_dh_auto_build-indep: + make -C build doxygen + dh_auto_build --builddirectory=build + +override_dh_auto_test-indep: + +override_dh_auto_test-arch: + dh_auto_test --no-parallel --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_test --no-parallel --builddirectory=build$$py3ver ; \ + done + +override_dh_auto_install: + find example -type f \( -name '*.cpp' -o \( -name '*.txt' -a ! -iname 'cmake*' \) \) -exec sh -c 'install -D -m 644 $$0 debian/tmp/usr/share/doc/libgudhi-examples/$$0' {} \; + + dh_auto_install --builddirectory=build + for py3ver in $(REMAINING_PY3VERS) ; do \ + dh_auto_install --builddirectory=build$$py3ver ; \ + done + + # Remove installed information about Miniball header. + rm debian/tmp/usr/include/gudhi/Miniball.COPYRIGHT + rm debian/tmp/usr/include/gudhi/Miniball.README + + mv $(TMPBIN)/Nerve \ + $(TMPBIN)/gudhi-nerve + mv $(TMPBIN)/VoronoiGIC \ + $(TMPBIN)/gudhi-voronoi-gic + mv $(TMPBIN)/Witness_complex_strong_witness_persistence \ + $(TMPBIN)/gudhi-witness-complex-strong-witness-persistence + mv $(TMPBIN)/Witness_complex_weak_witness_persistence \ + $(TMPBIN)/gudhi-witness-complex-weak-witness-persistence + mv $(TMPBIN)/alpha_complex_3d_persistence \ + $(TMPBIN)/gudhi-alpha-complex-3d-persistence + mv $(TMPBIN)/alpha_complex_persistence \ + $(TMPBIN)/gudhi-alpha-complex-persistence + mv $(TMPBIN)/bottleneck_distance \ + $(TMPBIN)/gudhi-bottleneck-distance + mv $(TMPBIN)/cech_persistence \ + $(TMPBIN)/gudhi-cech-persistence + mv $(TMPBIN)/cubical_complex_persistence \ + $(TMPBIN)/gudhi-cubical-complex-persistence + mv $(TMPBIN)/exact_alpha_complex_3d_persistence \ + $(TMPBIN)/gudhi-exact-alpha-complex-3d-persistence + mv $(TMPBIN)/off_file_from_shape_generator \ + $(TMPBIN)/gudhi-off-file-from-shape-generator + mv $(TMPBIN)/periodic_alpha_complex_3d_persistence \ + $(TMPBIN)/gudhi-periodic-alpha-complex-3d-persistence + mv $(TMPBIN)/periodic_cubical_complex_persistence \ + $(TMPBIN)/gudhi-periodic-cubical-complex-persistence + mv $(TMPBIN)/rips_correlation_matrix_persistence \ + $(TMPBIN)/gudhi-rips-correlation-matrix-persistence + mv $(TMPBIN)/rips_distance_matrix_persistence \ + $(TMPBIN)/gudhi-rips-distance-matrix-persistence + mv $(TMPBIN)/rips_persistence \ + $(TMPBIN)/gudhi-rips-persistence + mv $(TMPBIN)/sparse_rips_persistence \ + $(TMPBIN)/gudhi-sparse-rips-persistence + mv $(TMPBIN)/weighted_alpha_complex_3d_persistence \ + $(TMPBIN)/gudhi-weighted-alpha-complex-3d-persistence + mv $(TMPBIN)/weighted_periodic_alpha_complex_3d_persistence \ + $(TMPBIN)/gudhi-weighted-periodic-alpha-complex-3d-persistence + + install -D build/GudhUI/GudhUI $(TMPBIN)/gudhui + +override_dh_compress: + dh_compress -X.cpp |