From 488a041f665c74a60de82997c4880f19a100c5c0 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 9 Oct 2015 21:16:36 +0300 Subject: dh_illumos_gate --create-orig is really smart --- dh_illumos_gate | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dh_illumos_gate b/dh_illumos_gate index d336861..5e81879 100755 --- a/dh_illumos_gate +++ b/dh_illumos_gate @@ -62,7 +62,8 @@ make any changes in there instead of the current directory. =item B<--create-orig> -Create I<.orig> tarball. +Create I<.orig> tarball out of the listed files and directories. +Note that part of path before F will be stripped. =back @@ -92,9 +93,9 @@ then add F dh_illumos_gate -- --wildcards-match-slash usr/src/uts/*.h -=item Create source tarball out of F excluding F<*.mf> files +=item Create source tarball out of F excluding F<*.xml> files - dh_illumos_gate --create-orig usr/src/cmd -X*.mf + dh_illumos_gate --create-orig [path/to/]usr/src/cmd -X*.xml =back @@ -149,11 +150,11 @@ if ( $dh{CREATE_ORIG} ) { my $source = $changelog->{'Source'}; my $source_version = $version =~ s!^(.*)-[^-]+$!$1!r; my $tarball = "$cwd/../${source}_${source_version}.orig.tar.xz"; - my $base = "$source-$source_version"; + my $transform = "s,.*usr/src,$source-$source_version/usr/src,"; doit( - 'tar', '-c', '-J', '--owner', - '0', '--group', '0', '--mode', - 'u=rwX,go=rX', '--transform', "s,^,$base/,", '-f', + 'tar', '-c', '-J', '--owner', + '0', '--group', '0', '--mode', + 'u=rwX,go=rX', '--transform', $transform, '-f', $tarball, @tar_X, @ARGV ); exit; -- cgit v1.2.3