forked from pool/c-ares
Accepting request 761665 from home:TheBlackCat:branches:devel:libraries:c_c++
- Switch to cmake-based build. Some packages need the cmake build files. This version runs atest OBS-URL: https://build.opensuse.org/request/show/761665 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=15
This commit is contained in:
parent
4b8c0756e2
commit
90605f4d8d
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 6 17:54:05 UTC 2020 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Switch to cmake-based build.
|
||||
Some packages need the cmake build files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 15 07:59:27 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
76
c-ares.spec
76
c-ares.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package c-ares
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC.
|
||||
# Copyright (c) 2020 SUSE LLC.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,14 +16,14 @@
|
||||
#
|
||||
|
||||
|
||||
%define libname libcares2
|
||||
%define sonum 2
|
||||
%define libname libcares%{sonum}
|
||||
%define realver 1.15.0-20191108
|
||||
Name: c-ares
|
||||
Version: 1.15.0+20191108
|
||||
Release: 0
|
||||
Summary: Library for asynchronous name resolves
|
||||
License: MIT
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://c-ares.haxx.se/
|
||||
#Source0: https://c-ares.haxx.se/daily-snapshot/c-ares-%{realver}.tar.gz
|
||||
Source0: c-ares-%{realver}.tar.gz
|
||||
@ -33,8 +33,7 @@ Source3: %{name}.keyring
|
||||
Source4: baselibs.conf
|
||||
Patch0: 0001-Use-RPM-compiler-options.patch
|
||||
Patch1: disable-live-tests.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
@ -44,18 +43,30 @@ 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 %{libname}
|
||||
%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
|
||||
Group: System/Libraries
|
||||
|
||||
%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: Library for asynchronous name resolves
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{libname} = %{version}
|
||||
Requires: glibc-devel
|
||||
Provides: libcares-devel = %{version}
|
||||
@ -66,6 +77,10 @@ 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.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{realver}
|
||||
|
||||
@ -74,35 +89,48 @@ sed -i -e '/XC_CHECK_BUILD_FLAGS/d' configure.ac
|
||||
sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4
|
||||
|
||||
%build
|
||||
autoreconf -fiv
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
--enable-symbol-hiding \
|
||||
--enable-nonblocking \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--enable-tests
|
||||
%cmake \
|
||||
-DCARES_STATIC:BOOL=OFF \
|
||||
-DCARES_SHARED:BOOL=ON \
|
||||
-DCARES_INSTALL:BOOL=ON \
|
||||
-DCARES_BUILD_TESTS:BOOL=ON \
|
||||
-DCARES_BUILD_TOOLS:BOOL=ON
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make -C test %{?_smp_mflags}
|
||||
./test/arestest
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%cmake_install
|
||||
install -m 644 -Dt %{buildroot}%{_mandir}/man1/ *.1
|
||||
install -m 644 -Dt %{buildroot}%{_mandir}/man3/ *.3
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%check
|
||||
pushd build
|
||||
make -C test %{?_smp_mflags}
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
|
||||
./bin/arestest
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files utils
|
||||
%license LICENSE.md
|
||||
%{_bindir}/acountry
|
||||
%{_bindir}/adig
|
||||
%{_bindir}/ahost
|
||||
%{_mandir}/man1/acountry.1%{ext_man}
|
||||
%{_mandir}/man1/adig.1%{ext_man}
|
||||
%{_mandir}/man1/ahost.1%{ext_man}
|
||||
|
||||
%files -n %{libname}
|
||||
%license LICENSE.md
|
||||
%{_libdir}/libcares.so.2*
|
||||
|
||||
%files devel
|
||||
%license LICENSE.md
|
||||
%{_libdir}/libcares.so
|
||||
%{_includedir}/*.h
|
||||
%{_mandir}/man3/ares_*
|
||||
%{_mandir}/man3/ares_*.3%{ext_man}
|
||||
%{_libdir}/pkgconfig/libcares.pc
|
||||
%{_libdir}/cmake/c-ares/
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user