diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-10-23 20:56:17 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-10-23 20:56:17 +0400 |
commit | 91c81f2b11d5230c6c6a9294f7f184c5174dff05 (patch) | |
tree | 6cdc543a34a833e73716d4f887f96e8f41dfa8b0 /dh_illumos_gate | |
parent | 865abe8f17562e096b1c44452bbdfdc5fab6bff4 (diff) | |
download | dh-illumos-91c81f2b11d5230c6c6a9294f7f184c5174dff05.tar.gz |
dh_illumos_gate: Added option -B
Diffstat (limited to 'dh_illumos_gate')
-rwxr-xr-x | dh_illumos_gate | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate index 88c9c05..233d43c 100755 --- a/dh_illumos_gate +++ b/dh_illumos_gate @@ -13,7 +13,8 @@ use Cwd; =head1 SYNOPSIS -B<dh_illumos_gate> [S<I<debhelper options>>] [B<-X>I<PATTERN>] [files and/or directories to extract] +B<dh_illumos_gate> [S<I<debhelper options>>] [B<-B>] [B<-X>I<PATTERN>] +[files and/or directories to extract] =head1 DESCRIPTION @@ -39,6 +40,13 @@ L<dh_illumos_make(1)> provides more convenient way to do this. =over 4 +=item B<-B> B<--build> + +Extract files known to be required for building illumos components. +These are F<usr/src/tools/scripts/bldenv.sh> and F<usr/src/Makefile*>. +This option is provided only for convenience. You are free to +extract these files explicitly. + =item B<-X>I<PATTERN> B<--exclude=>I<PATTERN> Do not extract files or directories matching I<PATTERN>. @@ -96,6 +104,7 @@ Here are things which this helper does after unpacking illumos sources. =cut init(options => { + "build|B" => \$dh{BUILD}, }); my %options = (file => 'debian/changelog'); @@ -126,12 +135,19 @@ if (defined($dh{'EXCLUDE'}) && $dh{'EXCLUDE'}) { my @to_extract = (); if (@ARGV) { - @to_extract = map {s,(?:illumos-gate/)?(.*),illumos-gate/$1,; $_} @ARGV; + if ($dh{'BUILD'}) { + push @to_extract, ( + 'usr/src/Makefile*', + 'usr/src/tools/scripts/bldenv.sh', + ); + } + push @to_extract, map {m,(?:illumos-gate/)?(.*),; $1} @ARGV; } else { - push @to_extract, 'illumos-gate/usr'; + push @to_extract, 'usr'; } -# Strip "illumos-gate/" -doit('tar', '-x', '-f', $tarball, @tar_X, '--wildcards', '--strip-components=1', @to_extract); + +doit('tar', '-x', '-f', $tarball, @tar_X, '--wildcards', '--strip-components=1', + map {'illumos-gate/' . $_} @to_extract); =item Saving original files |