diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-10-08 14:17:44 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-10-08 14:17:44 +0400 |
commit | 4248599370b40e42e6408c4a96611f880c7761bf (patch) | |
tree | ddc6ad7a7c56688b5ac79089d800b4d7c6d0bedc | |
parent | 059995ab7aee5eb3186c329316c064d0dc98623e (diff) | |
download | dh-illumos-4248599370b40e42e6408c4a96611f880c7761bf.tar.gz |
Use versioned tarballs (e. g. illumos-source-2.10)
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | dh_illumos_gate | 37 |
2 files changed, 28 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog index 3bb7f02..ba0f92d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ dh-illumos (9) UNRELEASED; urgency=low * Completely disable modifying comment section of ELFs, cause dh_strip used to delete it. Also this avoid additional build dependency on "mcs" utility. + * Use versioned tarballs (e. g. illumos-source-2.10) -- Igor Pashev <pashev.igor@gmail.com> Mon, 01 Oct 2012 04:57:33 +0400 @@ -21,7 +22,7 @@ dh-illumos (7) unstable; urgency=low * Perl syntax error * Set LDLIBS32 and LDLIBS64 in env.sh to use libraries from debian/tmp - * Disable stripping. GNU strip can damage binaries, and we will carefully + * Disable stripping. GNU strip can damage binaries, and we will careully strip when create package. * Use ":" instead on "true" * Adjust libdirs in makefile rather then in env.sh: diff --git a/dh_illumos_gate b/dh_illumos_gate index 3397e73..458c3a3 100755 --- a/dh_illumos_gate +++ b/dh_illumos_gate @@ -29,7 +29,7 @@ After executing C<dh_illumos_gate> one can use commands like this to configure o components of illumos gate: cd illumos-gate - ksh93 bldenv.sh env.sh -c "cd usr/src/lib/libzfs && /usr/bin/sunmake install" + ksh93 bldenv.sh env.sh -c "cd usr/src/lib/libzfs && make --sun install" L<dh_illumos_make(1)> provides more convenient way to do this. @@ -37,10 +37,15 @@ L<dh_illumos_make(1)> provides more convenient way to do this. =over 4 -=item /usr/src/illumos-gate/illumos-gate.tar.xz +=item /usr/src/illumos-gate/illumos-gate-$(VER).tar.xz -This file contains recent complete and unmodified illumos sources. -It is provided by package I<illumos-source>. +This file contains complete and unmodified illumos sources. +It is provided by package I<illumos-source-$(VER)>. + +Version C<$(VER)> is determined from F<debian/changelog>: + + (\d+\.\d+).* => \1, e. g.: + 2.10+3 => VER = 2.10 =back @@ -69,8 +74,23 @@ Here are things which this helper does after unpacking illumos sources. init(options => { }); -my $tarball = '/usr/src/illumos-gate/illumos-gate.tar.xz'; -my $changelogfile = 'debian/changelog'; +my %options = (file => 'debian/changelog'); +my $changelog = changelog_parse(%options); +my $version = $changelog->{'Version'}; + +my $VER; +if ($version =~ /^(\d+\.\d+).*$/) { + $VER = $1; +} else { + error("Could not determine illumos source version from changelog. " + ."It should be like 2.10+1, but it is '$version'"); +} +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 " + ."installed or have a typo in debian/changelog"); +} my @tar_X = (); if (defined($dh{'EXCLUDE'}) && $dh{'EXCLUDE'}) { @@ -203,11 +223,6 @@ Define C<LEX> to be C</usr/bin/flex -l>. =cut - -my %options = (file => $changelogfile); -my $changelog = changelog_parse(%options); -my $version = $changelog->{'Source'} . '_' . $changelog->{'Version'}; - my $cwd = getcwd(); my $env = 'illumos-gate/env.sh'; my $mach = `uname -p`; chomp $mach; |