From 9cb511802b9d81d547c3d028937be262cf1885ce Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Jan 17 2014 18:05:05 +0000 Subject: Add --target= option for setting architecture. --- diff --git a/alien.pl b/alien.pl index 64450fb..059cdd4 100755 --- a/alien.pl +++ b/alien.pl @@ -193,6 +193,10 @@ some things to mess with their permissions and owners to the degree this does, so it defaults to off. This can only be used when converting to debian packages. +=item B<--target=>I + +Force the architecture of the generated package to the given string. + =item B<-v>, B<--verbose> Be verbose: Display each command B runs in the process of converting a @@ -330,6 +334,7 @@ Usage: alien [options] file [...] -i, --install Install generated package. -g, --generate Generate build tree, but do not build package. -c, --scripts Include scripts in package. + --target= Set architecture of the generated package. -v, --verbose Display each command alien runs. --veryverbose Be verbose, and also display output of run commands. -k, --keep-version Do not change version of generated package. @@ -344,7 +349,7 @@ EOF # Start by processing the parameters. my (%destformats, $generate, $install, $single, $scripts, $patchfile, $nopatch, $tgzdescription, $tgzversion, $keepversion, $fixperms, - $test, $anypatch); + $test, $anypatch, $target); my $versionbump=1; # Bundling is nice anyway, and it is required or Getopt::Long will confuse @@ -366,6 +371,7 @@ GetOptions( "patch=s" => \$patchfile, "nopatch" => \$nopatch, "anypatch" => \$anypatch, + "target=s" => \$target, "description=s" => \$tgzdescription, "V" => \&version, "version:s" => sub { length $_[1] ? $tgzversion=$_[1] : version() }, @@ -446,6 +452,10 @@ foreach my $file (@ARGV) { die "Unknown type of package, $file.\n"; } + if ($target) { + $package->arch($target); + } + if (! $package->usescripts && $package->scripts) { $package->usescripts($scripts); if (! $scripts) {