Blame libneurosim.spec

003f2b9
# Obsolete autotools m4 used
003f2b9
# https://github.com/INCF/libneurosim/issues/11
003f2b9
fc50732
%global commit 03646747c8fe64fa3439ac2d282623b659f60c22
003f2b9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
003f2b9
003f2b9
%global _description \
003f2b9
libneurosim is a general library that provides interfaces and common utility \
003f2b9
code for neuronal simulators. \
003f2b9
\
003f2b9
Currently it provides the ConnectionGenerator interface. \
003f2b9
\
003f2b9
The ConnectionGenerator API is a standard interface supporting efficient \
003f2b9
generation of network connectivity during model setup in neuronal network \
003f2b9
simulators. It is intended as an abstraction isolating both sides of the API: \
003f2b9
any simulator can use a given connection generator and a given simulator can \
003f2b9
use any library providing the ConnectionGenerator interface. It was initially \
003f2b9
developed to support the use of libcsa from NEST.
003f2b9
72cf5a4
%bcond_without mpich
72cf5a4
%bcond_without openmpi
003f2b9
003f2b9
Name:           libneurosim
003f2b9
Version:        0
f32f230
Release:        11.20181124.git%{shortcommit}%{?dist}
003f2b9
Summary:        Common interfaces for neuronal simulators
003f2b9
003f2b9
License:        GPLv3+
003f2b9
URL:            https://github.com/INCF/%{name}
fc50732
Source0:        https://github.com/INCF/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
003f2b9
003f2b9
BuildRequires:  automake
003f2b9
BuildRequires:  autoconf
003f2b9
BuildRequires:  libtool-ltdl-devel
003f2b9
BuildRequires:  libtool
003f2b9
BuildRequires:  gcc-c++
003f2b9
BuildRequires:  python3-devel
003f2b9
003f2b9
# Pull in the common package
003f2b9
Requires:       %{name}-common = %{version}-%{release}
003f2b9
003f2b9
%description
003f2b9
%{_description}
003f2b9
003f2b9
%package        devel
003f2b9
Summary:        Development files for %{name}
003f2b9
Requires:       %{name}%{?_isa} = %{version}-%{release}
003f2b9
003f2b9
%description    devel
003f2b9
The %{name}-devel package contains libraries and header files for
003f2b9
developing applications that use %{name}.
003f2b9
003f2b9
%package        common
003f2b9
Summary:        Common files for %{name}
003f2b9
BuildArch:      noarch
003f2b9
003f2b9
%description    common
003f2b9
The %{name}-common package contains files required by all sub packages.
003f2b9
72cf5a4
%if %{with openmpi}
003f2b9
%package openmpi
003f2b9
Summary:        %{name} built with openmpi
003f2b9
BuildRequires:  openmpi-devel
003f2b9
BuildRequires:  rpm-mpi-hooks
003f2b9
Requires:       openmpi
003f2b9
Requires:       %{name}-common = %{version}-%{release}
003f2b9
%description openmpi
003f2b9
%{_description}
003f2b9
003f2b9
%package openmpi-devel
003f2b9
Summary:        %{name} built with openmpi
003f2b9
BuildRequires:  openmpi-devel
003f2b9
BuildRequires:  rpm-mpi-hooks
003f2b9
Requires:       openmpi
003f2b9
Requires:       %{name}-openmpi%{?_isa} = %{version}-%{release}
003f2b9
%description openmpi-devel
003f2b9
%{_description}
003f2b9
003f2b9
%endif
003f2b9
003f2b9
72cf5a4
%if %{with mpich}
003f2b9
%package mpich
003f2b9
Summary:        %{name} built with mpich
003f2b9
BuildRequires:  mpich-devel
003f2b9
BuildRequires:  rpm-mpi-hooks
003f2b9
Requires:       mpich
003f2b9
Requires:       %{name}-common = %{version}-%{release}
003f2b9
003f2b9
%description mpich
003f2b9
%{_description}
003f2b9
003f2b9
%package mpich-devel
003f2b9
Summary:        %{name} built with mpich
003f2b9
BuildRequires:  mpich-devel
003f2b9
BuildRequires:  rpm-mpi-hooks
0fc227f
BuildRequires: make
003f2b9
Requires:       mpich
003f2b9
Requires:       %{name}-mpich%{?_isa} = %{version}-%{release}
003f2b9
%description mpich-devel
003f2b9
%{_description}
003f2b9
003f2b9
%endif
003f2b9
003f2b9
%prep
003f2b9
%autosetup -c -n %{name}-%{commit}
003f2b9
003f2b9
# Make these accessible here
003f2b9
cp -v %{name}-%{commit}/COPYING .
003f2b9
cp -v %{name}-%{commit}/README.md .
003f2b9
003f2b9
# Default is py3
72cf5a4
%if %{with mpich}
003f2b9
    cp -a %{name}-%{commit} %{name}-%{commit}-mpich
