summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-10-23 20:56:17 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-10-23 20:56:17 +0400
commit91c81f2b11d5230c6c6a9294f7f184c5174dff05 (patch)
tree6cdc543a34a833e73716d4f887f96e8f41dfa8b0
parent865abe8f17562e096b1c44452bbdfdc5fab6bff4 (diff)
downloaddh-illumos-91c81f2b11d5230c6c6a9294f7f184c5174dff05.tar.gz
dh_illumos_gate: Added option -B
-rw-r--r--debian/changelog4
-rwxr-xr-xdh_illumos_gate26
2 files changed, 24 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index b09fb23..a247a9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dh-illumos (9.3) UNRELEASED; urgency=low
- * Allow unpacking only specified files or directories
+ * dh_illumos_gate:
+ - Allow unpacking only specified files or directories
+ - Added option -B
-- Igor Pashev <pashev.igor@gmail.com> Tue, 23 Oct 2012 20:06:54 +0400
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