Bug 15838 - Subscription duplicating: Reset fields from SubscriptionDuplicateDroppedI...
[koha.git] / debian / bd-to-depends
blobcff8b24446398a295dda0e33e1113cd7e13522b6
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 my @exclusions = (
7 'debhelper',
8 );
10 open my $control_fh, '<', 'debian/control' or die "Cannot open debian/control";
11 my @lines = <$control_fh>;
12 close $control_fh;
14 my @build_depends;
15 my $in_build_depends_block;
16 for my $line ( @lines ) {
17 chomp $line;
18 if ( $line =~ m|Build-Depends:| ) {
19 $in_build_depends_block = 1;
20 $line =~ s|Build-Depends:||;
22 next unless $in_build_depends_block;
23 if ( $line =~ m|^\s*$| ) {
24 last;
26 for my $dep ( split ',', $line ) {
27 $dep =~ s|^\s*||;
28 push @build_depends, $dep unless ( map { ( $dep =~ m|$_| ) ? 1 : () } @exclusions);
31 print 'koha:Depends=' . join ( ', ', @build_depends ) . "\n";