From 9958dff64ba80ccdbfb1c0cd253d3f505a5b3c36 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 1 Aug 2002 10:04:06 +0000 Subject: [PATCH] Repackaged. --- Makefile | 50 ++++++++++++++++++++++++++++++++++++-------------- README | 6 ++---- showkey.c | 3 ++- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 4d7cc88..7dfa9bc 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,43 @@ -# -# Makefile for the showkey utility -# -CFLAGS = -g +# showkey -- keystroke echoer -all: showkey +# Note: When the version changes, you also have to change the RPM spec file. +VERS=1.2 + +CFLAGS = -O showkey: showkey.c + $(CC) -DREVISION=$(VERS) showkey.c -o showkey + +showkey.1: showkey.xml + xmlto man showkey.xml -SOURCES = READ.ME showkey.1 Makefile showkey.c showkey.lsm +clean: + rm -f showkey showkey.o splashscreen.h showkey.1 *.rpm *.tar.gz -showkey.tar: $(SOURCES) - tar -cvf showkey.tar $(SOURCES) -showkey.tar.gz: showkey.tar - gzip showkey.tar +install: showkey.1 + cp showkey /usr/bin/showkey + cp showkey.1 /usr/share/man/man1 -showkey.shar: $(SOURCES) - shar $(SOURCES) >showkey.shar +uninstall: + rm /usr/bin/showkey + rm /usr/share/man/man1/showkey.1 -clean: - rm -f showkey showkey.tar showkey.tar.gz showkey.shar +SOURCES = READ.ME Makefile showkey.c showkey.xml showkey.lsm showkey.spec + +showkey-$(VERS).tar.gz: $(SOURCES) showkey.1 + @ls $(SOURCES) showkey.1 | sed s:^:showkey-$(VERS)/: >MANIFEST + @(cd ..; ln -s showkey showkey-$(VERS)) + (cd ..; tar -czvf showkey/showkey-$(VERS).tar.gz `cat showkey/MANIFEST`) + @(cd ..; rm showkey-$(VERS)) + +dist: showkey-$(VERS).tar.gz + +RPMROOT=/usr/src/redhat +RPM = rpm +RPMFLAGS = -ba +rpm: dist + cp showkey-$(VERS).tar.gz $(RPMROOT)/SOURCES; + cp showkey.spec $(RPMROOT)/SPECS + cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) showkey.spec + cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/showkey-$(VERS)*.rpm . + cp $(RPMROOT)/SRPMS/showkey-$(VERS)*.src.rpm . diff --git a/README b/README index 0beee4e..d80b665 100644 --- a/README +++ b/README @@ -8,7 +8,5 @@ This is one of these silly little utilities that you never think you'll need until some unexpected situation pops up and you have to have it. Then you get to be mugged by the details of tty-interface code, yippee. Never again! -Runs under System V or Linux. Could be POSIXified almost trivially. - -You may find updates and related resources via WWW -at http://www.tuxedo.org/~esr/home.html. +You may find updates and related resources via WWW at +. diff --git a/showkey.c b/showkey.c index dfb4c97..d228476 100644 --- a/showkey.c +++ b/showkey.c @@ -4,7 +4,8 @@ * Invoke this (no arguments needed) to see keycap-to-keystrokes mappings. * * by Eric S. Raymond , 1 Nov 88 - * fix for little-endian machines 21 Oct 1996. + * - fix for little-endian machines 21 Oct 1996. + * - cleanup and modern packaging (version 1.3), 1 Aug 2002. */ #include #include -- 2.43.0