# Tests by default. No tests: rpm -ba --define 'dotests 0' rlwrap*.spec %{!?dotests: %define dotests 1} Name: rlwrap Version: 0.43 Release: 1 Summary: Wrapper for GNU readline Group: Applications/Text License: GPLv2+ URL: https://github.com/hanslub42/rlwrap/releases/download/v0.43 Source0: https://github.com/hanslub42/rlwrap/releases/download/v0.43/%{name}-%{version}.tar.gz Patch0: %{name}-%{version}-%{release}.aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: readline-devel Requires: readline >= 7.0 %description rlwrap is a 'readline wrapper' that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is remembered across invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line. %prep %setup -q %patch0 -p0 rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit %build export CC=/opt/freeware/bin/gcc #Build on 64bit mode export OBJECT_MODE=64 cd 64bit export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export CFLAGS=" -maix64 -O2" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}64 \ --mandir=%{_mandir} gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #Build on 32bit mode cd ../32bit export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export CFLAGS=" -maix32 -O2 -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} #Install on 64bit mode export OBJECT_MODE=64 cd 64bit make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) #Install on 32bit mode export OBJECT_MODE=32 cd ../32bit make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) 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 32bit/AUTHORS 32bit/COPYING 32bit/NEWS 32bit/README %{_bindir}/* %{_mandir}/man?/%{name}.* %{_datadir}/%{name} /usr/bin/* %changelog * Fri Aug 9 2019 Beulah Praiselin J - 0.43-1 - Version 0.43 * Tue Dec 12 2017 Reshma V Kumar - 0.42-1 - Version 0.42 * Thu Dec 11 2014 Michael Perzl - 0.42-1 - updated to version 0.42 * Fri Aug 15 2014 Michael Perzl - 0.41-1 - updated to version 0.41 * Fri Aug 15 2014 Michael Perzl - 0.40-1 - updated to version 0.40 * Wed May 05 2010 Michael Perzl - 0.37-1 - updated to version 0.37 * Tue Apr 06 2010 Michael Perzl - 0.36-1 - first version for AIX V5.1 and higher