version 1.16, 2002/04/07 19:35:27
|
version 1.20, 2002/07/03 21:17:56
|
Line 88 my ($tag,$version,$configuration_files,$
|
Line 88 my ($tag,$version,$configuration_files,$
|
$pathprefix,$customize)=@ARGV; |
$pathprefix,$customize)=@ARGV; |
@ARGV=(); # read standard input based on a pipe, not a command-line argument |
@ARGV=(); # read standard input based on a pipe, not a command-line argument |
|
|
|
# standardize pathprefix argument |
|
$pathprefix=~s/\/$//; # OTHERWISE THE BEGINNING SLASH MIGHT BE REMOVED |
|
|
if (!$version) {# version should be defined and string length greater than zero |
if (!$version) {# version should be defined and string length greater than zero |
print(<<END); |
print(<<END); |
See "perldoc make_rpm.pl" for more information. |
See "perldoc make_rpm.pl" for more information. |
Line 262 $tv=grabtag('pre',$cu,0); $pre=$tv if $t
|
Line 265 $tv=grabtag('pre',$cu,0); $pre=$tv if $t
|
$pre=~s/\<tag \/\>/$tag/g; |
$pre=~s/\<tag \/\>/$tag/g; |
|
|
# ------------------------------------- Print header information for .spec file |
# ------------------------------------- Print header information for .spec file |
|
print('Print header information for .spec file'."\n"); |
|
|
print(SPEC <<END); |
print(SPEC <<END); |
Summary: $summary |
Summary: $summary |
Line 300 $pre
|
Line 304 $pre
|
END |
END |
|
|
# ------------------------------------ Process file list and gather information |
# ------------------------------------ Process file list and gather information |
|
print('Process standard input file list and gather information.'."\n"); |
|
|
my %BinaryRootMakefile; |
my %BinaryRootMakefile; |
my %Makefile; |
my %Makefile; |
Line 356 foreach my $file (<>) {
|
Line 361 foreach my $file (<>) {
|
} |
} |
|
|
# -------------------------------------- Generate SRPM and BinaryRoot Makefiles |
# -------------------------------------- Generate SRPM and BinaryRoot Makefiles |
|
print('Generate SRPM and BinaryRoot Makefiles.'."\n"); |
|
|
# Generate a much needed directory. |
# Generate a much needed directory. |
# This directory is meant to hold all source code information |
# This directory is meant to hold all source code information |
Line 380 close(OUTS);
|
Line 386 close(OUTS);
|
close(SPEC); |
close(SPEC); |
|
|
# ------------------ mirror copy (BinaryRoot) files under a temporary directory |
# ------------------ mirror copy (BinaryRoot) files under a temporary directory |
|
print('Mirror copy (BinaryRoot) files.'."\n"); |
|
|
`make -f $tag/BinaryRootMakefile directories`; |
`make -f $tag/BinaryRootMakefile directories`; |
`make -f $tag/BinaryRootMakefile files`; |
`make -f $tag/BinaryRootMakefile files`; |
Line 440 sub grabtag {
|
Line 447 sub grabtag {
|
|
|
# ----------------------------------------------------- Plain Old Documentation |
# ----------------------------------------------------- Plain Old Documentation |
|
|
|
=pod |
|
|
=head1 NAME |
=head1 NAME |
|
|
make_rpm.pl - cleanly generate an rpm in a simple one-line command |
make_rpm.pl - cleanly generate an rpm in a simple one-line command |
Line 835 Linux
|
Line 844 Linux
|
|
|
=head1 SCRIPT CATEGORIES |
=head1 SCRIPT CATEGORIES |
|
|
UNIX/System Administration |
UNIX/System_administration |
|
|
=cut |
=cut |
|
|