inc_bldnum revision 5386
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Increment the tarball build number in Moz/Evo/APOC spec files.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Created by Damien Carbery, 25 April 2005.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Display usage information.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikusIncrement the build source tarball number and add %changelog entry.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus-buildnum Specify build number to insert into spec files. (Required)
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus-email Specify email address to be listed in %changelog.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# ####################################
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Main program.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# ####################################
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Display usage if no arguments.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# ############################
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Begin command line parsing.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# ############################
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus#Getopt::Long::Configure( 'pass_through' ); # Ignore unknown options.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# List of spec files to update.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikusmy @specfiles = qw / apoc.spec evolution.spec gnome-spell.spec gtkhtml.spec hydrogen.spec libgal.spec libsoup.spec mozilla.spec oxygen2.spec /;
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus # Ensure all the specified files are present, quitting if any aren't.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Change t_suffix and Release data and add %changelog entry for each file.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus print OUT $1,$BuildNum,$3;
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus print OUT '* ', strftime("%a %b %e %Y",localtime), " - $Email\n- Bump source tarball to build $BuildNum.\n";
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus print "WARNING: Unable to open $file ($!). Skipping.\n";
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus# Update ChangeLog too, putting info at the top of the file.
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikus print OUT "\t* ", join( ' ', @specfiles[0..4] ), "\n\t", join( ' ', @specfiles[5..$#specfiles] ), ":\n\t* Bump source tarballs to build $BuildNum.\n\n";
b6659196f7a2ac319119e1859150bb214ce1f7d7jpikusprint "\nUse 'cvs diff' to verify changes.\nTo commit changes:\n cvs commit -m \"Bump source tarballs for Mozilla/Evolution/APOC\"\n";