X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=maint%2Frelease;h=9c2521b6f45106dc2c7b363332f740242d1648be;hb=52097446c2dcac123f4ff040a15a07acdbe2b11f;hp=67dd3692ab5d0d45cf7146ee7f8dda581e7323af;hpb=ab12277ebc10a443b4aeba834c2e05481d1bb78a;p=pciutils.git diff --git a/maint/release b/maint/release index 67dd369..9c2521b 100755 --- a/maint/release +++ b/maint/release @@ -1,14 +1,26 @@ #!/usr/bin/perl # A simple script for making releases of the pciutils -# (c) 2003 Martin Mares +# (c) 2003--2012 Martin Mares use strict; use warnings; -require "maint/release.pm"; +require "./maint/release.pm"; + +# Check API version +my $apiver = "???"; +open X, "lib/pci.h" or die; +while () { + /^#define PCI_LIB_VERSION 0x(.{6})$/ and $apiver = $1; +} +print "API version is $apiver ... "; ; + +#print "Updating public GIT tree\n"; +#`git push --tags public`; die if $?; my $r = new UCW::Release("pciutils"); my $ver = $r->GetVersionFromFile("Makefile", "VERSION=(.*)"); $r->GetVersionsFromChangelog("ChangeLog", "Released as (.*)\."); +push @{$r->{"rules"}}, '^win32/config.h' => 's'; if ($ver =~ /-/) { $r->{"ALPHADIR"} = "alpha/"; $r->{"conditions"}->{"ALPHA_VERSION"} = 1; @@ -17,14 +29,10 @@ if ($ver =~ /-/) { $r->{"conditions"}->{"ALPHA_VERSION"} = -1; } push @{$r->{"uploads"}}, { - "url" => "scp://atrey.karlin.mff.cuni.cz/~ftp/pub/linux/pci/" . $r->{"ALPHADIR"} - },{ - "url" => "scp://master.kernel.org/~ftp/pub/software/utils/pciutils/" . $r->{"ALPHADIR"} + "url" => "scp://jabberwock.ucw.cz/home/ftp/pub/mj/linux/pci/" . $r->{"ALPHADIR"} +## },{ +## "url" => "scp://master.kernel.org/pub/software/utils/pciutils/" . $r->{"ALPHADIR"} }; -push @{$r->{"uploads"}}, { - "url" => "ftp://metalab.unc.edu/incoming/linux/", - "filter" => '(\.tar\.gz|\.lsm)$' - } if !defined $r->{"ALPHADIR"}; $r->ParseOptions; $r->InitDist("maint/dist"); my $reldir = $r->GenPackage; @@ -33,6 +41,18 @@ $r->GenFile("pciutils.lsm"); $r->Dispatch; if ($r->{"do_upload"}) { print "Uploading pci.ids to Jabberwock\n"; - `scp pci.ids pciids@jabberwock.ucw.cz:05-pciutils.new`; die if $?; - `ssh pciids@jabberwock.ucw.cz mv 05-pciutils.new origs/05-pciutils`; die if $?; + `scp -C pci.ids pciids\@jabberwock.ucw.cz:05-pciutils.new`; die if $?; + `ssh pciids\@jabberwock.ucw.cz mv 05-pciutils.new origs/05-pciutils`; die if $?; +} + +# Hacks for kernel.org +print "Preparing kernel.org package\n"; +my $dd = $r->{"DISTDIR"}; +my $pkg = $r->{"PKG"}; +`gzip -d <$dd/$pkg.tar.gz >$dd/$pkg.tar`; die if $?; +system "gpg", "--armor", "--detach-sig", "-o", "$dd/$pkg.tar.sig", "$dd/$pkg.tar"; die if $?; +if ($r->{"do_upload"}) { + print "Uploading to kernel.org\n"; + print " "; ; + system '/home/mj/tree/kup/kup', 'put', "$dd/$pkg.tar", "$dd/$pkg.tar.sig", "/pub/software/utils/pciutils/$pkg.tar.gz"; die if $?; }