2020-11-17 20:34:43 +01:00
|
|
|
DEBUG: set_current_pkg receiving %package utils
|
|
|
|
DEBUG: set_current_pkg returning c-utils,
|
|
|
|
DEBUG: set_current_pkg receiving %package -n libcares2
|
|
|
|
DEBUG: set_current_pkg returning libcares2,
|
|
|
|
DEBUG: set_current_pkg receiving %package devel
|
|
|
|
DEBUG: set_current_pkg returning c-devel,
|
|
|
|
DEBUG: set_current_pkg receiving %prep
|
|
|
|
DEBUG: set_current_pkg returning c,
|
2018-02-20 10:24:29 +01:00
|
|
|
#
|
2020-11-17 13:35:56 +01:00
|
|
|
# spec file for package c
|
2018-02-20 10:24:29 +01:00
|
|
|
#
|
2020-07-09 08:43:45 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
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-09-11 09:42:12 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "tests"
|
|
|
|
%define psuffix -tests
|
2020-09-11 09:54:43 +02:00
|
|
|
%bcond_without tests
|
|
|
|
%else
|
2020-09-11 09:42:12 +02:00
|
|
|
%bcond_with tests
|
|
|
|
%endif
|
|
|
|
%define pname c-ares
|
2020-01-07 19:03:05 +01:00
|
|
|
%define sonum 2
|
|
|
|
%define libname libcares%{sonum}
|
2020-09-11 09:42:12 +02:00
|
|
|
Name: %{pname}%{?psuffix}
|
2020-11-17 13:35:56 +01:00
|
|
|
Version: 1.17.0
|
2018-02-20 10:24:29 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Library for asynchronous name resolves
|
|
|
|
License: MIT
|
2019-11-15 08:59:48 +01:00
|
|
|
URL: https://c-ares.haxx.se/
|
2020-09-11 09:42:12 +02:00
|
|
|
Source0: http://c-ares.haxx.se/download/%{pname}-%{version}.tar.gz
|
|
|
|
Source1: http://c-ares.haxx.se/download/%{pname}-%{version}.tar.gz.asc
|
|
|
|
Source3: %{pname}.keyring
|
2018-02-20 10:24:29 +01:00
|
|
|
Source4: baselibs.conf
|
2020-11-17 13:35:56 +01:00
|
|
|
Source5: libcares.pc.cmake
|
|
|
|
Source6: c-ares-config.cmake.in
|
2018-02-20 10:24:29 +01:00
|
|
|
Patch0: 0001-Use-RPM-compiler-options.patch
|
2019-02-13 17:25:34 +01:00
|
|
|
Patch1: disable-live-tests.patch
|
2020-01-07 19:03:05 +01:00
|
|
|
BuildRequires: cmake
|
2018-02-20 10:24:29 +01:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libtool
|
2020-02-04 12:49:24 +01:00
|
|
|
# Needed for getservbyport_r function to work properly.
|
|
|
|
BuildRequires: netcfg
|
2018-02-20 10:24:29 +01:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
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
|
2020-01-07 19:03:05 +01:00
|
|
|
Summary: Development files for %{name}
|
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.
|
|
|
|
|
2018-02-20 10:24:29 +01:00
|
|
|
%prep
|
2020-09-11 09:42:12 +02:00
|
|
|
%autosetup -p1 -n %{pname}-%{version}
|
2020-11-17 14:41:55 +01:00
|
|
|
|
2020-11-17 13:35:56 +01:00
|
|
|
cp %{S:5} %{S:6} .
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
# Remove bogus cflags checking
|
2020-11-17 13:35:56 +01:00
|
|
|
# sed -i -e '/XC_CHECK_BUILD_FLAGS/d' configure.ac
|
|
|
|
# sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
%build
|
2020-01-07 19:03:05 +01:00
|
|
|
%cmake \
|
2020-09-11 09:54:43 +02:00
|
|
|
%if %{with tests}
|
|
|
|
-DCARES_BUILD_TESTS:BOOL=ON \
|
|
|
|
%endif
|
|
|
|
%{nil}
|
2020-11-17 15:05:48 +01:00
|
|
|
make -O VERBOSE=1 %{?_smp_mflags}
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
%install
|
2020-09-11 09:54:43 +02:00
|
|
|
%if !%{with tests}
|
2020-01-07 19:03:05 +01:00
|
|
|
%cmake_install
|
2020-09-11 09:42:12 +02:00
|
|
|
%endif
|
2018-02-20 10:24:29 +01:00
|
|
|
|
2020-09-11 09:54:43 +02:00
|
|
|
%if %{with tests}
|
2020-01-07 19:03:05 +01:00
|
|
|
%check
|
|
|
|
pushd build
|
2020-11-17 15:05:48 +01:00
|
|
|
make -O VERBOSE=1 %{?_smp_mflags} -C test
|
2020-01-07 19:03:05 +01:00
|
|
|
./bin/arestest
|
2020-09-11 09:42:12 +02:00
|
|
|
%endif
|
2020-01-07 19:03:05 +01:00
|
|
|
|
2020-09-11 09:54:43 +02:00
|
|
|
%if !%{with tests}
|
2020-11-17 13:35:56 +01:00
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
2018-02-20 10:35:11 +01:00
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2018-02-20 10:24:29 +01:00
|
|
|
|
2020-01-07 19:03:05 +01:00
|
|
|
%files utils
|
|
|
|
%license LICENSE.md
|
|
|
|
%{_bindir}/acountry
|
|
|
|
%{_bindir}/adig
|
|
|
|
%{_bindir}/ahost
|
2020-07-09 08:43:45 +02:00
|
|
|
%{_mandir}/man1/acountry.1%{?ext_man}
|
|
|
|
%{_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/
|
2020-11-17 13:35:56 +01:00
|
|
|
|
2020-09-11 09:42:12 +02:00
|
|
|
%endif
|
2018-02-20 10:24:29 +01:00
|
|
|
|
|
|
|
%changelog
|