The package rpms/bionetgen.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/bionetgen.git/commit/?id=c3734a49....
Change:
+%ifarch %{arm}
Thanks.
Full change:
============
commit c3734a49091ba582ca67c824a06b9c5910e3cb64
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sun Apr 21 15:45:39 2019 +0200
Bundle Sundials
diff --git a/bionetgen.spec b/bionetgen.spec
index a2905a1..70c5b5a 100644
--- a/bionetgen.spec
+++ b/bionetgen.spec
@@ -1,6 +1,11 @@
+%bcond_with mpich
+%bcond_with mpi
+
+%bcond_without bundled_sundials
+
Name: bionetgen
Version: 2.4.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Software for rule-based modeling of biochemical systems
License: GPLv3
URL:
https://github.com/RuleWorld/bionetgen
@@ -11,8 +16,9 @@ Source0:
https://github.com/RuleWorld/bionetgen/archive/BioNetGen-%{versi
Patch0: %{name}-network-solver.patch
BuildRequires: muParser-devel
+%if 0%{without bundled_sundials}
BuildRequires: sundials-devel
-BuildRequires: openmpi-devel
+%endif
BuildRequires: autoconf automake
BuildRequires: libtool
BuildRequires: gcc-c++, gcc
@@ -35,55 +41,255 @@ BioNetGen is presently a mixture of Perl and C++. Network generation
is currently implemented in Perl, the network simulator is C++, and a
new language parser is being developed with ANTLR.
+#########
+%if 0%{with mpi}
+%package openmpi
+Summary: Software for rule-based modeling of biochemical systems (OpenMPI)
+BuildRequires: muParser-devel
+%if 0%{without bundled_sundials}
+BuildRequires: sundials-openmpi-devel >= 3.2.1
+%endif
+BuildRequires: openmpi-devel
+Requires: bionetgen-perl = %{version}-%{release}
+
+%description openmpi
+BioNetGen is software for the specification and simulation of
+rule-based models of biochemical systems, including signal
+transduction, metabolic, and genetic regulatory networks. The
+BioNetGen language has recently been extended to include explicit
+representation of compartments. A review of methods for rule-based
+modeling is available in Science Signaling (Sci. STKE, 18 July 2006,
+Issue 344, p. re6).
+
+BioNetGen is presently a mixture of Perl and C++. Network generation
+is currently implemented in Perl, the network simulator is C++, and a
+new language parser is being developed with ANTLR.
+
+%package openmpi-devel
+Summary: Software for rule-based modeling of biochemical systems (OpenMPI)
+
+%description openmpi-devel
+Software for rule-based modeling of biochemical systems (developer files).
+%endif
+######
+
+#########
+%if 0%{with mpich}
+%package mpich
+Summary: Software for rule-based modeling of biochemical systems (MPICH)
+BuildRequires: muParser-devel
+%if 0%{without bundled_sundials}
+BuildRequires: sundials-mpich-devel >= 3.2.1
+%endif
+BuildRequires: mpich-devel
+Requires: bionetgen-perl = %{version}-%{release}
+
+%description mpich
+BioNetGen is software for the specification and simulation of
+rule-based models of biochemical systems, including signal
+transduction, metabolic, and genetic regulatory networks. The
+BioNetGen language has recently been extended to include explicit
+representation of compartments. A review of methods for rule-based
+modeling is available in Science Signaling (Sci. STKE, 18 July 2006,
+Issue 344, p. re6).
+
+BioNetGen is presently a mixture of Perl and C++. Network generation
+is currently implemented in Perl, the network simulator is C++, and a
+new language parser is being developed with ANTLR.
+
+%package mpich-devel
+Summary: Software for rule-based modeling of biochemical systems (MPICH)
+
+%description mpich-devel
+Software for rule-based modeling of biochemical systems (developer files).
+%endif
+######
+
%package perl
-Summary: Perl scripts used by bionetgen
+Summary: Perl scripts and Models used by bionetgen
BuildArch: noarch
BuildRequires: perl-generators
+BuildRequires: perl(Math::Trig)
Requires: bionetgen = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
+Requires: perl(Math::Trig)
%description perl
%{summary}.
%prep
-%setup -q -n bionetgen-BioNetGen-%{version}
+%setup -qc
+pushd bionetgen-BioNetGen-%{version}
+
+%if 0%{with bundled_sundials}
+rm -f
bng2/libsource/{gsl-1.9.tar.gz,Mathutils.tar.gz,muparser_v2_2_4.tar.gz,muparser_v2_2_4.zip}
+tar -xvf bng2/libsource/cvode-2.6.0.tar.gz -C bng2/Network3
+%else
# This patch must be used for Sundials 3.x
%if 0%{?fedora}
%autopatch -p1
%endif
+rm -f bng2/libsource/*
+%endif
+popd
+
+%if 0%{with mpi}
+cp -a bionetgen-BioNetGen-%{version} openmpi
+%endif
+%if 0%{with mpich}
+cp -a bionetgen-BioNetGen-%{version} mpich
+%endif
+
+%build
+
+pushd bionetgen-BioNetGen-%{version}/bng2/Network3
-rm bng2/libsource/*
-pushd bng2/Network3
sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' configure.ac
+%if %{with bundled_sundials}
+sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' cvode-2.6.0/configure.ac
+sed -i 's/muparser_.*//' configure.ac Makefile.am
+sed -i -r 's!(run_network_LDADD =).*!\1 libmathutils.la
../cvode-2.6.0/src/nvec_ser/libsundials_nvecserial.la
../cvode-2.6.0/src/cvode/libsundials_cvode.la -lmuparser!' src/Makefile.am
+%else
sed -i 's/cvode-.*//; s/muparser_.*//' configure.ac Makefile.am
sed -i -r 's/(run_network_LDADD =).*/\1 libmathutils.la -lmuparser
-lsundials_nvecserial -lsundials_cvode/' src/Makefile.am
+%endif
+
+autoreconf -iv --no-recursive
+
+warnings="-Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
-Wno-maybe-uninitialized"
+
+%configure
+
+%if %{with bundled_sundials}
+SETOPT_FLAGS=$(echo "%{optflags}" | sed -e
's/-Werror=format-security/-Wno-error=format-security/g')
+%make_build -C cvode-2.6.0 V=1 CC=gcc CXX=g++ CXXFLAGS="$SETOPT_FLAGS
$warnings" CFLAGS="$SETOPT_FLAGS $warnings"
+%endif
+%make_build -C src V=1 CC=gcc CXX=g++ CXXFLAGS="%{optflags} $warnings"
+popd
+
+%if 0%{with mpi}
+pushd openmpi/bng2/Network3
-%build
-pushd bng2/Network3
-autoreconf -iv
%{_openmpi_load}
+sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' configure.ac
+%if %{with bundled_sundials}
+sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' cvode-2.6.0/configure.ac
+sed -i 's/muparser_.*//' configure.ac Makefile.am
+sed -i -r 's!(run_network_LDADD =).*!\1 libmathutils.la
../cvode-2.6.0/src/nvec_ser/libsundials_nvecserial.la
../cvode-2.6.0/src/cvode/libsundials_cvode.la -lmuparser!' src/Makefile.am
+%else
+sed -i 's/cvode-.*//; s/muparser_.*//' configure.ac Makefile.am
+sed -i -r 's/(run_network_LDADD =).*/\1 libmathutils.la -lmuparser
-lsundials_nvecserial -lsundials_cvode/' src/Makefile.am
+%endif
+
+autoreconf -iv --no-recursive
warnings="-Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
-Wno-maybe-uninitialized"
-CXXFLAGS="%{optflags} $warnings" %configure
-%make_build -C src
+
+./configure --prefix=%{_libdir}/openmpi
+%if %{with bundled_sundials}
+SETOPT_FLAGS=$(echo "%{optflags}" | sed -e
's/-Werror=format-security/-Wno-error=format-security/g')
+%make_build -C cvode-2.6.0 V=1 CC=mpicc CXX=mpic++ CXXFLAGS="$SETOPT_FLAGS
$warnings" CFLAGS="$SETOPT_FLAGS $warnings"
+%endif
+%make_build -C src V=1 CC=mpicc CXX=mpic++ CXXFLAGS="%{optflags} $warnings"
%{_openmpi_unload}
+
popd
+%endif
+
+%if 0%{with mpich}
+pushd mpich/bng2/Network3
+
+%{_mpich_load}
+sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' configure.ac
+%if %{with bundled_sundials}
+sed -i 's/AC_PROG_LIBTOOL/AM_PROG_AR\nLT_INIT/' cvode-2.6.0/configure.ac
+sed -i 's/muparser_.*//' configure.ac Makefile.am
+sed -i -r 's!(run_network_LDADD =).*!\1 libmathutils.la
../cvode-2.6.0/src/nvec_ser/libsundials_nvecserial.la
../cvode-2.6.0/src/cvode/libsundials_cvode.la -lmuparser!' src/Makefile.am
+%else
+sed -i 's/cvode-.*//; s/muparser_.*//' configure.ac Makefile.am
+sed -i -r 's/(run_network_LDADD =).*/\1 libmathutils.la -lmuparser
-lsundials_nvecserial -lsundials_cvode/' src/Makefile.am
+%endif
+
+autoreconf -iv --no-recursive
+
+warnings="-Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
-Wno-maybe-uninitialized"
+
+./configure --prefix=%{_libdir}/openmpi
+%if %{with bundled_sundials}
+SETOPT_FLAGS=$(echo "%{optflags}" | sed -e
's/-Werror=format-security/-Wno-error=format-security/g')
+%make_build -C cvode-2.6.0 V=1 CC=mpicc CXX=mpic++ CXXFLAGS="$SETOPT_FLAGS
$warnings" CFLAGS="$SETOPT_FLAGS $warnings"
+%endif
+%make_build -C src V=1 CC=mpicc CXX=mpic++ CXXFLAGS="%{optflags} $warnings"
+%{_mpich_unload}
+
+popd
+%endif
+
%install
-%make_install -C bng2/Network3/src
+%make_install -C bionetgen-BioNetGen-%{version}/bng2/Network3/src
mkdir -vp %{buildroot}%{perl_vendorlib}/BioNetGen
-cp -r bng2/Perl2 %{buildroot}%{perl_vendorlib}/BioNetGen/
-cp bng2/BNG2.pl %{buildroot}%{perl_vendorlib}/BioNetGen/
+cp -r bionetgen-BioNetGen-%{version}/bng2/Perl2 %{buildroot}%{perl_vendorlib}/BioNetGen/
+cp -r bionetgen-BioNetGen-%{version}/bng2/BNG2.pl
%{buildroot}%{perl_vendorlib}/BioNetGen/
+cp -a bionetgen-BioNetGen-%{version}/bng2/Models2
%{buildroot}%{perl_vendorlib}/BioNetGen/
+rm -f %{buildroot}%{perl_vendorlib}/BioNetGen/Models2/bin/run_network_%{_arch}-linux
+rm -f %{buildroot}%{perl_vendorlib}/BioNetGen/Models2/run_network
+
+%if 0%{with mpi}
+%{_openmpi_load}
+%make_install -C openmpi/bng2/Network3/src
+%{_openmpi_unload}
+%endif
+
+%if 0%{with mpich}
+%{_mpich_load}
+%make_install -C mpich/bng2/Network3/src
+%{_mpich_unload}
+%endif
+
+%check
+pushd bionetgen-BioNetGen-%{version}/bng2/Models2
+%ifarch %{arm}
+install -pm 755 ../Network3/src/run_network -D ./bin/run_network_armv7l-linux
+install -pm 755 ../Network3/src/run_network -D ../bin/run_network_armv7l-linux
+%else
+install -pm 755 ../Network3/src/run_network -D ./bin/run_network_%{_target_cpu}-linux
+install -pm 755 ../Network3/src/run_network -D ../bin/run_network_%{_target_cpu}-linux
+%endif
+echo "Running some tests ..."
+../BNG2.pl CaOscillate_Func.bngl CaOscillate_Sat.bngl catalysis.bngl egfr_net.bngl
egfr_net_red.bngl egfr_path.bngl energy_example1.bngl fceri_ji.bngl test_continue.bngl
+echo "Tests finished."
%files
-%license LICENSE
-%doc README.md bng2/CREDITS.txt bng2/CHANGES.txt bng2/VERSION
+%license bionetgen-BioNetGen-%{version}/LICENSE
+%doc bionetgen-BioNetGen-%{version}/README.md
bionetgen-BioNetGen-%{version}/bng2/CREDITS.txt
+%doc bionetgen-BioNetGen-%{version}/bng2/CHANGES.txt
bionetgen-BioNetGen-%{version}/bng2/VERSION
%{_bindir}/run_network
%files perl
-%{perl_vendorlib}/BioNetGen
+%{perl_vendorlib}/BioNetGen/
+
+%if 0%{with mpi}
+%files openmpi
+%license bionetgen-BioNetGen-%{version}/LICENSE
+%doc bionetgen-BioNetGen-%{version}/README.md
bionetgen-BioNetGen-%{version}/bng2/CREDITS.txt
+%doc bionetgen-BioNetGen-%{version}/bng2/CHANGES.txt
bionetgen-BioNetGen-%{version}/bng2/VERSION
+%{_libdir}/openmpi/bin/run_network
+%endif
+
+%if 0%{with mpich}
+%files mpich
+%license bionetgen-BioNetGen-%{version}/LICENSE
+%doc bionetgen-BioNetGen-%{version}/README.md
bionetgen-BioNetGen-%{version}/bng2/CREDITS.txt
+%doc bionetgen-BioNetGen-%{version}/bng2/CHANGES.txt
bionetgen-BioNetGen-%{version}/bng2/VERSION
+%{_libdir}/mpich/bin/run_network
+%endif
%changelog
+* Sat Apr 20 2019 Antonio Trande <sagitterATfedoraproject.org> - 2.4.0-5
+- Ready for MPI (disabled)
+- Bundle Sundials
+
* Wed Feb 13 2019 Orion Poplawski <orion(a)cora.nwra.com> - 2.4.0-4
- Rebuild for openmpi 3.1.3