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
11 @wdays = ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
12 @months = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Nov", "Dec");
14 my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
15 "$wdays[$wday] $months[$mon] " . substr("0$mday", -2) . " " . substr("0$hour", -2) . ":" . substr("0$min", -2) . ":" . substr("0$sec", -2) . " $timezone " . (1900+$year);
19 $version=`grep 'VERSION *=' Makefile.in`;
20 $version =~ /VERSION *= *(.*)/;
25 open(ID, "rlog -h NEWS|");
27 last if /^symbolic names/;
36 if ($versions[0] eq $rcsid) {
37 $rcsid = $versions[0];
38 $oldid = $versions[1];
40 $rcsid = '<workfile>';
41 $oldid = $versions[0];
44 #$ENV{'PATH'} = "~esr/bin:/bin:/usr/bin";
46 print "Building $version release, RCS ID $rcsid, previous RCS ID $oldid\n";
48 print "Test-building the software...\n";
49 if (system("su -c 'make >/dev/null' esr")) {
50 die("Compilation failure\n");
53 # Update the Debian logfile
54 open(DEBLOG, "debian/changelog");
55 $firstline = <DEBLOG>;
57 $firstline =~ /fetchmail \(*([^-]*)/;
59 if ($version eq $logvers) {
60 print "No change to Debian logfile...\n";
62 $date = &rfc822date();
63 print "Updating the Debian logfile ($logvers -> $version)...\n";
64 open(DEBLOG, ">>debian/changelog");
66 fetchmail (${version}-1) unstable; urgency=low
68 * new upstream version
70 -- Eric S. Raymond <esr\@thyrsus.com> ${date}
76 print "Building the distribution...\n";
77 if (system("su -c 'make dist >/dev/null' esr")) {
78 die("Distribution-build failure\n");
81 print "Building the RPMs...\n";
82 if (system("make rpm >/dev/null 2>/dev/null && chown esr *.rpm")) {
83 die("RPM-build failure\n");
86 open(REPORT, ">PREAMBLE.$$");
89 From: esr\@thyrsus.com (Eric S. Raymond)
90 To: fetchmail-announce\@ccil.org
91 Reply-To: esr\@thyrsus.com (Eric S. Raymond)
92 Subject: The $version release of fetchmail is available
93 FCC: ~/postings/outmail
95 The $version release of fetchmail is now available at the usual locations,
96 including <URL:http://$ENV{'WWWVIRTUAL'}/~esr/fetchmail> and
97 <URL:ftp://ftp.ccil.org/pub/esr/fetchmail>.
99 Here are the release notes:
103 # Extract the current notes
122 By popular demand, diffs from the previous release have been omitted.
124 #Diffs from the previous ($oldrcs) release follow as a MIME attachment.
130 if ($rcsid eq '<workfile>') {
131 system("rcsdiff -u -r$oldid RCS/* 2>/dev/null >DIFFS.$$");
133 system("rcsdiff -u -r$oldid -r$rcsid RCS/* 2>/dev/null >DIFFS.$$");
136 rename("PREAMBLE.$$", "RELEASE.NOTES");
137 system("chown esr RELEASE.NOTES");
138 chmod(0700, "RELEASE.NOTES");
139 # If we ever want to go back to enclosing diffs.
140 #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";
142 unlink("PREAMBLE.$$");
145 print "Building index page...\n";
146 system("rm -f index.html; indexgen.sh");
150 # makerelease ends here