From f7db87cfbc2b31e7b00098b018e28b73761c6f75 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 26 Dec 2003 22:32:22 +0000 Subject: [PATCH] Name change. --- Makefile | 45 ++++++++++++++++++++------------------------- hexdump.spec | 4 +++- hexdump.xml | 21 ++++++++++----------- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/Makefile b/Makefile index c83c182..0d0c658 100644 --- a/Makefile +++ b/Makefile @@ -1,40 +1,35 @@ # Makefile for Eric Raymond's silly hex dumper -# Note: When the version changes, you also have to change the RPM spec file -VERS=1.4 +VERS=1.5 -hex: hex.c - $(CC) -DRELEASE=\"$(VERS)\" -O hex.c -o hex +hexdump: hexdump.c + $(CC) -DRELEASE=\"$(VERS)\" -O hexdump.c -o hexdump -SOURCES = READ.ME Makefile hex.c hex.xml hex.spec +SOURCES = READ.ME COPYING Makefile hexdump.c hexdump.xml hexdump.spec -hex-$(VERS).tar.gz: $(SOURCES) hex.1 - @ls $(SOURCES) hex.1 | sed s:^:hex-$(VERS)/: >MANIFEST - @(cd ..; ln -s hex hex-$(VERS)) - (cd ..; tar -czvf hex/hex-$(VERS).tar.gz `cat hex/MANIFEST`) - @(cd ..; rm hex-$(VERS)) +hexdump-$(VERS).tar.gz: $(SOURCES) hexdump.1 + @ls $(SOURCES) hexdump.1 | sed s:^:hexdump-$(VERS)/: >MANIFEST + @(cd ..; ln -s hexdump hexdump-$(VERS)) + (cd ..; tar -czvf hexdump/hexdump-$(VERS).tar.gz `cat hexdump/MANIFEST`) + @(cd ..; rm hexdump-$(VERS)) -hex.1: hex.xml - xmlto man hex.xml +hexdump.1: hexdump.xml + xmlto man hexdump.xml -install: hex.1 uninstall - cp hex /usr/bin - cp hex.1 /usr/share/man/man1/hex.1 +install: hexdump.1 uninstall + cp hexdump /usr/bin + cp hexdump.1 /usr/share/man/man1/hexdump.1 uninstall: - rm -f /usr/bin/hex /usr/share/man/man1/hex. + rm -f /usr/bin/hexdump /usr/share/man/man1/hexdump. clean: - rm -f hex hex-$(VERS).tar.gz *.rpm + rm -f hexdump hexdump-$(VERS).tar.gz *.rpm -dist: hex-$(VERS).tar.gz +dist: hexdump-$(VERS).tar.gz RPMROOT=/usr/src/redhat -RPM = rpmbuild -RPMFLAGS = -ba rpm: dist - cp hex-$(VERS).tar.gz $(RPMROOT)/SOURCES; - cp hex.spec $(RPMROOT)/SPECS - cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) hex.spec - cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/hex-$(VERS)*.rpm . - cp $(RPMROOT)/SRPMS/hex-$(VERS)*.src.rpm . + rpmbuild --define 'myversion $(VERS)' -ta hexdump-$(VERS).tar.gz + cp $(RPMROOT)/RPMS/*/hexdump-$(VERS)*.rpm . + cp $(RPMROOT)/SRPMS/hexdump-$(VERS)*.src.rpm . diff --git a/hexdump.spec b/hexdump.spec index 1d08e82..b96cbda 100644 --- a/hexdump.spec +++ b/hexdump.spec @@ -1,11 +1,12 @@ Name: hex -Version: 1.4 +Version: %{nyversion} Release: 1 Summary: yet another hex dumper URL: http://www.catb.org/~esr/hex/ Source0: %{name}-%{version}.tar.gz License: BSD-like Group: Development/Tools +%undefine __check_files %%description Yes, it's yet another hex dumper. This one produces a nice CP/M-like @@ -22,5 +23,6 @@ make make install %files +%doc README COPYING /usr/share/man/man1/hex.1 /usr/bin/hex diff --git a/hexdump.xml b/hexdump.xml index 21e4b3d..11dac43 100644 --- a/hexdump.xml +++ b/hexdump.xml @@ -2,21 +2,20 @@ - + -hex +hexdump 1 Oct 27, 1987 -hex -dump a file to stdout in CP/M-like hex format +hexdump +dump a file to stdout in CP/M-like hexadecimal format - - hex -V + hexdump -V -w -e -c @@ -31,7 +30,7 @@ This program provides a facility for obtaining a dump of a binary file to stdout. The default format is a CP/M style -hex dump with byte offset in file, 16 bytes of +haxadecimal dump with byte offset in file, 16 bytes of hex and 16 bytes of alpha representation with '.' for non-printables per line. If no filename is given, hex reads from standard input. @@ -78,16 +77,16 @@ option letter or whitespace-separated. If the command-line arguments include two or more filenames (with - being regarded as a `filename' for standard input), -hex will emit a one-line header giving the name of +hexdump will emit a one-line header giving the name of the file in front of each input file. The option expects a start offset, optionally followed by a comma-separated count. Each of these should -be a decimal or hex integer (hex must be prefixed +be a decimal or hexadecimal integer (hexadecimal must be prefixed by x or h; leading zeros will be ignored). The option expects a width, formatted as a -single decimal or hex number in the style of an +single decimal or haxadecimal number in the style of an option argument. Odd widths turn on the option. @@ -96,7 +95,7 @@ used is IBM's ASCII-compatible 96-character SCS set used with Systems Network Architecture (SNA). AUTHOR Eric S. Raymond -<esr@thyrsus.com>. See my home page at esr@thyrsus.com. See my home page at http://www.catb.org/~esr for updates and related resources. -- 2.43.0