Koha/debian/bd-to-depends
Lars Wirzenius 8c7ce82ad6 Replace dependencies on koha-dev-env with list of packages.
The dependencies are needed both at build time and at run time. Build
time needs them for running tests. To avoid duplicating the (long!)
list of dependencies, we do a little bit of trickery, and generate
a koha:Depends substvar, from all build dependencies (except debhelper),
and use ${koha:Depends} in the koha-common (not koha) Depends header.
A little bit tricky, but works.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-26 16:30:21 +12:00

21 lines
443 B
Python
Executable file

#!/usr/bin/python
import re
import debian.deb822
exclusions = [
'debhelper',
]
exclusions = [re.compile(s) for s in exclusions]
depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends')
deps = [s.strip() for s in depstring.split(',')]
result = []
for dep in deps:
for ex in exclusions:
if ex.match(dep):
break
else:
result.append(dep)
print 'koha:Depends=%s' % ', '.join(result)