From eb42b18c3e92b3ddfde465dc1b03285adcf6887b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 29 Dec 2003 11:11:53 +0000 Subject: [PATCH] Better RPM packaging. --- Makefile | 5 ++--- vms-empire.spec | 33 ++++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 74bff0e..93538bd 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,7 @@ # See the file COPYING, distributed with empire, for restriction # and warranty information. -# Note: When the version changes, you also have to change the RPM spec file. -VERS=1.5 +VERS=$(shell sed MANIFEST diff --git a/vms-empire.spec b/vms-empire.spec index 9e5c4c7..a735e9f 100644 --- a/vms-empire.spec +++ b/vms-empire.spec @@ -1,12 +1,12 @@ Name: vms-empire -Version: 1.5 +Version: 1.6 Release: 1 -URL: http://www.tuxedo.org/~esr/vms-empire/ +URL: http://www.catb.org/~esr/vms-empire/ Source: %{name}-%{version}.tar.gz License: GPL-like Group: Games Summary: Solitaire Empire (sometimes called `VMS Empire') -%undefine __check_files +BuildRoot: %{_tmppath}/%{name}-root %description Empire is a simulation of a full-scale war between two @@ -17,21 +17,32 @@ do. This game is the ancestor of all the multiplayer Empire simulations out there. %prep -%setup +%setup -q %build make +make vms-empire.6 %install -cp vms-empire /usr/bin -cp vms-empire.6 /usr/share/man/man6/vms-empire.6 +[ "$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/man6/ +cp vms-empire "$RPM_BUILD_ROOT"/usr/bin +cp vms-empire.6 "$RPM_BUILD_ROOT"/usr/share/man/man6/ + +%clean +[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" + +%files +%doc README COPYING +%defattr(-,root,root,-) +%{_mandir}/man6/vms-empire.6* +%{_bindir}/vms-empire %changelog +* Mon Dec 29 2003 Eric S. Raymond 1.6-1 +- Source RPMs can be built by non-root user. + * Tue Dec 16 2003 Eric S. Raymond 1.5-1 - Cleanup release with new build machinery. -%files -/usr/share/man/man6/vms-empire.6 -/usr/bin/vms-empire -%doc READ.ME NEWS - -- 2.43.0