SHA256
1
0
forked from pool/c-ares
c-ares/c-ares.spec
Adam Majer 1efadc9528 - c-ares 1.28.1
Features:
  * Emit warnings when deprecated c-ares functions are used.
    This can be disabled by passing a compiler definition of
    `CARES_NO_DEPRECATED`. [PR #732]
  * Add function `ares_search_dnsrec()` to search for records
    using the new DNS record data structures. [PR #719]
  * Rework internals to pass around `ares_dns_record_t` instead of
    binary data, this introduces new public functions of
    `ares_query_dnsrec()` and `ares_send_dnsrec()`. [PR #730]
Changes:
  * tests: when performing simulated queries, reduce timeouts
    to make tests run faster
  * Replace configuration file parsers with memory-safe parser. [PR #725]
  * Remove `acountry` completely, the manpage might still get
    installed otherwise. [Issue #718]
Bugfixes:
  * CMake: don't overwrite global required libraries/definitions/includes
    which could cause build errors for projects chain building c-ares.
    [Issue #729]
  * On some platforms, `netinet6/in6.h` is not included by `netinet/in.h`
    and needs to be included separately. [PR #728]
  * Fix a potential memory leak in `ares_init()`. [Issue #724]
  * Some platforms don't have the `isascii()` function.
    Implement as a macro. [PR #721]
  * CMake: Fix Chain building if CMAKE runtime paths not set
  * NDots configuration should allow a value of zero. [PR #735]

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=65
2024-04-02 08:49:16 +00:00

142 lines
3.8 KiB
RPMSpec

#
# spec file for package c-ares
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%define sonum 2
%define libname libcares%{sonum}
%define pkg_suffix %nil
%if "@BUILD_FLAVOR@"%nil == "testsuite"%nil
%define pkg_suffix -testsuite
%endif
Name: c-ares%pkg_suffix
Version: 1.28.1
Release: 0
Summary: Library for asynchronous name resolves
License: MIT
URL: https://c-ares.org/
Source0: https://c-ares.org/download/c-ares-%{version}.tar.gz
Source1: https://c-ares.org/download/c-ares-%{version}.tar.gz.asc
Source3: c-ares.keyring
Source4: baselibs.conf
BuildRequires: c++_compiler
BuildRequires: cmake
# Needed for getservbyport_r function to work properly.
BuildRequires: netcfg
BuildRequires: pkgconfig
%if ("@BUILD_FLAVOR@" == "testsuite")
BuildRequires: gmock
BuildRequires: gtest
%endif
%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.
%if ("@BUILD_FLAVOR@" != "testsuite")
%package utils
Summary: Tools for asynchronous name resolves
%description utils
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 some tools that make use of c-ares.
%package -n %{libname}
Summary: Library for asynchronous name resolves
# Needed for getservbyport_r function to work properly.
Requires: netcfg
%description -n %{libname}
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 the shared libraries for c-ares.
%package devel
Summary: Development files for c-ares
Requires: %{libname} = %{version}
Requires: glibc-devel
Provides: libcares-devel = %{version}
Obsoletes: libcares-devel < %{version}
%description 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.
This package provides the development libraries and headers needed
to build packages that depend on c-ares.
%endif
%prep
%autosetup -n c-ares-%{version}
%build
%cmake \
%if ("@BUILD_FLAVOR@" == "testsuite")
-DCARES_BUILD_TESTS:BOOL=ON \
%endif
%{nil}
%cmake_build
%install
%if ("@BUILD_FLAVOR@" != "testsuite")
%cmake_install
%endif
%if ("@BUILD_FLAVOR@" != "testsuite")
%ldconfig_scriptlets -n %{libname}
%endif
%check
%if ("@BUILD_FLAVOR@" == "testsuite")
pushd build
%cmake_build -C test
LD_LIBRARY_PATH=.%{_libdir}:./%{_lib} ./bin/arestest --gtest_filter=-*.Live*
%endif
%if ("@BUILD_FLAVOR@" != "testsuite")
%files utils
%license LICENSE.md
%{_bindir}/adig
%{_bindir}/ahost
%{_mandir}/man1/adig.1%{?ext_man}
%{_mandir}/man1/ahost.1%{?ext_man}
%files -n %{libname}
%license LICENSE.md
%{_libdir}/libcares.so.%{sonum}*
%files devel
%license LICENSE.md
%{_libdir}/libcares.so
%{_includedir}/*.h
%{_mandir}/man3/ares_*.3%{?ext_man}
%{_libdir}/pkgconfig/libcares.pc
%{_libdir}/cmake/c-ares/
%endif
%changelog