2018-02-20 10:24:29 +01:00
|
|
|
#
|
2024-02-26 14:29:07 +01:00
|
|
|
# spec file for package c-ares
|
2018-02-20 10:24:29 +01:00
|
|
|
#
|
2024-01-02 13:11:58 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2024-02-08 12:26:19 +01:00
|
|
|
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
2018-02-20 10:24:29 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-02-13 17:25:34 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-02-20 10:24:29 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
%define sonum 2
|
|
|
|
%define libname libcares%{sonum}
|
2024-02-09 12:24:57 +01:00
|
|
|
%define pkg_suffix %nil
|
|
|
|
|
|
|
|
%if "@BUILD_FLAVOR@"%nil == "testsuite"%nil
|
|
|
|
%define pkg_suffix -testsuite
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: c-ares%pkg_suffix
|
2024-06-10 14:06:32 +02:00
|
|
|
Version: 1.30.0
|
2018-02-20 10:24:29 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Library for asynchronous name resolves
|
|
|
|
License: MIT
|
2021-09-09 14:29:23 +02:00
|
|
|
URL: https://c-ares.org/
|
2024-06-10 14:06:32 +02:00
|
|
|
Source0: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz
|
|
|
|
Source1: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz.asc
|
2020-11-17 21:20:20 +01:00
|
|
|
Source3: c-ares.keyring
|
2018-02-20 10:24:29 +01:00
|
|
|
Source4: baselibs.conf
|
2024-02-08 12:26:19 +01:00
|
|
|
BuildRequires: c++_compiler
|
2020-01-07 19:03:05 +01:00
|
|
|
BuildRequires: cmake
|
2020-02-04 12:49:24 +01:00
|
|
|
# Needed for getservbyport_r function to work properly.
|
|
|
|
BuildRequires: netcfg
|
2024-02-08 12:26:19 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
%if ("@BUILD_FLAVOR@" == "testsuite")
|
2024-01-02 13:11:58 +01:00
|
|
|
BuildRequires: gmock
|
|
|
|
BuildRequires: gtest
|
2024-02-08 12:26:19 +01:00
|
|
|
%endif
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2024-02-08 12:26:19 +01:00
|
|
|
%if ("@BUILD_FLAVOR@" != "testsuite")
|
2020-01-07 19:03:05 +01:00
|
|
|
%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}
|
2018-02-20 10:35:11 +01:00
|
|
|
Summary: Library for asynchronous name resolves
|
2020-02-04 12:49:24 +01:00
|
|
|
# Needed for getservbyport_r function to work properly.
|
|
|
|
Requires: netcfg
|
2018-02-20 10:35:11 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
This package provides the shared libraries for c-ares.
|
|
|
|
|
2018-02-20 10:35:11 +01:00
|
|
|
%package devel
|
2023-10-10 11:43:18 +02:00
|
|
|
Summary: Development files for c-ares
|
2018-02-20 10:35:11 +01:00
|
|
|
Requires: %{libname} = %{version}
|
2018-02-20 10:24:29 +01:00
|
|
|
Requires: glibc-devel
|
2018-02-20 10:35:11 +01:00
|
|
|
Provides: libcares-devel = %{version}
|
|
|
|
Obsoletes: libcares-devel < %{version}
|
2018-02-20 10:24:29 +01:00
|
|
|
|
2018-02-20 10:35:11 +01:00
|
|
|
%description devel
|
2018-02-20 10:24:29 +01:00
|
|
|
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.
|
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
This package provides the development libraries and headers needed
|
|
|
|
to build packages that depend on c-ares.
|
|
|
|
|
2024-02-08 12:26:19 +01:00
|
|
|
%endif
|
|
|
|
|
2018-02-20 10:24:29 +01:00
|
|
|
%prep
|
2024-04-02 10:49:16 +02:00
|
|
|
%autosetup -n c-ares-%{version}
|
2020-11-17 14:41:55 +01:00
|
|
|
|
2018-02-20 10:24:29 +01:00
|
|
|
%build
|
2021-12-08 20:02:58 +01:00
|
|
|
%cmake \
|
2024-02-08 12:26:19 +01:00
|
|
|
%if ("@BUILD_FLAVOR@" == "testsuite")
|
|
|
|
-DCARES_BUILD_TESTS:BOOL=ON \
|
2021-12-08 20:02:58 +01:00
|
|
|
%endif
|
2024-02-08 12:26:19 +01:00
|
|
|
%{nil}
|
2020-11-17 21:20:20 +01:00
|
|
|
%cmake_build
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
%install
|
2024-02-08 12:26:19 +01:00
|
|
|
%if ("@BUILD_FLAVOR@" != "testsuite")
|
2020-01-07 19:03:05 +01:00
|
|
|
%cmake_install
|
2024-02-08 12:26:19 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if ("@BUILD_FLAVOR@" != "testsuite")
|
|
|
|
%ldconfig_scriptlets -n %{libname}
|
|
|
|
%endif
|
2018-02-20 10:24:29 +01:00
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
%check
|
2024-02-08 12:26:19 +01:00
|
|
|
%if ("@BUILD_FLAVOR@" == "testsuite")
|
2020-01-07 19:03:05 +01:00
|
|
|
pushd build
|
2020-11-17 21:20:20 +01:00
|
|
|
%cmake_build -C test
|
2024-01-02 13:11:58 +01:00
|
|
|
LD_LIBRARY_PATH=.%{_libdir}:./%{_lib} ./bin/arestest --gtest_filter=-*.Live*
|
2021-12-08 20:02:58 +01:00
|
|
|
%endif
|
2020-11-17 13:35:56 +01:00
|
|
|
|
2024-02-08 12:26:19 +01:00
|
|
|
%if ("@BUILD_FLAVOR@" != "testsuite")
|
2020-01-07 19:03:05 +01:00
|
|
|
%files utils
|
|
|
|
%license LICENSE.md
|
|
|
|
%{_bindir}/adig
|
|
|
|
%{_bindir}/ahost
|
2020-07-09 08:43:45 +02:00
|
|
|
%{_mandir}/man1/adig.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/ahost.1%{?ext_man}
|
2020-01-07 19:03:05 +01:00
|
|
|
|
2018-02-20 10:35:11 +01:00
|
|
|
%files -n %{libname}
|
|
|
|
%license LICENSE.md
|
2020-11-17 13:35:56 +01:00
|
|
|
%{_libdir}/libcares.so.%{sonum}*
|
2018-02-20 10:24:29 +01:00
|
|
|
|
2018-02-20 10:35:11 +01:00
|
|
|
%files devel
|
2020-01-07 19:03:05 +01:00
|
|
|
%license LICENSE.md
|
2018-02-20 10:24:29 +01:00
|
|
|
%{_libdir}/libcares.so
|
|
|
|
%{_includedir}/*.h
|
2020-07-09 08:43:45 +02:00
|
|
|
%{_mandir}/man3/ares_*.3%{?ext_man}
|
2018-02-20 10:24:29 +01:00
|
|
|
%{_libdir}/pkgconfig/libcares.pc
|
2020-01-07 19:03:05 +01:00
|
|
|
%{_libdir}/cmake/c-ares/
|
2024-02-08 12:26:19 +01:00
|
|
|
%endif
|
2020-11-17 13:35:56 +01:00
|
|
|
|
2018-02-20 10:24:29 +01:00
|
|
|
%changelog
|