]> thyrsus.com Git - cupl.git/commitdiff
More improvements to RPM machinery.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 08:35:02 +0000 (08:35 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 29 Dec 2003 08:35:02 +0000 (08:35 +0000)
Makefile
cupl.spec

index 5233c39e002b38b340646dc1a4707dbd915ad20c..629f72e917756c1dbe871125fb6a5a587f81e0e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 #
 # Makefile for the CUPL/CORC project
 #
-VERS=1.5
+VERS=$(shell sed <cupl.spec -n -e '/Version: \(.*\)/s//\1/p')
 
 CDEBUG = -g    # use -O for production, -g for debugging
 YFLAGS = -vt   # use -l for production, -vt for debugging
@@ -59,12 +59,6 @@ cupl-$(VERS).tar.gz: $(SOURCES) $(DOCS) cupl.1
 
 dist: cupl-$(VERS).tar.gz
 
-RPMROOT=/usr/src/redhat
-rpm: dist
-       rpmbuild --define 'myversion $(VERS)' -ta cupl-$(VERS).tar.gz
-       cp $(RPMROOT)/RPMS/*/cupl-$(VERS)*.rpm .
-       cp $(RPMROOT)/SRPMS/cupl-$(VERS)*.src.rpm .
-
 clean:
        rm -f cupl *~ *.o toktab.h tokens.h grammar.c lexer.c lextest y.output cupl.tar cupl.tar.gz *.rpm cupl-*.tar.gz
 
index e261f4a40e97b99e34c646b4f64d20e7246ad949..89d83a5b3ca70459603045eaa0596a3ca53d1e9d 100644 (file)
--- a/cupl.spec
+++ b/cupl.spec
@@ -1,41 +1,50 @@
 Name: cupl
-Version: %{myversion}
+Summary: Interpreter for the archaic CUPL and CORC programming languages.
+Version: 1.6
 Release: 1
-URL: http://www.tuxedo.org/~esr/cupl/
+URL: http://www.catb.org/~esr/cupl/
 Source0: %{name}-%{version}.tar.gz
 License: GPL
 Group: Languages
-Summary: Interpreter for the archaic CUPL and CORC programming languages.
-%undefine __check_files
+BuildRoot: %{_tmppath}/%{name}-root
 
 %description
 Interpreter for the archaic CUPL and CORC programming languages.
 Includes full documentation and a chrestomathy of programs.
 
 %prep
-%setup
+%setup -q
 
 %build
 make
+make cupl.1
 
 %install
-rm -f /usr/bin/cupl /usr/share/man/man1/cupl.1
-cp cupl /usr/bin
-cp cupl.1 /usr/share/man/man1/cupl.1
+[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
+mkdir -p "$RPM_BUILD_ROOT"/usr/bin
+mkdir -p "$RPM_BUILD_ROOT"/usr/share/man/man1/
+cp cupl "$RPM_BUILD_ROOT"/usr/bin
+cp cupl.1 "$RPM_BUILD_ROOT"/usr/share/man/man1/
+
+%clean
+[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
 
 %files
 %doc READ.ME COPYING corc.doc cupl.doc test
-/usr/bin/cupl
-/usr/share/man/man1/cupl.1
+%{_bindir}/cupl
+%{_mandir}/man1/cupl.1*
 
 %changelog
-* Fri Dec 26 2003 Eric S. Raymond <esr@thyrsus.com> 1.5 
+* Mon Dec 29 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.6-1
+- Source RPMSs no longer depend on --define myversion.
+
+* Fri Dec 26 2003 Eric S. Raymond <esr@thyrsus.com> 1.5-1
 - Updated RPM packaging machinery.
 
-* Tue Jul 30 2000 Eric S. Raymond <esr@thyrsus.com> 1.4
+* Tue Jul 30 2000 Eric S. Raymond <esr@thyrsus.com> 1.4-1
 - Move documentation to XML.
 
-* Thu Jul 27 2000 Eric S. Raymond <esr@thyrsus.com> 1.3
+* Thu Jul 27 2000 Eric S. Raymond <esr@thyrsus.com> 1.3-1
 - Cleanup release.  Use modern packaging and RPMs.
 
 RPM chokes on the older dates below.