From 97bbd83e4dad3b666c97b1bd1005114f330d3c13 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 29 Dec 2003 04:33:35 +0000 Subject: [PATCH] Build rpms with buildrpms. --- Makefile | 10 ++-------- ascii.spec | 23 +++++++++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index f214b28..95eb963 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # ascii -- interactive ASCII reference -VERS=3.4 +VERS=$(shell sed +BuildRoot: %{_tmppath}/%{name}-root %description The ascii utility provides easy conversion between various byte representations @@ -17,18 +18,24 @@ Given any one on the command line, it will try to display all others. Called with no arguments it displays a handy small ASCII chart. %prep -%setup +%setup -q %build -make ascii ascii.1 +make +make ascii.1 %install -rm -f /usr/bin/ascii -cp ascii %{_bindir} -cp ascii.1 %{_mandir}/man1/ascii.1 +[ ! -z "$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 ascii "$RPM_BUILD_ROOT"/usr/bin +cp ascii.1 "$RPM_BUILD_ROOT"/usr/share/man/man1/ +%clean +[ ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT" %files -%{_mandir}/man1/ascii.1 +%defattr(-,root,root,-) +%{_mandir}/man1/ascii.1* %{_bindir}/ascii %doc README COPYING %undefine __check_files -- 2.43.0