Summary: A library that performs asynchronous DNS operations Name: c-ares Version: 1.9.1 Release: 2 License: MIT Group: System Environment/Libraries URL: http://c-ares.haxx.se/ Source0: http://c-ares.haxx.se/%{name}-%{version}.tar.gz Source1: http://c-ares.haxx.se/%{name}-%{version}.tar.gz.asc Source2: %{name}-LICENSE Source3: ares_build.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description c-ares is a C library that performs DNS requests and name resolves asynchronously. c-ares is a fork of the library named 'ares', written by Greg Hudson at MIT. %package devel Summary: Development files for c-ares Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel This package contains the header files and static libraries needed to compile applications or shared objects that use c-ares. %prep %setup -q cp %{SOURCE2} LICENSE %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} cp ./.libs/libcares.so.2 . mv ares_build.h ares_build-ppc64.h make distclean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ./.libs/libcares.a ./libcares.so.2 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} mv ares_build-ppc64.h ${RPM_BUILD_ROOT}%{_includedir}/ mv ${RPM_BUILD_ROOT}%{_includedir}/ares_build.h ${RPM_BUILD_ROOT}%{_includedir}/ares_build-ppc32.h cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_includedir}/ chmod 644 ${RPM_BUILD_ROOT}%{_includedir}/* ( cd ${RPM_BUILD_ROOT} for dir in include lib 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 README README.cares CHANGES NEWS LICENSE %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/libcares.pc %{_mandir}/man3/ares_* /usr/lib/*.la %changelog * Tue Mar 26 2013 Michael Perzl - 1.9.1-2 - fix proper 64-bit compilation * Tue Jul 03 2012 Michael Perzl - 1.9.1-1 - updated to version 1.9.1 * Sat Apr 28 2012 Michael Perzl - 1.8.0-1 - updated to version 1.8.0 * Sun Aug 21 2011 Michael Perzl - 1.7.5-1 - updated to version 1.7.5 * Thu Dec 09 2010 Michael Perzl - 1.7.4-1 - updated to version 1.7.4 * Thu Oct 07 2010 Michael Perzl - 1.7.3-1 - updated to version 1.7.3 * Wed May 19 2010 Michael Perzl - 1.7.1-1 - first version for AIX V5.1 and higher