003f2b9
%endif
003f2b9
72cf5a4
%if %{with openmpi}
003f2b9
    cp -a %{name}-%{commit} %{name}-%{commit}-openmpi
003f2b9
%endif
003f2b9
003f2b9
%build
003f2b9
003f2b9
%global do_build \
003f2b9
pushd %{name}-%{commit}$MPI_COMPILE_TYPE && \
003f2b9
./autogen.sh && \
003f2b9
%{set_build_flags} \
f32f230
./configure CC=$MPICC CXX=$MPICXX --disable-static \\\
003f2b9
--disable-silent-rules \\\
003f2b9
--with-python=$PYTHON_VERSION \\\
003f2b9
--with-mpi=$MPI_YES \\\
003f2b9
--prefix=$MPI_HOME \\\
003f2b9
--libdir=$MPI_LIB \\\
003f2b9
--includedir=$MPI_INCLUDE \\\
003f2b9
--bindir=$MPI_BIN \\\
003f2b9
--mandir=$MPI_MAN && \
003f2b9
%make_build STRIP=/bin/true && \
003f2b9
popd || exit -1
003f2b9
003f2b9
003f2b9
# Python 3
003f2b9
MPI_COMPILE_TYPE=""
003f2b9
PYTHON_VERSION=3
003f2b9
MPI_YES="no"
003f2b9
MPI_HOME=%{_prefix}
003f2b9
MPI_LIB=%{_libdir}
003f2b9
MPI_INCLUDE=%{_includedir}
003f2b9
MPI_BIN=%{_bindir}
003f2b9
MPI_MAN=%{_mandir}
f32f230
MPICC=%{__cc}
f32f230
MPICXX=%{__cxx}
003f2b9
%{do_build}
003f2b9
003f2b9
# Mpich
72cf5a4
%if %{with mpich}
003f2b9
%{_mpich_load}
003f2b9
# Python 3
003f2b9
MPI_COMPILE_TYPE="-mpich"
003f2b9
PYTHON_VERSION=3
003f2b9
MPI_YES="yes"
f32f230
MPICC=mpicc
f32f230
MPICXX=mpicxx
003f2b9
%{do_build}
003f2b9
%{_mpich_unload}
003f2b9
%endif
003f2b9
003f2b9
# Openmpi
72cf5a4
%if %{with openmpi}
003f2b9
%{_openmpi_load}
003f2b9
# Python 3
003f2b9
MPI_COMPILE_TYPE="-openmpi"
003f2b9
PYTHON_VERSION=3
003f2b9
MPI_YES="yes"
f32f230
MPICC=mpicc
f32f230
MPICXX=mpicxx
003f2b9
%{do_build}
003f2b9
003f2b9
%{_openmpi_unload}
003f2b9
%endif
003f2b9
003f2b9
%install
003f2b9
%global do_install \
003f2b9
%make_install -C %{name}-%{commit}$MPI_COMPILE_TYPE STRIP=/bin/true || exit -1
003f2b9
003f2b9
003f2b9
# Python 3
003f2b9
MPI_COMPILE_TYPE=""
003f2b9
PYTHON_VERSION=3
003f2b9
%{do_install}
003f2b9
003f2b9
# Mpich
72cf5a4
%if %{with mpich}
003f2b9
%{_mpich_load}
003f2b9
# Python 3
003f2b9
MPI_TYPE="mpich"
003f2b9
MPI_COMPILE_TYPE="-mpich"
003f2b9
PYTHON_VERSION=3
003f2b9
PY_VERSION=%{python3_version}
003f2b9
%{do_install}
003f2b9
003f2b9
%{_mpich_unload}
003f2b9
%endif
003f2b9
003f2b9
# Openmpi
72cf5a4
%if %{with openmpi}
003f2b9
%{_openmpi_load}
003f2b9
MPI_TYPE="openmpi"
003f2b9
# Python3
003f2b9
MPI_COMPILE_TYPE="-openmpi"
003f2b9
PYTHON_VERSION=3
003f2b9
PY_VERSION=%{python3_version}
003f2b9
%{do_install}
003f2b9
003f2b9
%{_openmpi_unload}
003f2b9
%endif
003f2b9
003f2b9
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
003f2b9
003f2b9
%ldconfig_scriptlets
003f2b9
003f2b9
%files
003f2b9
%{_libdir}/%{name}.so.0
003f2b9
%{_libdir}/%{name}.so.0.0.0
fc50732
%{_libdir}/libpy3neurosim.so.0
fc50732
%{_libdir}/libpy3neurosim.so.0.0.0
003f2b9
003f2b9
%files devel
003f2b9
%{_includedir}/neurosim
fc50732
%{_libdir}/%{name}.so
fc50732
%{_libdir}/libpy3neurosim.so
003f2b9
003f2b9
%files common
003f2b9
%license COPYING
003f2b9
%doc README.md
003f2b9
72cf5a4
%if %{with mpich}
003f2b9
%files mpich
003f2b9
%{_libdir}/mpich/lib/%{name}.so.0
003f2b9
%{_libdir}/mpich/lib/%{name}.so.0.0.0
fc50732
%{_libdir}/mpich/lib/libpy3neurosim.so.0
fc50732
%{_libdir}/mpich/lib/libpy3neurosim.so.0.0.0
003f2b9
003f2b9
%files mpich-devel
003f2b9
%{_includedir}/mpich*/neurosim
fc50732
%{_libdir}/mpich/lib/%{name}.so
fc50732
%{_libdir}/mpich/lib/libpy3neurosim.so
003f2b9
%endif
003f2b9
72cf5a4
%if %{with openmpi}
003f2b9
%files openmpi
003f2b9
%{_libdir}/openmpi/lib/%{name}.so.0
003f2b9
%{_libdir}/openmpi/lib/%{name}.so.0.0.0
fc50732
%{_libdir}/openmpi/lib/libpy3neurosim.so.0
fc50732
%{_libdir}/openmpi/lib/libpy3neurosim.so.0.0.0
003f2b9
003f2b9
%files openmpi-devel
003f2b9
%{_includedir}/openmpi*/neurosim
fc50732
%{_libdir}/openmpi/lib/%{name}.so
fc50732
%{_libdir}/openmpi/lib/libpy3neurosim.so
003f2b9
%endif
003f2b9
fc50732
003f2b9
%changelog
f32f230
* Tue Oct 06 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-11.20181124.git0364674
f32f230
- Fix build
f32f230
- https://lists.fedoraproject.org/archives/list/scitech@lists.fedoraproject.org/thread/BNKLXKY4O7BOTZ7LH7XDUTQO6FG2UWUT/
f32f230
- remove py2
f32f230
257c712
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-10.20181124.git0364674
257c712
- Second attempt - Rebuilt for
257c712
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
257c712
1fe48f8
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-9.20181124.git0364674
1fe48f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1fe48f8
26683a9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-8.20181124.git0364674
26683a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
26683a9
e2b6aa2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-7.20181124.git0364674
e2b6aa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e2b6aa2
8d3f3b9
* Thu Feb 14 2019 Orion Poplawski <orion@nwra.com> - 0-6.20181124.git0364674
8d3f3b9
- Rebuild for openmpi 3.1.3
8d3f3b9
c0b5a0e
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-5.20181124.git0364674
c0b5a0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
c0b5a0e
72cf5a4
* Sat Nov 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-4.20181124.git0364674
72cf5a4
- Use bcond conditionals
72cf5a4
fc50732
* Sat Nov 24 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-3.20181124.git0364674
fc50732
- Update to latest upstream commit
fc50732
- Put libraries in correct locations. libpyneurosim is NOT a python extension module
fc50732
- Remove python sub packages: other software must link against both libneurosim and libpyneurosim
fc50732
- All explained in: https://github.com/INCF/libneurosim/issues/12
fc50732
23fdcc5
* Sun Oct 28 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-2.20181028.git7d074da
23fdcc5
- Rebuild using conditional
23fdcc5
003f2b9
* Thu Oct 25 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-1.20181025.git7d074da
003f2b9
- Place python so in correct location
003f2b9
- Correct devel file list
003f2b9
003f2b9
* Fri Oct 19 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0-1.20181019.git57b76e2
003f2b9
- Correct release field
003f2b9
- Correct autosetup usage
003f2b9
- Move common files to -common sub package
003f2b9
- Explicitly version sonames
003f2b9
- Use tweaks suggested in review
003f2b9
- Make python3 default
003f2b9
- Enable debuginfo
003f2b9
- Update to latest upstream commit
003f2b9
- Initial build