%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A utility for converting amounts from one unit to another Name: units Version: 2.15 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: GPLv3+ Group: Applications/Engineering URL: http://www.gnu.org/software/units/units.html Source0: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: readline-devel >= 7.0-3 Requires: readline >= 7.0-3 Requires: python Requires: info, /sbin/install-info %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description Units converts an amount from one unit to another, or tells you what mathematical operation you need to perform to convert from one unit to another. The units program can handle multiplicative scale changes as well as conversions such as Fahrenheit to Celsius. %prep %setup -q %patch0 %build ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : gzip --best ${RPM_BUILD_ROOT}%{_infodir}/%{name}* rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %post if [ -e %{_infodir}/%{name}.info.gz ]; then /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %preun if [ $1 = 0 -a -e %{_infodir}/%{name}.info.gz ]; then /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc ChangeLog COPYING NEWS README %{_bindir}/* %{_mandir}/man1/* %{_infodir}/* %{_datadir}/%{name} /usr/bin/* %changelog * Tue Oct 24 2017 Michael Perzl - 2.15-1 - updated to version 2.15 * Thu Mar 09 2017 Michael Perzl - 2.14-1 - updated to version 2.14 * Wed Jun 22 2016 Michael Perzl - 2.13-1 - updated to version 2.13 * Thu Oct 15 2015 Michael Perzl - 2.12-1 - updated to version 2.12 * Fri Apr 04 2014 Michael Perzl - 2.11-1 - updated to version 2.11 * Fri Mar 28 2014 Michael Perzl - 2.10-1 - updated to version 2.10 * Fri Jul 12 2013 Michael Perzl - 2.02-1 - updated to version 2.02 * Thu Oct 25 2012 Michael Perzl - 2.01-1 - updated to version 2.01 * Thu Jun 28 2012 Michael Perzl - 2.00-1 - updated to version 2.00 * Thu Jun 28 2012 Michael Perzl - 1.88-1 - first version for AIX V5.1 and higher