3 # Make a fetchmail release. Must be run as root, to make RPMs.
4 # Dumps a release notice and diffs as a MIME multipart message
7 $version=`grep VERS= Makefile.in`;
8 $version =~ /VERS=(.*)/;
13 open(ID, "rlog -h NEWS|");
15 last if /^symbolic names/;
24 if ($versions[0] eq $rcsid) {
25 $rcsid = $versions[0];
26 $oldid = $versions[1];
28 $rcsid = '<workfile>';
29 $oldid = $versions[0];
32 #$ENV{'PATH'} = "~esr/bin:/bin:/usr/bin";
34 print "Building $version release, RCS ID $rcsid, previous RCS ID $oldid\n";
36 print "Test-building the software...\n";
37 if (system("su -c 'make >/dev/null' esr")) {
38 die("Compilation failure\n");
41 print "Building the distribution...\n";
42 if (system("su -c 'make dist >/dev/null' esr")) {
43 die("Distribution-build failure\n");
46 print "Building the RPMs...\n";
47 if (system("make rpm >/dev/null 2>/dev/null && chown esr *.rpm")) {
48 die("RPM-build failure\n");
51 open(REPORT, ">PREAMBLE.$$");
54 From: esr\@thyrsus.com (Eric S. Raymond)
55 To: fetchmail-announce\@ccil.org
57 The $version release of fetchmail is now available at the usual locations,
58 including http://$ENV{'WWWHOST'}/~esr/fetchmail. Here are the release notes:
62 # Extract the current notes
81 By popular demand, diffs from the previous release have been omitted.
83 #Diffs from the previous ($oldrcs) release follow as a MIME attachment.
89 if ($rcsid eq '<workfile>') {
90 system("rcsdiff -u -r$oldid RCS/* 2>/dev/null >DIFFS.$$");
92 system("rcsdiff -u -r$oldid -r$rcsid RCS/* 2>/dev/null >DIFFS.$$");
95 rename("PREAMBLE.$$", "RELEASE.NOTES");
96 system("chown esr RELEASE.NOTES");
97 chmod(0700, "RELEASE.NOTES");
98 # If we ever want to go back to enclosing diffs.
99 #system "metasend -b -D 'fetchmail-$rcsid announcement' -m 'text/plain' -e 7bit -f PREAMBLE.$$ -n -D 'diff -u between -$oldrcs $rcsid' -m 'text/plain' -e 7bit -f DIFFS.$$ -o RELEASE_NOTES";
101 unlink("PREAMBLE.$$");
104 print "Building index page...\n";
105 system("rm -f index.html; indexgen.sh");
109 # makerelease ends here