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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#!/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 src/trace_atd.ts src/trace_atd.ts.orig
if test -e .git; then \
echo "Found .git, ok"; \
else \
touch .false_git; \
git init --initial-branch=main; \
git config user.email "foo@bar.baz"; \
git config user.name "Foo Bar"; \
git add dune; \
git commit -m foo; \
git tag -a v$(DEB_VERSION_UPSTREAM) -m foo; \
fi
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 src/trace_atd.ts.orig; then \
mv src/trace_atd.ts.orig src/trace_atd.ts; \
fi
if test -f .false_git; then \
rm -rf .false_git .git; \
fi
|