On Wed, Jan 07, 2004 at 12:20:26AM +0100, Joerg Mayer wrote:
> Forget it, something went wrong - the cvs-version number doesn't seem
> to be used. I'll check tommorrow.
OK, take 2
Ciao
Jörg
--
Joerg Mayer <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/Makefile.am,v
retrieving revision 1.683
diff -p -u -r1.683 Makefile.am
--- Makefile.am 4 Jan 2004 02:59:46 -0000 1.683
+++ Makefile.am 6 Jan 2004 23:55:58 -0000
@@ -1373,7 +1373,7 @@ svr4-package: $(bin_SCRIPTS) $(lib_LTLIB
$(MAKE) DESTDIR=$(stagedir) install; \
$(srcdir)/packaging/svr4/mkpkg \
$(PACKAGE) \
- $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
+ $(PACKAGE)-$(PACKAGE_VERSION)-$(host_os)-$(host_cpu)-local \
$(prefix) \
$(top_stagedir) ; \
else \
@@ -1383,6 +1383,8 @@ svr4-package: $(bin_SCRIPTS) $(lib_LTLIB
solaris-package: svr4-package
+distdir = $(PACKAGE)-$(PACKAGE_VERSION)
+
rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
rpm-package: dist
if test x$(HAVE_RPM) = xyes ; then \
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ethereal/configure.in,v
retrieving revision 1.240
diff -p -u -r1.240 configure.in
--- configure.in 24 Dec 2003 14:06:36 -0000 1.240
+++ configure.in 6 Jan 2004 23:55:59 -0000
@@ -17,7 +17,18 @@ dnl Check for CPU / vendor / OS
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(ethereal, 0.10.0a)
+PACKAGE_VERSION="0.10.0a"
+
+if test -f CVS/Entries ; then
+ entriesfiles=`find . -name "Entries"`
+ VERSION=cvs`./cvsdate.pl $entriesfiles`
+else
+ VERSION=$PACKAGE_VERSION
+fi
+
+AM_INIT_AUTOMAKE(ethereal, $VERSION)
+
+PACKAGE_VERSION=$REL_VERSION
dnl Checks for programs.
AC_PROG_CC
@@ -806,7 +817,7 @@ dnl
dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.in
dnl
-plugindir="$libdir/ethereal/plugins/$VERSION"
+plugindir="$libdir/ethereal/plugins/$PACKAGE_VERSION"
AC_ARG_WITH(plugins,
changequote(<<, >>)dnl
<< --with-plugins[=DIR] support plugins (installed in DIR, if supplied).>>,
Index: cvsdate.pl
===================================================================
RCS file: cvsdate.pl
diff -N cvsdate.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cvsdate.pl 6 Jan 2004 23:55:59 -0000
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my ($d1,$d2,$d3,$date,$drest);
+my ($wdayascii, $monthascii, $day, $time, $year);
+
+my %asctonum = ( "Jan" => "01", "Feb" => "02", "Mar" => "03", "Apr" => "04",
+ "May" => "05", "Jun" => "06", "Jul" => "07", "Aug" => "08",
+ "Sep" => "09", "Oct" => "10", "Nov" => "11", "Dec" => "12" );
+
+my $current;
+my $last = "";
+
+while (<>) {
+ chomp;
+ # Line looks like this: /ethereal_be.py/1.6/Fri Aug 2 22:55:19 2002//
+ next if (/^D/);
+ ($d1,$d2,$d2,$date,$drest) = split(/\//, $_, 5);
+ next if ($date =~ /merge/);
+ ($wdayascii, $monthascii, $day, $time, $year) = split(/\s+/, $date);
+ $day = substr("0".$day, 0, 2);
+ $time =~ s/://g;
+ $current = "$year$asctonum{$monthascii}$day$time";
+ if ($current gt $last) {
+ $last = $current;
+ }
+}
+print "$last";