File libcares2.spec of Package libcares2

#
# spec file for package libcares2 (Version 1.7.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Url:            http://daniel.haxx.se/projects/c-ares
%define pkg_name c-ares

Name:           libcares2
Version:        1.7.4
Release:        1
License:        MIT License (or similar)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          Development/Libraries/C and C++
Summary:        Library for asynchronous name resolves
Source:         http://daniel.haxx.se/projects/c-ares/%{pkg_name}-%{version}.tar.bz2
Source2:        baselibs.conf
BuildRequires:  pkg-config

%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 -n libcares-devel
License:        MIT License (or similar)
Group:          Development/Libraries/C and C++
Summary:        Library for asynchronous name resolves
Requires:       %{name} = %{version} glibc-devel

%description -n libcares-devel
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.

%prep
%setup -q -n %{pkg_name}-%{version}

%build
%configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic
%{__make} %{?jobs:-j%jobs}
#there is no test suite atm
#check
#export MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256))
#{__make} %{?jobs:-j%jobs} check
#unset MALLOC_CHECK_ MALLOC_PERTURB_

%install
%{__make} install DESTDIR=%{buildroot}
%{__rm} -f %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%{_libdir}/libcares.so.2*

%files -n libcares-devel
%defattr(-,root,root)
%{_libdir}/libcares.so
%{_includedir}/*.h
%{_mandir}/man3/ares_*
%{_libdir}/pkgconfig/libcares.pc

%changelog
openSUSE Build Service is sponsored by