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>
|
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
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -17,18 +17,13 @@
|
|||||||
|
|
||||||
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
|
||||||
%if "%{flavor}" == "tests"
|
%if "%{flavor}" == "tests"
|
||||||
%bcond_without tests
|
|
||||||
%define psuffix -tests
|
%define psuffix -tests
|
||||||
%endif
|
%bcond_without tests
|
||||||
|
%else
|
||||||
%if "%{flavor}" == ""
|
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define pname c-ares
|
%define pname c-ares
|
||||||
|
|
||||||
%define sonum 2
|
%define sonum 2
|
||||||
%define libname libcares%{sonum}
|
%define libname libcares%{sonum}
|
||||||
Name: %{pname}%{?psuffix}
|
Name: %{pname}%{?psuffix}
|
||||||
@ -101,15 +96,19 @@ sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCARES_STATIC:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
|
-DCARES_STATIC:BOOL=OFF \
|
||||||
-DCARES_SHARED:BOOL=%{?with_tests:OFF}%{!?with_tests:ON} \
|
-DCARES_SHARED:BOOL=ON \
|
||||||
-DCARES_INSTALL:BOOL=%{?with_tests:OFF}%{!?with_tests:ON} \
|
-DCARES_INSTALL:BOOL=ON \
|
||||||
-DCARES_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
|
-DCARES_BUILD_TOOLS:BOOL=ON \
|
||||||
-DCARES_BUILD_TOOLS:BOOL=%{?with_tests:OFF}%{!?with_tests:ON}
|
%if %{with tests}
|
||||||
|
-DCARES_STATIC:BOOL=ON \
|
||||||
|
-DCARES_BUILD_TESTS:BOOL=ON \
|
||||||
|
%endif
|
||||||
|
%{nil}
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if "%{flavor}" == ""
|
%if !%{with tests}
|
||||||
%cmake_install
|
%cmake_install
|
||||||
install -m 644 -Dt %{buildroot}%{_mandir}/man1/ *.1
|
install -m 644 -Dt %{buildroot}%{_mandir}/man1/ *.1
|
||||||
install -m 644 -Dt %{buildroot}%{_mandir}/man3/ *.3
|
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
|
find %{buildroot} -type f \( -name "*.la" -o -name "*.a" \) -delete -print
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if "%{flavor}" == "tests"
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
pushd build
|
pushd build
|
||||||
%make_build -C test
|
%make_build -C test
|
||||||
@ -125,10 +124,10 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
|
|||||||
./bin/arestest
|
./bin/arestest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if !%{with tests}
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%if "%{flavor}" == ""
|
|
||||||
%files utils
|
%files utils
|
||||||
%license LICENSE.md
|
%license LICENSE.md
|
||||||
%{_bindir}/acountry
|
%{_bindir}/acountry
|
||||||
|
Loading…
Reference in New Issue
Block a user