# Tests by default. No tests: rpm -ba --define 'dotests 0' iperf*.spec %{!?dotests: %define dotests 1} Name: iperf2 Version: 2.1.9 Release: 1 Summary: Measurement tool for TCP/UDP bandwidth performance License: BSD Group: Applications/Internet URL: http://github.com/esnet/iperf Source0: https://github.com/esnet/iperf/tags/iperf2-%{version}.tar.gz Patch0: %{name}-%{version}-thread_init.patch BuildRequires: AIX-rpm >= 5.2.0.0 Requires: AIX-rpm >= 5.2.0.0 Requires: libgcc >= 10.3.0-1 %description Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, data-gram loss. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n iperf-%{version} %patch0 %build export CC="/opt/freeware/bin/gcc -gdwarf" export CFLAGS="-O2" export CXX="g++ -maix64 -gdwarf" # build on 64bit mode export OBJECT_MODE=64 export CFLAGS="$CFLAGS -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}64 \ --mandir=%{_mandir} make %{?_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 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) #/usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %{_bindir}/* %{_mandir}/man1/* %changelog *Wed Jul 26 2023 Shubham Gupta -2.1.9-1 - Update to 2.1.9