summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..52551d70
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,26 @@
+#!/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)
+
+%:
+# The --buildirectory=build is there so that we can easily get a hold
+# of documentation and examples, which are not installed by upstream.
+ dh $@ --builddirectory=build
+
+override_dh_auto_clean:
+ rm -f GUDHIVersion.cmake
+ rm -rf doc/html
+ dh_auto_clean
+
+override_dh_auto_build:
+ make -C build doxygen
+ dh_auto_build
+
+override_dh_auto_install:
+ find build/example -executable -type f -exec sh -c 'install -D $$0 debian/tmp/usr/bin/libgudhi-example-$$(basename $$0)' {} \;
+ 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
+