forked from pool/c-ares
- simplify conditions bit to make it tad more readable
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=21
This commit is contained in:
parent
dc6b2f9fb6
commit
a3c9a16c82
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 11 07:54:10 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- simplify conditions bit to make it tad more readable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 10 01:31:11 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
|
31
c-ares.spec
31
c-ares.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package c-ares
|
||||
# spec file for package c
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
@ -17,18 +17,13 @@
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
|
||||
%if "%{flavor}" == "tests"
|
||||
%bcond_without tests
|
||||
%define psuffix -tests
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == ""
|
||||
%bcond_without tests
|
||||
%else
|
||||
%bcond_with tests
|
||||
%endif
|
||||
|
||||
%define pname c-ares
|
||||
|
||||
%define sonum 2
|
||||
%define libname libcares%{sonum}
|
||||
Name: %{pname}%{?psuffix}
|
||||
@ -101,15 +96,19 @@ sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DCARES_STATIC:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
|
||||
-DCARES_SHARED:BOOL=%{?with_tests:OFF}%{!?with_tests:ON} \
|
||||
-DCARES_INSTALL:BOOL=%{?with_tests:OFF}%{!?with_tests:ON} \
|
||||
-DCARES_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
|
||||
-DCARES_BUILD_TOOLS:BOOL=%{?with_tests:OFF}%{!?with_tests:ON}
|
||||
-DCARES_STATIC:BOOL=OFF \
|
||||
-DCARES_SHARED:BOOL=ON \
|
||||
-DCARES_INSTALL:BOOL=ON \
|
||||
-DCARES_BUILD_TOOLS:BOOL=ON \
|
||||
%if %{with tests}
|
||||
-DCARES_STATIC:BOOL=ON \
|
||||
-DCARES_BUILD_TESTS:BOOL=ON \
|
||||
%endif
|
||||
%{nil}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%if "%{flavor}" == ""
|
||||
%if !%{with tests}
|
||||
%cmake_install
|
||||
install -m 644 -Dt %{buildroot}%{_mandir}/man1/ *.1
|
||||
install -m 644 -Dt %{buildroot}%{_mandir}/man3/ *.3
|
||||
@ -117,7 +116,7 @@ install -m 644 -Dt %{buildroot}%{_mandir}/man3/ *.3
|
||||
find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print
|
||||
%endif
|
||||
|
||||
%if "%{flavor}" == "tests"
|
||||
%if %{with tests}
|
||||
%check
|
||||
pushd build
|
||||
%make_build -C test
|
||||
@ -125,10 +124,10 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
|
||||
./bin/arestest
|
||||
%endif
|
||||
|
||||
%if !%{with tests}
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%if "%{flavor}" == ""
|
||||
%files utils
|
||||
%license LICENSE.md
|
||||
%{_bindir}/acountry
|
||||
|
Loading…
Reference in New Issue
Block a user