Re: Trouble with ocaml-dune and magic variables
Hi,
Le samedi 15 février 2025 à 03:18 +0100, Stéphane Glondu a écrit :
>
> Usually, projects using this trick publish tarballs with
> substitutions
> applied:
>
> https://github.com/LPCIC/elpi/releases/tag/v2.0.7
>
> (here, elpi-2.0.7.tbz).
I realize my previous email was a bit short: I was wondering if this
.tbz still source code because in the autotools world, package sources
come with configure scripts ready to run, but the good practice in
Debian is to regenerate those from configure.ac.
I fixed the elpi package by using something a bit hackish: I added git
as dep, and if I don't see a .git in the build directory, I create one!
Here is what the execute_before_dh_auto_build target does:
if test -f .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
and here is what the execute_after_dh_auto_clean does:
if test -f .false_git; then \
rm -rf .false_git .git; \
fi
I suppose dh's ocaml_dune building tool could do that trick itself
(using debian/fake_dot_git instead of .false_git, better
user.email/user.name...), and that would make sure we don't break.
What do you think about the topic?
J.Puydt
Reply to: