# Tests by default. No tests: rpm -ba --define 'dotests 0' rlwrap*.spec %{!?dotests: %define dotests 1} Name: rlwrap Version: 0.46.1 Release: 1 Summary: Wrapper for GNU readline Group: Applications/Text License: GPLv2+ URL: https://github.com/hanslub42/rlwrap Source0: https://github.com/hanslub42/rlwrap/releases/tag/0.46.1/%{name}-%{version}.tar.gz BuildRequires: readline-devel >= 8.2 BuildRequires: sed Requires: readline >= 8.2 Requires: python3.9 >= 3.9.16 %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 rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit cd 32bit sed -i 's|/usr/bin/python3.9|/opt/freeware/libexec/python3.9_32|' filters/* cd ../64bit sed -i 's|/usr/bin/python3.9|/opt/freeware/bin/python3.9|' filters/* %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 32bit mode export OBJECT_MODE=32 cd 32bit make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 done ) #Install on 64bit mode export OBJECT_MODE=64 cd ../64bit make install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 ln -sf "$fic"_64 $fic done ) /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/AUTHORS 32bit/COPYING 32bit/NEWS 32bit/README.md %{_bindir}/* %{_mandir}/man?/%{name}.* %{_datadir}/%{name} %changelog * Mon 21 Aug 2023 Aditya Kamath - 0.46.1-1 - Upgrade to new version 0.46.1 * Mon Sep 14 2020 Ayappan P - 0.43-2 - Make rlwrap to use /opt/freeware/python3 - Remove symbolic links from /usr * 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