#!/usr/bin/make -f # -*- makefile -*- include /usr/share/dpkg/pkg-info.mk include /usr/share/ocaml/ocamlvars.mk %: dh $@ --with ocaml --buildsystem ocaml_dune execute_before_dh_auto_build: cp elpi_REPL.ml elpi_REPL.ml.orig sed -e 's/%%VERSION_NUM%%/$(DEB_VERSION_UPSTREAM)/g' -i elpi_REPL.ml cp src/compiler/compiler.ml src/compiler/compiler.ml.orig sed -e 's/%%VERSION_NUM%%/$(DEB_VERSION_UPSTREAM)/g' -i src/compiler/compiler.ml cp src/trace_atd.ts src/trace_atd.ts.orig override_dh_auto_test: make tests STACK=11141120 execute_after_dh_auto_install: # drop excess LICENSE files rm -f debian/tmp/usr/doc/elpi/LICENSE # don't declare the documentation files as part of the package find debian/tmp -name dune-package | xargs sed -i -e "s|(doc[^()]*([^()]*))||g" find debian/tmp -name dune-package | xargs sed -i -e "s|(doc[^()]*)||g" # we detect what to ship find debian/tmp -regextype posix-awk \ -regex '.*\.(cma|cmxs)$$' \ >> debian/libelpi-ocaml.install find debian/tmp -regextype posix-awk \ -regex '.*\.(a|cmi|cmo|cmt|cmti|cmx|cmxa|ml|mli|o])$$' \ >> debian/libelpi-ocaml-dev.install execute_after_dh_auto_clean: rm -rf _log/ tests/test.exe data.csv* if test -f elpi_REPL.ml.orig; then \ mv elpi_REPL.ml.orig elpi_REPL.ml; \ fi if test -f src/compiler/compiler.ml.orig; then \ mv src/compiler/compiler.ml.orig src/compiler/compiler.ml; \ fi if test -f src/trace_atd.ts.orig; then \ mv src/trace_atd.ts.orig src/trace_atd.ts; \ fi