Name: liboping Version: 1.10.0 Release: 1 Summary: C library to generate ICMP echo requests Group: Applications/Internet License: GPLv2 URL: http://verplant.org/liboping/ Source0: http://verplant.org/liboping/files/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: coreutils %define _libdir64 %{_prefix}/lib64 %description Liboping is a C library to generate ICMP echo requests, better known as "ping packets". It is intended for use in network monitoring applications or applications that would otherwise need to fork ping(1) frequently. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains files needed to develop and build software against liboping, a %{summary}. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc_r -q64" or "gcc -maix64". %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit /opt/freeware/bin/cp -pr 32bit/* 64bit/ %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export PATH=/opt/freeware/bin:$PATH cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" PERL=%{_bindir}/perl_64bit ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static cd src gmake %{?_smp_mflags} cd .. cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" PERL=%{_bindir}/perl ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static cd src gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit/src export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../../32bit/src export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/%{name}.so* ( 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,-) %doc 32bit/AUTHORS 32bit/ChangeLog 32bit/COPYING 32bit/README %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_mandir}/man8/* /usr/bin/* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/*.la %{_libdir64}/pkgconfig/*.pc %{_mandir}/man3/* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Fri Dec 15 2017 Michael Perzl - 1.10.0-1 - updated to version 1.10.0 * Mon Jan 02 2017 Michael Perzl - 1.9.0-1 - updated to version 1.9.0 * Thu Dec 11 2014 Michael Perzl - 1.8.0-1 - updated to version 1.8.0 * Thu Dec 11 2014 Michael Perzl - 1.7.0-1 - updated to version 1.7.0 * Thu Apr 19 2012 Michael Perzl - 1.6.2-1 - updated to version 1.6.2 * Mon Nov 21 2011 Michael Perzl - 1.6.1-1 - updated to version 1.6.1 * Wed Jan 26 2011 Michael Perzl - 1.6.0-1 - updated to version 1.6.0 * Wed Jan 26 2011 Michael Perzl - 1.5.1-1 - updated to version 1.5.1, added RTL-style shared libraries * Mon Jun 14 2010 Michael Perzl - 1.4.0-1 - first version for AIX V5.1 and higher