1#!/usr/bin/perl 2# A simple script for making releases of the pciutils 3# (c) 2003--2006 Martin Mares <[email protected]> 4 5use strict; 6use warnings; 7require "maint/release.pm"; 8 9my $r = new UCW::Release("pciutils"); 10my $ver = $r->GetVersionFromFile("Makefile", "VERSION=(.*)"); 11$r->GetVersionsFromChangelog("ChangeLog", "Released as (.*)\."); 12push @{$r->{"rules"}}, '^win32/config.h' => 's'; 13if ($ver =~ /-/) { 14 $r->{"ALPHADIR"} = "alpha/"; 15 $r->{"conditions"}->{"ALPHA_VERSION"} = 1; 16} else { 17 $r->{"ALPHADIR"} = ""; 18 $r->{"conditions"}->{"ALPHA_VERSION"} = -1; 19} 20push @{$r->{"uploads"}}, { 21 "url" => "scp://atrey.karlin.mff.cuni.cz/~ftp/pub/linux/pci/" . $r->{"ALPHADIR"} 22 },{ 23 "url" => "scp://master.kernel.org/pub/software/utils/pciutils/" . $r->{"ALPHADIR"} 24 }; 25push @{$r->{"uploads"}}, { 26 "url" => "ftp://metalab.unc.edu/incoming/linux/", 27 "filter" => '(\.tar\.gz|\.lsm)$' 28 } if $r->{"ALPHADIR"} eq ""; 29$r->ParseOptions; 30$r->InitDist("maint/dist"); 31my $reldir = $r->GenPackage; 32$r->GenFile("README"); 33$r->GenFile("pciutils.lsm"); 34$r->Dispatch; 35if ($r->{"do_upload"}) { 36 print "Uploading pci.ids to Jabberwock\n"; 37 `scp -C pci.ids pciids\@jabberwock.ucw.cz:05-pciutils.new`; die if $?; 38 `ssh pciids\@jabberwock.ucw.cz mv 05-pciutils.new origs/05-pciutils`; die if $?; 39} 40