2fcc4fe94e
The canonical list of Perl module dependencies are in C4::Installer::PerlDependencies::PERL_DEPS now. Add a script (debian/list-deps) to turn that into a list of Debian package names. Because that is a slow process, and the output rarely changes, do not do that at build time. Also, doing it at build time would require modifying debian/control in evil ways. Instead, add another tool, debian/update-control, which reads the new file debian/control.in, and adds the output of debian/list-deps to Build-Depends and creates a new debian/control. debian/control.in is the master file. If changes are needed, that should be edited. For performance and convenience reasons, the output is also kept in git, but don't edit debian/control directly, please. Such changes might get lost by the next commit by someone else. Whenever PERL_DEPS changes, debian/update-control should be run as well and the result committed to git. This is not quite as automatic as it might be, but should be good enough. It avoids keeping the list of Perl modules in two places. Note that since it seems impossible to automatically figure out the Debian package version that corresponds to a Perl module version, I have not tried to do that at all. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
11 lines
209 B
Bash
Executable file
11 lines
209 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
deps="$(debian/list-deps |
|
|
sort -u |
|
|
sed 's/.*/ &,\\n/' |
|
|
tr -d '\n' |
|
|
sed 's/,\\n$//')"
|
|
sed "s/__AUTODEPENDS__/$deps/" debian/control.in > debian/control
|
|
|