tcpdump mailing list archives

installing tcpdump with a version number


From: Michael Richardson <mcr () sandelman ottawa on ca>
Date: Thu, 15 Jun 2006 17:46:58 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I have various scripts and regression test cases that depend upon
specific versions of tcpdump. So, I often install it with a version
number as well.

I install it twice. Alternatively, a symlink could be changed.
This no doubt would mess up packaging tools, etc. so I wonder if this
should be made optional --- if so, how?

I also changed the version string to add the date if it was from CVS. I
hope this might help people track things better. 

I propose the following:

Index: Makefile.in
===================================================================
RCS file: /tcpdump/master/tcpdump/Makefile.in,v
retrieving revision 1.300
diff -u -r1.300 Makefile.in
- --- Makefile.in       3 Mar 2006 22:31:57 -0000       1.300
+++ Makefile.in 15 Jun 2006 21:42:32 -0000
@@ -154,12 +143,14 @@
 
 version.c: $(srcdir)/VERSION
        @rm -f $@
- -     sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+       if grep CVS ${srcdir}/VERSION >/dev/null; then read ver <${srcdir}/VERSION; echo -n $$ver; date +_%Y_%m_%d; 
else cat ${srcdir}/VERSION; fi | sed -e 's/.*/char version[] = "&";/' - > $@
+
 
 install:
        [ -d $(DESTDIR)$(sbindir) ] || \
            (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
        $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+       $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
        [ -d $(DESTDIR)$(mandir)/man1 ] || \
            (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
        $(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Finger me for keys

iQEVAwUBRJHVToCLcPvd0N1lAQL+sgf7B/GHzoypFR2on/UWJYj6vdV5kenZ0uon
Di6gZao7cgW4g7b1B6VTszNdZGFtE/UAUcL0iSuUJw1/WmEq7b29WFX6j1wKw+Yr
a0eqcKSresn2RgyMTOi/oy62MvUhIzmMzIsKhm1epulCE65gIKkQyGbMa1vhufxO
sE+Z6IGMiru2QGNuEim2gY0AgQOW6dl+ktQOEorvWS2Xjd4eleIcAZB4ujbUjCXh
8VoyS90bISGkDrM9lakaiAZDj1hdKUPHke+W9/ijYnyfYxjL2x4CEiZOtqgrQQse
fYlfVzZX7z1quPwjga++piF0OYaZ0ThYlEJ38W+O7ECWuuSJ6oFHVw==
=Xzqu
-----END PGP SIGNATURE-----
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: