summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh_illumos_gate21
1 files changed, 13 insertions, 8 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate
index f63fc17..d336861 100755
--- a/dh_illumos_gate
+++ b/dh_illumos_gate
@@ -135,6 +135,7 @@ init(
my %options = ( file => 'debian/changelog' );
my $changelog = changelog_parse(%options);
my $version = $changelog->{'Version'};
+my $cwd = getcwd();
my @tar_X = ();
if ( defined( $dh{'EXCLUDE'} ) && $dh{'EXCLUDE'} ) {
@@ -147,26 +148,31 @@ if ( defined( $dh{'EXCLUDE'} ) && $dh{'EXCLUDE'} ) {
if ( $dh{CREATE_ORIG} ) {
my $source = $changelog->{'Source'};
my $source_version = $version =~ s!^(.*)-[^-]+$!$1!r;
- my $tarball = "../${source}_${source_version}.orig.tar.xz";
- doit( 'tar', '-c', '-J', '--owner=0', '--group=0', '--mode=u=rwX,go=rX',
- '-f', $tarball, @tar_X, @ARGV );
+ my $tarball = "$cwd/../${source}_${source_version}.orig.tar.xz";
+ my $base = "$source-$source_version";
+ doit(
+ 'tar', '-c', '-J', '--owner',
+ '0', '--group', '0', '--mode',
+ 'u=rwX,go=rX', '--transform', "s,^,$base/,", '-f',
+ $tarball, @tar_X, @ARGV
+ );
exit;
}
else {
- my $VER;
+ my $ver;
if ( $version =~ /^(\d+(\.\d+)+(\.git\w+)?).*$/ ) {
- $VER = $1;
+ $ver = $1;
}
else {
error( "Could not determine illumos source version from changelog. "
. "It should be like 5.10.6.gitXYZ+1, but it is '$version'" );
}
- my $tarball = "/usr/src/illumos-gate/illumos-gate-$VER.tar.xz";
+ my $tarball = "/usr/src/illumos-gate/illumos-gate-$ver.tar.xz";
if ( !-f $tarball ) {
error(
-"$tarball does not exist. You might not have package illumos-source-$VER "
+"$tarball does not exist. You might not have package illumos-source-$ver "
. "installed or have a typo in debian/changelog" );
}
@@ -382,7 +388,6 @@ to make them available from makefiles.
=cut
-my $cwd = getcwd();
chdir $dh{DESTDIR};
my $codemgr_ws = getcwd();
chdir $cwd;