Changeset 174
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r173 r174 6 6 7 7 PKGNAME=debbuild 8 VERSION=0.9. 78 VERSION=0.9.8 9 9 10 10 MANDIR=/usr/share/man -
trunk/debbuild
r172 r174 268 268 $specfile = "$topdir/BUILD/". qx { zcat $tarball |tar -t |grep -e '[\.]spec\$' }; 269 269 chomp $specfile; 270 my ($fileonly, $dirname) = ($tarball =~ /(([a-zA-Z0-9._-]+)\.tar\.(?:gz|bz2 ))$/);270 my ($fileonly, $dirname) = ($tarball =~ /(([a-zA-Z0-9._-]+)\.tar\.(?:gz|bz2|xz))$/); 271 271 272 272 $tarball = abs_path($tarball); 273 my $unpackcmd = "cd $topdir/BUILD; tar -". 274 ( $tarball =~ /\.tar\.gz$/ ? "z" : "" ). 275 ( $tarball =~ /\.tar\.bz2$/ ? "j" : "" ). "xf $tarball"; 273 ##fixme: use macro expansions for the executables 274 my $unpackcmd = "cd $topdir/BUILD; ". 275 ( $tarball =~ /\.tar\.gz$/ ? "/bin/gzip" : "" ). 276 ( $tarball =~ /\.tar\.bz2$/ ? "/bin/bzip2" : "" ). 277 ( $tarball =~ /\.tar\.(?:gz|Z)$/ ? "/usr/bin/xz" : "" ). 278 " -dc $tarball |/bin/tar -xf -"; 279 276 280 system "$unpackcmd"; 277 281 system "cp $tarball $topdir/SOURCES/$fileonly"; … … 765 769 $prepscript .= "mkdir $tarballdir\ncd $tarballdir\n"; 766 770 } 767 $prepscript .= "tar -". 768 ( $pkgdata{main}{source} =~ /\.tar\.gz$/ ? "z" : "" ). 769 ( $pkgdata{main}{source} =~ /\.tar\.bz2$/ ? "j" : "" ). 770 ( /\s+-q\s+/ ? '' : 'vv' )."xf ". 771 "$topdir/SOURCES/$pkgdata{main}{source}\n". 771 $prepscript .= 772 ( $pkgdata{main}{source} =~ /\.tar\.gz$/ ? "/bin/gzip" : "" ). 773 ( $pkgdata{main}{source} =~ /\.tar\.bz2$/ ? "/bin/bzip2" : "" ). 774 ( $pkgdata{main}{source} =~ /\.tar\.xz$/ ? "/usr/bin/xz" : "" ). 775 " -dc $topdir/SOURCES/$pkgdata{main}{source} | /bin/tar -". 776 ( /\s+-q\s+/ ? '' : 'vv' )."xf -\n". 772 777 qq(STATUS=\$?\nif [ \$STATUS -ne 0 ]; then\n exit \$STATUS\nfi\n). 773 778 "cd $topdir/BUILD/$tarballdir\n". … … 784 789 # would ever have such things, but there they are... and rpmbuild supports 'em 785 790 # patch originally suggested by Lucian Cristian for .bz2 786 # reworked and expanded to support .Z/.gz as well787 if ( $pkgdata{main}{"patch$patchnum"} =~ /\.(?:Z|gz|bz2 )$/ ) {791 # reworked and expanded to support .Z/.gz/.xz as well 792 if ( $pkgdata{main}{"patch$patchnum"} =~ /\.(?:Z|gz|bz2|xz)$/ ) { 788 793 my $decompressor; 789 $decompressor = 'gzip' if $pkgdata{main}{"patch$patchnum"} =~ /\.(?:Z|gz)$/;794 $decompressor = 'gzip' if $pkgdata{main}{"patch$patchnum"} =~ /\.(?:Z|gz)$/; 790 795 $decompressor = 'bzip2' if $pkgdata{main}{"patch$patchnum"} =~ /\.bz2$/; 796 $decompressor = 'xz' if $pkgdata{main}{"patch$patchnum"} =~ /\.xz$/; 791 797 $prepscript .= qq(/bin/$decompressor -d < $topdir/SOURCES/$pkgdata{main}{"patch$patchnum"} | patch ); 792 798 $prepscript .= $patchopts if $patchopts; … … 955 961 # Do this here since we don't use any URL forms elsewhere (maybe some other time) 956 962 $pkgdata{main}{source} =~ s|^.+/([^/]+)$|$1|; 957 # .tar, .tar.gz, .tar.bz2, .tgz 958 die "Unknown tarball format $1\n" if $1 !~ /\.(?:tar(?:\.(?:gz|bz2 ))?|tgz)$/;963 # .tar, .tar.gz, .tar.bz2, .tgz, .xz 964 die "Unknown tarball format $1\n" if $1 !~ /\.(?:tar(?:\.(?:gz|bz2|xz))?|tgz)$/; 959 965 } elsif (my ($srcnum, $src) = (/^source([0-9]+):\s*(.+)/i)) { 960 966 $pkgdata{sources}{$srcnum} = $src; … … 1836 1842 debbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [build-options] file.spec 1837 1843 1838 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.tar.{gz|bz2 }1844 debbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [build-options] file.tar.{gz|bz2|xz} 1839 1845 1840 1846 debbuild --rebuild file.{src.rpm|sdeb}
Note:
See TracChangeset
for help on using the changeset viewer.