Helge Kreutzmann:
Package: debhelper
Version: 13.11.1
Severity: wishlist
Tags: l10n
X-Debbugs-Cc: Marc Haber <mh+debian-packa...@zugschlus.de>
 > [...]

Depending on the translator's work, man pages might appear or vanish
(if they are not translated enough, see po4a(1) for details).
Therefore, creating and maintaining static .links files for dh_link is
not an option. [...]


[...]



Hi Helge,

This sounds like a case for having your .links file be executable with a custom generator. In this case, your .links file will be run as a script and its output (stdout) will be used as the .links file (albeit, debhelper is more strict with generated output - e.g., no comments).


Something like:
"""
cat > debian/pkg.links <<EOF
#!/bin/sh
for LINE in $(cat "${path_to}/links.txt") ; do
    source=$(...)
    if [ -f "${source}" ]; then
        link_target=$(...)
        link_dest=$(...)
        echo "${link_target} ${link_dest}"
    fi
done
EOF
chmod +x debian/pkg.links
"""


Should work as a starting point (though I have left some $(...) parts for you to fill in).

This feature is already supported by debhelper and enables you to have package specific custom logic that match exactly your needs.

Thanks,
~Niels

Reply via email to