diff --git a/libneurosim.spec b/libneurosim.spec index e23d25b..ca9ff9c 100644 --- a/libneurosim.spec +++ b/libneurosim.spec @@ -17,20 +17,20 @@ any simulator can use a given connection generator and a given simulator can \ use any library providing the ConnectionGenerator interface. It was initially \ developed to support the use of libcsa from NEST. -%global with_mpich 1 -%global with_openmpi 1 +%bcond_without mpich +%bcond_without openmpi # https://fedoraproject.org/wiki/Packaging:DistTag?rd=Packaging/DistTag#Conditionals # Disabled for rawhide + F30 -%if 0%{?fedora} < 30 -%global with_py2 1 +%if 0%{?fedora} >= 30 +%bcond_with py2 %else -%global with_py2 0 +%bcond_without py2 %endif Name: libneurosim Version: 0 -Release: 3.20181124.git%{shortcommit}%{?dist} +Release: 4.20181124.git%{shortcommit}%{?dist} Summary: Common interfaces for neuronal simulators License: GPLv3+ @@ -44,7 +44,7 @@ BuildRequires: libtool BuildRequires: gcc-c++ BuildRequires: python3-devel -%if %{with_py2} +%if %{with py2} BuildRequires: python2-devel %endif @@ -69,7 +69,7 @@ BuildArch: noarch %description common The %{name}-common package contains files required by all sub packages. -%if %{with_openmpi} +%if %{with openmpi} %package openmpi Summary: %{name} built with openmpi BuildRequires: openmpi-devel @@ -91,7 +91,7 @@ Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %endif -%if %{with_mpich} +%if %{with mpich} %package mpich Summary: %{name} built with mpich BuildRequires: mpich-devel @@ -121,19 +121,19 @@ cp -v %{name}-%{commit}/COPYING . cp -v %{name}-%{commit}/README.md . # Default is py3 -%if %{with_py2} +%if %{with py2} cp -a %{name}-%{commit} %{name}-%{commit}-py2 %endif -%if %{with_mpich} - %if %{with_py2} +%if %{with mpich} + %if %{with py2} cp -a %{name}-%{commit}-py2 %{name}-%{commit}-mpich-py2 %endif cp -a %{name}-%{commit} %{name}-%{commit}-mpich %endif -%if %{with_openmpi} - %if %{with_py2} +%if %{with openmpi} + %if %{with py2} cp -a %{name}-%{commit}-py2 %{name}-%{commit}-openmpi-py2 %endif cp -a %{name}-%{commit} %{name}-%{commit}-openmpi @@ -170,7 +170,7 @@ MPI_MAN=%{_mandir} %{do_build} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-py2" PYTHON_VERSION=2 MPI_YES="no" @@ -183,7 +183,7 @@ MPI_MAN=%{_mandir} %endif # Mpich -%if %{with_mpich} +%if %{with mpich} %{_mpich_load} # Python 3 MPI_COMPILE_TYPE="-mpich" @@ -192,7 +192,7 @@ MPI_YES="yes" %{do_build} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-mpich-py2" PYTHON_VERSION=2 MPI_YES="yes" @@ -202,7 +202,7 @@ MPI_YES="yes" %endif # Openmpi -%if %{with_openmpi} +%if %{with openmpi} %{_openmpi_load} # Python 3 MPI_COMPILE_TYPE="-openmpi" @@ -211,7 +211,7 @@ MPI_YES="yes" %{do_build} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-openmpi-py2" PYTHON_VERSION=2 MPI_YES="yes" @@ -231,14 +231,14 @@ PYTHON_VERSION=3 %{do_install} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-py2" PYTHON_VERSION=2 %{do_install} %endif # Mpich -%if %{with_mpich} +%if %{with mpich} %{_mpich_load} # Python 3 MPI_TYPE="mpich" @@ -248,7 +248,7 @@ PY_VERSION=%{python3_version} %{do_install} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-mpich-py2" PYTHON_VERSION=2 PY_VERSION=%{python2_version} @@ -258,7 +258,7 @@ PY_VERSION=%{python2_version} %endif # Openmpi -%if %{with_openmpi} +%if %{with openmpi} %{_openmpi_load} MPI_TYPE="openmpi" # Python3 @@ -268,7 +268,7 @@ PY_VERSION=%{python3_version} %{do_install} # Python 2 -%if %{with_py2} +%if %{with py2} MPI_COMPILE_TYPE="-openmpi-py2" PYTHON_VERSION=2 PY_VERSION=%{python2_version} @@ -286,7 +286,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_libdir}/%{name}.so.0.0.0 %{_libdir}/libpy3neurosim.so.0 %{_libdir}/libpy3neurosim.so.0.0.0 -%if %{with_py2} +%if %{with py2} %{_libdir}/libpy2neurosim.so.0 %{_libdir}/libpy2neurosim.so.0.0.0 %{_libdir}/libpyneurosim.so.0 @@ -297,7 +297,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_includedir}/neurosim %{_libdir}/%{name}.so %{_libdir}/libpy3neurosim.so -%if %{with_py2} +%if %{with py2} %{_libdir}/libpy2neurosim.so %{_libdir}/libpyneurosim.so %endif @@ -306,13 +306,13 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %license COPYING %doc README.md -%if %{with_mpich} +%if %{with mpich} %files mpich %{_libdir}/mpich/lib/%{name}.so.0 %{_libdir}/mpich/lib/%{name}.so.0.0.0 %{_libdir}/mpich/lib/libpy3neurosim.so.0 %{_libdir}/mpich/lib/libpy3neurosim.so.0.0.0 -%if %{with_py2} +%if %{with py2} %{_libdir}/mpich/lib/libpy2neurosim.so.0 %{_libdir}/mpich/lib/libpy2neurosim.so.0.0.0 %{_libdir}/mpich/lib/libpyneurosim.so.0 @@ -323,19 +323,19 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_includedir}/mpich*/neurosim %{_libdir}/mpich/lib/%{name}.so %{_libdir}/mpich/lib/libpy3neurosim.so -%if %{with_py2} +%if %{with py2} %{_libdir}/mpich/lib/libpy2neurosim.so %{_libdir}/mpich/lib/libpyneurosim.so %endif %endif -%if %{with_openmpi} +%if %{with openmpi} %files openmpi %{_libdir}/openmpi/lib/%{name}.so.0 %{_libdir}/openmpi/lib/%{name}.so.0.0.0 %{_libdir}/openmpi/lib/libpy3neurosim.so.0 %{_libdir}/openmpi/lib/libpy3neurosim.so.0.0.0 -%if %{with_py2} +%if %{with py2} %{_libdir}/openmpi/lib/libpy2neurosim.so.0 %{_libdir}/openmpi/lib/libpy2neurosim.so.0.0.0 %{_libdir}/openmpi/lib/libpyneurosim.so.0 @@ -346,7 +346,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_includedir}/openmpi*/neurosim %{_libdir}/openmpi/lib/%{name}.so %{_libdir}/openmpi/lib/libpy3neurosim.so -%if %{with_py2} +%if %{with py2} %{_libdir}/openmpi/lib/libpy2neurosim.so %{_libdir}/openmpi/lib/libpyneurosim.so %endif @@ -354,6 +354,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Sat Nov 24 2018 Ankur Sinha - 0-4.20181124.git0364674 +- Use bcond conditionals + * Sat Nov 24 2018 Ankur Sinha - 0-3.20181124.git0364674 - Update to latest upstream commit - Put libraries in correct locations. libpyneurosim is NOT a python extension module