diff --git a/gfal2.spec b/gfal2.spec index 8da7577..0cd3b23 100644 --- a/gfal2.spec +++ b/gfal2.spec @@ -3,9 +3,7 @@ %bcond_with tests -%if %{?fedora}%{!?fedora:0} >= 35 - %define _with_srm 0 -%else +%if %{?fedora}%{!?fedora:0} < 35 %define _with_srm 1 %endif @@ -55,7 +53,7 @@ BuildRequires: lfc-devel BuildRequires: dpm-devel %endif #srm plugin dependencies -%if %_with_srm +%if %{?_with_srm:1}%{?!_with_srm:0} BuildRequires: srm-ifce-devel >= 1.23.1 %endif #dcap plugin dependencies @@ -144,7 +142,7 @@ Provides the dcap support (gsidcap://, dcap://) for %{name}. The dcap plugin provides the POSIX operations for the dcap \ URLs, the dcap protocol is used on the DCACHE storage system -%if %_with_srm +%if %{?_with_srm:1}%{?!_with_srm:0} %package plugin-srm Summary: Provides the srm access for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} @@ -214,7 +212,7 @@ Requires: %{name}-plugin-rfio%{?_isa} = %{version}-%{release} Requires: %{name}-plugin-lfc%{?_isa} = %{version}-%{release} %endif Requires: %{name}-plugin-dcap%{?_isa} = %{version}-%{release} -%if %_with_srm +%if %{?_with_srm:1}%{?!_with_srm:0} Requires: %{name}-plugin-srm%{?_isa} = %{version}-%{release} %endif Requires: %{name}-plugin-gridftp%{?_isa} = %{version}-%{release} @@ -269,16 +267,12 @@ export CXX=/usr/bin/g++44 %cmake3 \ -DDOC_INSTALL_DIR=%{_pkgdocdir} \ -DUNIT_TESTS=TRUE \ + -DPLUGIN_SRM=%{?_with_srm:TRUE}%{?!_with_srm:FALSE} \ -DPLUGIN_MOCK=TRUE \ -DPLUGIN_LFC=FALSE \ -DPLUGIN_RFIO=FALSE \ -DFUNCTIONAL_TESTS=%{?with_tests:ON}%{?!with_tests:OFF} %endif -%if %_with_srm -%cmake3 -DPLUGIN_SRM=TRUE -%else -%cmake3 -DPLUGIN_SRM=FALSE -%endif %cmake3_build #make %{?_smp_mflags} @@ -349,7 +343,7 @@ ctest -V %{_pkgdocdir}/README_PLUGIN_DCAP %config(noreplace) %{_sysconfdir}/%{name}.d/dcap_plugin.conf -%if %_with_srm +%if %{?_with_srm:1}%{?!_with_srm:0} %files plugin-srm %{_libdir}/%{name}-plugins/libgfal_plugin_srm.so* %{_pkgdocdir}/README_PLUGIN_SRM