Name: nawk Version: 20121220 Release: 1 Summary: "The one true awk" descended from UNIX V7 Group: Applications/Text License: MIT URL: http://www.cs.princeton.edu/~bwk/btl.mirror/index.html # the author does not provide a way to download specifc versions Source0: http://www.cs.princeton.edu/~bwk/btl.mirror/awk-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # remove obsolete macros and change name from awk to nawk Patch0: nawk-manpage.patch BuildRequires: patch %description This is the version of awk described in "The AWK Programming Language", by Al Aho, Brian Kernighan, and Peter Weinberger. (Addison-Wesley, 1988, ISBN 0-201-07981-X). %prep %setup -q -c %{name} export PATH=/opt/freeware/bin:$PATH %patch0 -p1 -b .manpage %build make %{?_smp_mflags} CFLAGS="-O" CC="cc" %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} # the nawk binary is saved as a.out so we need to make our directory # and give the binary a good name mkdir -p ${RPM_BUILD_ROOT}%{_bindir} cp a.out ${RPM_BUILD_ROOT}%{_bindir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1/ cp awk.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/%{name}.1 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/%{name}.1 cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc FIXES README %{_bindir}/%{name} %{_mandir}/man1/%{name}.1 /usr/bin/%{name} %changelog * Tue Jan 08 2013 Michael Perzl - 20121220-1 - updated to version 20121220 * Sun Aug 21 2011 Michael Perzl - 20110810-1 - updated to version 20110810 * Mon Nov 08 2010 Michael Perzl - 20100523-1 - first version for AIX V5.1 and higher