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
12 while ($i = shift @ARGV)
14 if ($i =~ /^(--diffs|-d)$/i)
20 if ($i =~ /^(--verbose|-v)$/i)
27 die "Error: Unknown option: $i\n";
31 $version=`grep 'VERSION *=' Makefile.in`;
32 $version =~ /VERSION *= *(.*)/;
37 open(ID, "rlog -h NEWS|");
39 last if /^symbolic names/;
48 if ($versions[0] eq $rcsid) {
49 $rcsid = $versions[0];
50 $oldid = $versions[1];
52 $rcsid = '<workfile>';
53 $oldid = $versions[0];
56 #$ENV{'PATH'} = "~esr/bin:/bin:/usr/bin";
58 print "Building $version release, RCS ID $rcsid, previous RCS ID $oldid\n";
60 if (system("./configure; make -C po update-po; make clean")) {
61 die("Failure in translation-file rebuild.")
64 print "### Test-building the software...\n";
65 if (system("configure --disable-nls; make")) {
66 die("Compilation failure\n");
69 print "### Building the distribution...\n";
70 if (system("make dist $null")) {
71 die("Distribution-build failure\n");
74 print "### Building the RPMs...\n";
75 if (system("make rpm $null && chown esr *.rpm")) {
76 die("RPM-build failure\n");
79 # Clean up permissions so next build won't foo up.
80 system("chown esr config.log stamp-h po/Makefile");
82 open(REPORT, ">PREAMBLE.$$");
85 From: esr\@thyrsus.com (Eric S. Raymond)
86 To: fetchmail-friends\@ccil.org, fetchmail-announce\@ccil.org
87 Reply-To: esr\@thyrsus.com (Eric S. Raymond)
88 Subject: The $version release of fetchmail is available
89 FCC: ~/postings/outmail
91 The $version release of fetchmail is now available at the usual locations,
92 including <URL:http://$ENV{'WWWVIRTUAL'}/~esr/fetchmail>.
94 The source archive is available at:
95 <URL:http://$ENV{'WWWVIRTUAL'}/~esr/fetchmail/fetchmail-${version}.tar.gz>
97 Here are the release notes:
101 # Extract the current notes
120 print REPORT "Diffs from the previous ($oldrcs) release follow as a MIME attachment."
122 print REPORT "By popular demand, diffs from the previous release have been omitted."
129 if ($rcsid eq '<workfile>') {
130 system("rcsdiff -u -r$oldid RCS/* 2>/dev/null >DIFFS.$$");
132 system("rcsdiff -u -r$oldid -r$rcsid RCS/* 2>/dev/null >DIFFS.$$");
135 system("wc <DIFFS.$$");
138 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";
140 rename("PREAMBLE.$$", "RELEASE.NOTES");
142 system("chown esr RELEASE.NOTES");
143 chmod(0700, "RELEASE.NOTES");
145 #unlink("PREAMBLE.$$");
148 print "Building index page...\n";
149 system("rm -f index.html; indexgen.sh");
151 print "Building test server list...\n";
152 system("rm -f testservers.html; testservers-gen.sh >testservers.html");
154 print "Making activity graph...";
157 print "Making LSM...";
158 $keywords="mail, client, POP, POP2, POP3, APOP, RPOP, KPOP, IMAP, ETRN, ODMR, SMTP, ESMTP, GSSAPI, RPA, NTLM, CRAM-MD5, SASL";
159 system("rpm2lsm -k '$keywords' fetchmail-$version-1.i386.rpm >fetchmail.lsm");
160 system("ls -l fetchmail.lsm");
162 # Avoid leaving unwriteable files around
163 system("chown -R esr .");
167 # makerelease ends here