Package: src:hamlib
Version: 3.2-2
Severity: serious
Tags: ftbfs
Dear maintainer:
I tried to build this package in buster using dpkg-buildpackage -A
but it failed:
[...]
debian/rules override_dh_auto_install-indep
make[1]: Entering directory '/<>'
pyversions: missing X(S)-Python-Version in control file, fall back to
debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
py3versions: no X-Python3-Version in control file, using supported versions
mkdir -p /<>/debian/tmp/usr/share/doc/hamlib
cp -r /<>/build-indep/doc/html \
/<>/debian/tmp/usr/share/doc/hamlib/
make[1]: Leaving directory '/<>'
debian/rules override_dh_install
make[1]: Entering directory '/<>'
pyversions: missing X(S)-Python-Version in control file, fall back to
debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
py3versions: no X-Python3-Version in control file, using supported versions
dh_install
lts=/<>/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
if [ -f "$lts" ]; then \
rm -f $lts; \
fi
/bin/sh: 2: Syntax error: "then" unexpected
make[1]: *** [debian/rules:105: override_dh_install] Error 2
make[1]: Leaving directory '/<>'
make: *** [debian/rules:18: binary-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-indep subprocess
returned exit status 2
Looking at the code:
override_dh_install:
dh_install
lts=$(CURDIR)/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
if [ -f "$$lts" ]; then \
rm -f $$lts; \
fi
it seems there is a missing ";" at the end of lts= line.
However, if you want to remove a file unconditionally no matter what, I wonder
why don't you do this instead:
--- a/debian/rules
+++ b/debian/rules
@@ -102,10 +102,7 @@ override_dh_auto_install-indep:
override_dh_install:
dh_install
- lts=$(CURDIR)/debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua \
- if [ -f "$$lts" ]; then \
- rm -f $$lts; \
- fi
+ rm -f debian/lua-hamlib2/usr/share/doc/lua-hamlib2/luatest.lua
override_dh_auto_clean:
dh_auto_clean
Or maybe it would be even better to use "dh_install -Xexcluded_file" in a
single line.
Thanks.