]> thyrsus.com Git - showkey.git/commitdiff
RPM packaging improvements.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 22:26:10 +0000 (22:26 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 22:26:10 +0000 (22:26 +0000)
Makefile
showkey.c

index 6eaf17b0c0e351797699311b7b903fe7967181f7..d2c522e45c9cf112e2d63e64224325b4bcac5242 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,6 @@
 # showkey -- keystroke echoer
 
-# Note: When the version changes, you also have to change the RPM spec file.
-VERS=1.3
-
-CFLAGS = -O
+VERS=$(shell sed <showkey.spec -n -e '/Version: \(.*\)/s//\1/p')
 
 showkey: showkey.c
        $(CC) -DREVISION=$(VERS) showkey.c -o showkey
@@ -22,7 +19,7 @@ uninstall:
        rm /usr/bin/showkey
        rm /usr/share/man/man1/showkey.1
 
-SOURCES = READ.ME Makefile showkey.c showkey.xml showkey.spec
+SOURCES = README Makefile showkey.c showkey.xml showkey.spec
 
 showkey-$(VERS).tar.gz: $(SOURCES) showkey.1
        @ls $(SOURCES) showkey.1 | sed s:^:showkey-$(VERS)/: >MANIFEST
@@ -32,12 +29,3 @@ showkey-$(VERS).tar.gz: $(SOURCES) showkey.1
 
 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 .
index 3aa937a6d4264de68c565bae4b7feb6c6f930985..a169bb2bb08d8d23af226433eec3108391136d88 100644 (file)
--- a/showkey.c
+++ b/showkey.c
@@ -28,6 +28,7 @@ THE SOFTWARE.<P>
  * - fix for little-endian machines (version 1.1), 21 Oct 1996.
  * - cleanup and modern packaging (version 1.2), 1 Aug 2002.
  * - changed to use termios (version 1.3), 26 Aug 2002.
+ * See the RPM spec file changelog for more recent stuff.
  */
 #include <stdio.h>
 #include <termios.h>
@@ -58,7 +59,7 @@ main()
     unsigned char      c;
     unsigned int       i, timeouts;
 
-    for (i = SIGHUP; i <= SIGPOLL; i++)
+    for (i = SIGHUP; i <= SIGIO; i++)
        (void) signal(c, catcher);
 
     // Get the state of the tty