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
|
#!/usr/bin/make -f
# optimize=-lto because I use Meson's LTO
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto qa=+all
%:
dh $@ --buildsystem=meson
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test := true
else
test := false
endif
override_dh_auto_configure:
dh_auto_configure -- \
-Db_lto=true \
-Dbuild_tests=$(test) \
-Dcompile_library=true \
-Duse_vendored_libs=true
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
echo '<meta name="color-scheme" content="light dark">' > README.html
echo '<link rel="stylesheet" href="/usr/share/javascript/highlight.js/styles/default.css" media="(prefers-color-scheme: light)">' >> README.html
echo '<link rel="stylesheet" href="/usr/share/javascript/highlight.js/styles/dark.css" media="(prefers-color-scheme: dark)">' >> README.html
echo '<script src="/usr/share/javascript/highlight.js/highlight.min.js"></script>' >> README.html
echo '<script>hljs.initHighlightingOnLoad();</script>' >> README.html
cmark-gfm --unsafe --extension table README.md >> README.html
endif
execute_after_dh_clean:
$(RM) README.html
|