From: Michael Howe Date: Sat, 17 Oct 2015 21:23:25 +0000 (+0100) Subject: Add option to build binary-only packages X-Git-Tag: 1.6~6 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=92eec6090d53ab08f7cea42fa48de0af8bba05e3;p=packages%2Fm%2Fmh-sysadmin-tools.git Add option to build binary-only packages Also print name of dir files built in --- diff --git a/bin/build-package b/bin/build-package index 18902c3..5c8b9c3 100755 --- a/bin/build-package +++ b/bin/build-package @@ -30,12 +30,14 @@ my @archs; # = 'amd64'; my @dists; # = 'squeeze'; my $dsc; # optional; allows use of a dsc directly my $os = 'debian'; +my $binary_only; GetOptions( "arch=s" => \@archs, "dist=s" => \@dists, "os=s" => \$os, "dsc=s" => \$dsc, + 'binary-only' => \$binary_only, ); my $path = $ARGV[0]; @@ -138,6 +140,12 @@ my $distcmds = "--dist=" . join( " ", @dists ); #my @archcmds = map { "--arch=" . $_ } @archs; #my @distcmds = map { "--dist=" . $_ } @dists; +if( $binary_only ){ + push @cowpoke_opts, "--dpkg-opts='-B'"; +} else { + push @cowpoke_opts, "--dpkg-opts='-sa'"; +} + my @cowpokecmd = ( $cowpoke, $archcmds, $distcmds, @cowpoke_opts, $dscfile ); print "Running @cowpokecmd"; system( @cowpokecmd ) == 0 @@ -162,6 +170,8 @@ foreach my $changefile ( @changefiles ){ or warn "Could not sign changes file $changefile: $!"; } +print "Build complete in $local_outputdir\n"; + sub get_source_format { unless( -f "debian/source/format" ){ return "";