git://git.jankratochvil.net
/
macros.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0bd3806
)
&_rpmbuild: Support also .tar.bz2 orig source packages.
author
short
<>
Sat, 30 Aug 2003 10:28:04 +0000
(10:28 +0000)
committer
short
<>
Sat, 30 Aug 2003 10:28:04 +0000
(10:28 +0000)
AutoGen.pm
patch
|
blob
|
history
diff --git
a/AutoGen.pm
b/AutoGen.pm
index
de75b41
..
8519a75
100644
(file)
--- a/
AutoGen.pm
+++ b/
AutoGen.pm
@@
-214,20
+214,20
@@
my($class,%args)=@_;
$class->_prepdist($name);
_system "make $name.spec";
my $spec=_readfile "$name.spec";
$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;
_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;
}
@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];
_copy $origs[0],_rpmeval("_sourcedir")."/".($origs[0]=~/^orig-(.*)$/)[0];
- _system "tar x
z
f ".$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/";
_mkdir $base."-orig";
# FIXME: Copy also dot-prefixed files!
_move \1,$base."/*",$base."-orig/";