Changeset 102 for trunk


Ignore:
Timestamp:
06/01/07 16:33:42 (17 years ago)
Author:
kdeugau
Message:

/trunk

Add global "debdist" and "debver" definitions, derived from the
version of the base-files package. /etc/debian_version should have
similar info, but may not be as specific/accurate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r101 r102  
    115115  cd %{_topdir}/BUILD
    116116);
     117
     118# Hackery to try to bring some semblance of sanity to packages built for more
     119# than one Debian version at the same time.  Whee.
     120# /etc/debian-version
     121my %distmap = (
     122        "3.1.9ubuntu7.1"        => "dapper",
     123        "4ubuntu2"      => "feisty",
     124        "3.0"   => "woody",
     125        "3.1"   => "sarge",
     126        "4"     => "etch",
     127        "4.0"   => "lenny",
     128        "4.0.0" => "sid");
     129# Enh.  There doesn't seem to be any better way to do this...  :(
     130{
     131  my $basever = qx { dpkg-query --showformat '\${version}' -W base-files };
     132  if ($basever =~ /^\d\.\d\.(\d)$/) {
     133    $basever =~ s/\.\d$// if $1 ne '0';
     134  }
     135# want to do something with this...   erm, what was I going to do?  O_o
     136  my $releasever = qx { cat /etc/debian_version };
     137  chomp $releasever;
     138
     139  $specglobals{"debdist"} = $distmap{$basever};
     140  $specglobals{"debver"} = $basever;    # this may have trouble with Ubuntu versions?
     141}
    117142
    118143# Package data
Note: See TracChangeset for help on using the changeset viewer.