]> git.michaelhowe.org Git - packages/m/mh-sysadmin-tools.git/commitdiff
Add option to build binary-only packages
authorMichael Howe <michael@michaelhowe.org>
Sat, 17 Oct 2015 21:23:25 +0000 (22:23 +0100)
committerMichael Howe <michael@michaelhowe.org>
Sat, 17 Oct 2015 21:23:25 +0000 (22:23 +0100)
Also print name of dir files built in

bin/build-package

index 18902c31a323365f924a13a00dc45d297506f271..5c8b9c3f37af848c76cf8f5e584f4e7e9db9b561 100755 (executable)
@@ -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 "";