9 die "pbuilder: you should use me only to build, dgit"
10 unless ($operation eq "build" || $operation eq "b");
12 my $debbuildopts = undef;
13 my $distribution = undef;
14 GetOptions('debbuildopts=s' => \$debbuildopts,
15 'distribution=s' => \$distribution);
17 # ignore user args; last argument has to be the .dsc filename
19 die "pbuilder: last argument has wrong file extension"
20 unless ($dsc =~ m/^(.*)_.*\.dsc$/);
22 system "dpkg-source -x $dsc pbuilder";
25 dpkg-buildpackage --changes-option=-DDistribution=$distribution $debbuildopts