forked from pool/c-ares
This commit is contained in:
parent
3587944cfa
commit
075e6e9435
@ -1,3 +1,4 @@
|
||||
<multibuild>
|
||||
<package>main</package>
|
||||
<package>tests</package>
|
||||
</multibuild>
|
||||
|
55
c-ares.spec
55
c-ares.spec
@ -1,13 +1,5 @@
|
||||
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,
|
||||
#
|
||||
# spec file for package c
|
||||
# spec file for package c-ares
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
@ -25,24 +17,37 @@ DEBUG: set_current_pkg returning c,
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "tests"
|
||||
%define psuffix -tests
|
||||
%bcond_without tests
|
||||
%else
|
||||
%bcond_with tests
|
||||
|
||||
%if "%{flavor}" == "%{nil}"
|
||||
ExclusiveArch: do_not_build
|
||||
%endif
|
||||
%define pname c-ares
|
||||
|
||||
%if "%{flavor}" == "tests"
|
||||
%define pname c-ares-tests
|
||||
%bcond_without tests
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == "main"
|
||||
%define pname c-ares
|
||||
%bcond_with tests
|
||||
%endif
|
||||
|
||||
%define sonum 2
|
||||
%define libname libcares%{sonum}
|
||||
Name: %{pname}%{?psuffix}
|
||||
|
||||
%if 0%{!?cmake_build:1}
|
||||
%define cmake_build make -O VERBOSE=1 %{?_smp_mflags}
|
||||
%endif
|
||||
|
||||
Name: %{pname}
|
||||
Version: 1.17.0
|
||||
Release: 0
|
||||
Summary: Library for asynchronous name resolves
|
||||
License: MIT
|
||||
URL: https://c-ares.haxx.se/
|
||||
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
|
||||
Source0: http://c-ares.haxx.se/download/c-ares-%{version}.tar.gz
|
||||
Source1: http://c-ares.haxx.se/download/c-ares-%{version}.tar.gz.asc
|
||||
Source3: c-ares.keyring
|
||||
Source4: baselibs.conf
|
||||
Source5: libcares.pc.cmake
|
||||
Source6: c-ares-config.cmake.in
|
||||
@ -97,22 +102,20 @@ 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 %{pname}-%{version}
|
||||
%autosetup -p1 -n c-ares-%{version}
|
||||
|
||||
cp %{S:5} %{S:6} .
|
||||
|
||||
# Remove bogus cflags checking
|
||||
# sed -i -e '/XC_CHECK_BUILD_FLAGS/d' configure.ac
|
||||
# sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4
|
||||
|
||||
%build
|
||||
|
||||
%cmake \
|
||||
%if %{with tests}
|
||||
-DCARES_BUILD_TESTS:BOOL=ON \
|
||||
%endif
|
||||
%{nil}
|
||||
make -O VERBOSE=1 %{?_smp_mflags}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%if !%{with tests}
|
||||
@ -122,7 +125,7 @@ make -O VERBOSE=1 %{?_smp_mflags}
|
||||
%if %{with tests}
|
||||
%check
|
||||
pushd build
|
||||
make -O VERBOSE=1 %{?_smp_mflags} -C test
|
||||
%cmake_build -C test
|
||||
./bin/arestest
|
||||
%endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user