#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+all qa=+all
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- -DBUILD_SHARED_LIBS=true
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_install:
mkdir -p debian/tmp/src
printf '%s\n' '' > debian/tmp/README.html
cmark README.md | sed -E -e '/img src="http/d' -e 's/href="([^"]+)\.md"/href="\1.html"/g' >> debian/tmp/README.html
for file in src/*.md; \
do \
name=$$(basename "$$file" .md); \
printf '%s\n' '' > "debian/tmp/src/$$name.html"; \
cmark "$$file" | sed -E 's/href="([^"]+)\.md"/href="\1.html"/g' >> "debian/tmp/src/$$name.html"; \
done
endif