X-Git-Url: http://git.jankratochvil.net/?p=macros.git;a=blobdiff_plain;f=AutoGen.pm;h=0947a21437a7be5d805699c406e154c0d8aee9a1;hp=de75b419d98419d26ac0b307370bbff076711b1a;hb=064fdbb8baee75503ef5b3d37cc20ec93c7ccb0d;hpb=0bd38062103d7233de8f542842a26f2b9635a3e3;ds=sidebyside diff --git a/AutoGen.pm b/AutoGen.pm index de75b41..0947a21 100644 --- a/AutoGen.pm +++ b/AutoGen.pm @@ -43,6 +43,9 @@ HERE } die "You are missing some modules - install them by:\n" ."\tperl -MCPAN -e 'install qw(".join(" ",@missing).")'\n" + ."If you see messages: Writing Makefile for -- NOT OK\n" + ."you may did not have installed make(1) while configuring Perl CPAN.\n" + ."Install make(1) and type 'o conf init' in: perl -MCPAN -e shell\n" if @missing; } @@ -214,20 +217,20 @@ my($class,%args)=@_; $class->_prepdist($name); _system "make $name.spec"; my $spec=_readfile "$name.spec"; - my $patch=($spec=~/^Patch\d*:\s*(.*)$/m)[0]; + my $patch=($spec=~/^Patch\d*\s*:\s*(.*)$/m)[0]; _system "make dist"; if (!$patch) { _copy "$name-*.tar.gz",_rpmeval("_sourcedir"); } else { my @origs; - for my $glob ("orig-$name-*.tar.{gz,Z}") { + for my $glob ("orig-$name-*.tar.{gz,Z,bz2}") { @origs=glob $glob; confess "Invalid glob $glob: ".join(",",@origs) if 1!=@origs; } - my $base=($origs[0]=~/^orig-(.*)[.]tar[.](?:gz|Z)$/)[0]; + my($base,$ext)=($origs[0]=~/^orig-(.*)[.]tar[.](gz|Z|bz2)$/); _copy $origs[0],_rpmeval("_sourcedir")."/".($origs[0]=~/^orig-(.*)$/)[0]; - _system "tar xzf ".$origs[0]; + _system "tar x".($ext eq "bz2" ? "j" : "z")."f ".$origs[0]; _mkdir $base."-orig"; # FIXME: Copy also dot-prefixed files! _move \1,$base."/*",$base."-orig/";