# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify CentOS Linux and Scientific Linux as rhel %if "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "sl" || "%{__distinit}" == "sls" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: C-Ares library for compatibility with old applications Version: 1.4.0 Name: libcares%(echo %{version} | tr -d .) Release: 4.0.cf.%{__distinit}%{__distvers} License: MIT Group: System Environment/Libraries URL: http://c-ares.haxx.se/ Source0: http://c-ares.haxx.se/download/c-ares-%{version}.tar.gz Patch0: c-ares-1.4.0-utf8.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) %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. This package provides an old version of the libcares library, necessary for some old applications that have not been rebuilt against an up to date version of c-ares. %prep %setup -q -n c-ares-%{version} # Recode docs as UTF-8 %patch0 -p1 %build %configure --enable-shared --disable-static --disable-dependency-tracking make %{?_smp_mflags} %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install # No devel files in this compat package rm -f %{buildroot}%{_libdir}/libcares.la rm -f %{buildroot}%{_libdir}/libcares.so rm -f %{buildroot}%{_libdir}/pkgconfig/libcares.pc rm -rf %{buildroot}%{_includedir}/ares*.h rm -rf %{buildroot}%{_mandir}/man3/ares_*.3 %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc README README.cares CHANGES NEWS RELEASE-NOTES AUTHORS %{_libdir}/libcares.so.* %changelog * Sat Oct 15 2011 Paul Howarth - 1.4.0-4.0.cf - use a patch rather than scripted iconv to fix character encoding - nobody else likes macros for commands - fix dist tag for CentOS 6 and Scientific Linux * Tue May 25 2010 Paul Howarth - 1.4.0-3.0.cf - fix dist tag for RHEL-6 Beta * Thu Feb 25 2010 Paul Howarth - 1.4.0-2.0.cf - dist tag for Rawhide no longer needs special-casing * Wed Nov 4 2009 Paul Howarth - 1.4.0-1.0.cf - import from Fedora - drop unbundled LICENSE file - add docs RELEASE-NOTES and AUTHORS - convert to compat package for distros needing libcares.so.1 * Thu Aug 23 2007 Tom "spot" Callaway 1.4.0-2 - rebuild for ppc32 * Wed Jun 27 2007 Tom "spot" Callaway 1.4.0-1 - bump to 1.4.0 (resolves bugzilla 243591) - get rid of static library (.a) * Wed Jan 17 2007 Tom "spot" Callaway 1.3.2-1 - bump to 1.3.2 * Mon Sep 11 2006 Tom "spot" Callaway 1.3.1-2 - FC-6 bump * Mon Jul 10 2006 Tom "spot" Callaway 1.3.1-1 - bump to 1.3.1 * Tue Feb 28 2006 Tom "spot" Callaway 1.3.0-2 - bump for FC-5 rebuild * Sun Sep 4 2005 Tom "spot" Callaway 1.3.0-1 - include LICENSE text - bump to 1.3.0 * Tue May 31 2005 Tom "spot" Callaway 1.2.1-4 - use dist tag to prevent EVR overlap * Fri Apr 22 2005 Tom "spot" Callaway 1.2.1-2 - fix license (MIT, not LGPL) - get rid of libcares.la * Fri Apr 22 2005 Tom "spot" Callaway 1.2.1-1 - initial package creation