Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
732 B
30 lines
732 B
#!/usr/bin/perl
|
|
|
|
use Modern::Perl;
|
|
|
|
my @exclusions = (
|
|
'debhelper',
|
|
);
|
|
|
|
open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control";
|
|
my @lines = <$control_fh>;
|
|
close $control_fh;
|
|
|
|
my @build_depends;
|
|
my $in_build_depends_block;
|
|
for my $line ( @lines ) {
|
|
chomp $line;
|
|
if ( $line =~ m|Build-Depends:| ) {
|
|
$in_build_depends_block = 1;
|
|
$line =~ s|Build-Depends:||;
|
|
}
|
|
next unless $in_build_depends_block;
|
|
if ( $line =~ m|^\s*$| ) {
|
|
last;
|
|
}
|
|
for my $dep ( split ',', $line ) {
|
|
$dep =~ s|^\s*||;
|
|
push @build_depends, $dep unless ( map { ( $dep =~ m|$_| ) ? 1 : () } @exclusions);
|
|
}
|
|
}
|
|
print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n";
|
|
|