# # @configure_input@ # # (NOTES) # # Firstly, libsbml.spec needs to be generated by running configure script. # By default, libxml2 is used for building libSBML. # To use expat or xerces instead of libxml2, run the configure script as follows: # # (expat) % ./configure --with-expat # (xerces) % ./configure --with-xerces # # If you want to use Doxygen and/or SWIG which is not installed in system path # (i.e., not installed in /usr ), then add --with-doxygen=/path/to/doxygen and/or # --with-swig=/path/to/swig when running the configure script. # # To create libSBML RPM packages, run rpmbuild command as follows: # (libsbml-@PACKAGE_VERSION@-src.zip needs to be located in SOURCES directory of your # RPM working directory.) # # % rpmbuild -ba libsbml.spec # # To create RPM packages of each language bindings, add the following --with XXXX # options when running rpmbuild command: # # (Java) --with java # (C#) --with csharp # (Python) --with python # (Ruby) --with ruby # (Perl) --with perl # (Octave) --with octave # # For example, the following command will create all subpackages: # # % rpmbuild -ba libsbml.spec --with java --with csharp --with python --with ruby \ # --with perl --with octave # %define xmlparser @XML_PARSER@ %define @XML_PARSER@ 1 %define name libsbml-%{xmlparser} %define version @PACKAGE_VERSION@ %define release 1 %define docdir doc/libsbml-%{version} Summary: libSBML: An API Library for SBML Name: %{name} Version: %{version} Release: %{release} Group: Development/Libraries Source: http://downloads.sourceforge.net/sbml/libsbml-%{version}-src.zip URL: http://sbml.org/Software/libSBML Packager: libSBML Team License: LGPL Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: check-devel >= 0.9.2 BuildRequires: zlib-devel, bzip2-devel %{?expat:BuildRequires: expat-devel >= 1.95.8} %{?libxml2:BuildRequires: libxml2-devel >= 2.6.16} %{?xerces:BuildRequires: xerces-c-devel } %{?_with_java:BuildRequires: jdk >= 1.5.0} %{?_with_python:BuildRequires: python-devel} %{?_with_ruby:BuildRequires: ruby-devel} %{?_with_perl:BuildRequires: perl} %{?_with_csharp:BuildRequires: mono-core} %{?_with_octave:BuildRequires: octave-devel >= 2.9.7} Requires: zlib Requires: bzip2 %{?expat:Requires: expat >= 1.95.8} %{?libxml2:Requires: libxml2 >= 2.6.16} %{?xerces:Requires: xerces-c } %{!?expat:Conflicts: libsbml-expat} %{!?libxml2:Conflicts: libsbml-libxml2} %{!?xerces:Conflicts: libsbml-xerces} %description LibSBML is an open-source programming library designed to help you read, write, manipulate, translate, and validate SBML files and data streams. It is not an application itself (though it does come with example programs), but rather a library you can embed in your own applications. LibSBML %{version} understands SBML Level 2 Version 4 or before, as well as the draft SBML Layout proposal by Gauges, Rost, Sahle and Wegner. It's written in ISO C and C++ but can also be used from Java, Python, Perl, Ruby, and Octave. ########################################################################### %package devel Summary: Libraries and header files to develop applications using libSBML Group: Development/Libraries Requires: %{name} = %{version}-%{release} %{!?expat:Conflicts: libsbml-expat-devel} %{!?libxml2:Conflicts: libsbml-libxml2-devel} %{!?xerces:Conflicts: libsbml-xerces-devel} %description devel The %{name}-devel package contains the libraries, include files and documentation to develop applications with libSBML. ########################################################################### %package java Summary: Libraries to develop applications using libSBML Java binding Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: jdk >= 1.5.0 %{!?expat:Conflicts: libsbml-expat-java} %{!?libxml2:Conflicts: libsbml-libxml2-java} %{!?xerces:Conflicts: libsbml-xerces-java} %description java The %{name}-java package contains the libraries to develop applications with libSBML Java bindings. ########################################################################### %package csharp Summary: Libraries to develop applications using libSBML C# binding Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: mono-core %{!?expat:Conflicts: libsbml-expat-csharp} %{!?libxml2:Conflicts: libsbml-libxml2-csharp} %{!?xerces:Conflicts: libsbml-xerces-csharp} %description csharp The %{name}-csharp package contains the libraries to develop applications with libSBML C# bindings. ########################################################################### %package python Summary: Libraries to develop applications using libSBML Python binding Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: python %{!?expat:Conflicts: libsbml-expat-python} %{!?libxml2:Conflicts: libsbml-libxml2-python} %{!?xerces:Conflicts: libsbml-xerces-python} %description python The %{name}-python package contains the libraries to develop applications with libSBML Python bindings. ########################################################################### %package perl Summary: Libraries to develop applications using libSBML Perl binding Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: perl %{!?expat:Conflicts: libsbml-expat-perl} %{!?libxml2:Conflicts: libsbml-libxml2-perl} %{!?xerces:Conflicts: libsbml-xerces-perl} %description perl The %{name}-perl package contains the libraries to develop applications with libSBML Perl bindings. ########################################################################### %package ruby Summary: Libraries to develop applications using libSBML Ruby binding Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: ruby %{!?expat:Conflicts: libsbml-expat-ruby} %{!?libxml2:Conflicts: libsbml-libxml2-ruby} %{!?xerces:Conflicts: libsbml-xerces-ruby} %description ruby The %{name}-ruby package contains the libraries to develop applications with libSBML Ruby bindings. ########################################################################### %package octave Summary: Libraries to develop applications using libSBML Octave binding Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} Requires: octave >= 2.9.7 %{!?expat:Conflicts: libsbml-expat-octave} %{!?libxml2:Conflicts: libsbml-libxml2-octave} %{!?xerces:Conflicts: libsbml-xerces-octave} %description octave The %{name}-octave package contains the libraries to develop applications with libSBML Octave bindings. ########################################################################### %prep %setup -q -n libsbml-%{version} %build rm -rf $RPM_BUILD_ROOT export CFLAGS="$RPM_OPT_FLAGS" %configure --with-%{xmlparser} --enable-layout --with-check --with-swig@SWIG_CONFIG_OPT@ \ --with-doxygen@DOXYGEN_CONFIG_OPT@ %{?_with_java: --with-java} %{?_with_csharp: --with-csharp} \ %{?_with_perl: --with-perl} %{?_with_ruby: --with-ruby} \ %{?_with_python: --with-python} %{?_with_octave: --with-octave} make make check make docs %install rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=$RPM_BUILD_ROOT make install-docs DESTDIR=$RPM_BUILD_ROOT rm ${RPM_BUILD_ROOT}/%{_libdir}/libsbml.so cp ${RPM_BUILD_ROOT}/%{_libdir}/libsbml.%{version}.so \ ${RPM_BUILD_ROOT}/%{_libdir}/libsbml.so %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS.txt README.txt COPYING.txt NEWS.txt %{_libdir}/libsbml.%{version}.so %{_libdir}/libsbml.so %files devel %defattr(-,root,root) %{_datadir}/%{docdir}/cpp-api/* %{_datadir}/%{docdir}/c-api/* %{_libdir}/libsbml.a %{_includedir}/* %{_libdir}/pkgconfig/libsbml.pc %{?_with_java:%files java } %{?_with_java:%{_datadir}/%{docdir}/java-api/* } %{?_with_java:%{_libdir}/libsbmlj.so } %{?_with_java:%{_libdir}/libsbmlj.jar} %{?_with_csharp:%files csharp } %{?_with_csharp:%{_libdir}/mono/* } %{?_with_python:%files python } %{?_with_python:%{_datadir}/%{docdir}/python-api/* } %{?_with_python:%{_libdir}/python*/* } %{?_with_perl:%files perl } %{?_with_perl:%{_datadir}/%{docdir}/perl-api/* } %{?_with_perl:%{_libdir}/perl5/* } %{?_with_ruby:%files ruby } %{?_with_ruby:%{_libdir}/ruby/* } %{?_with_octave:%files octave } %{?_with_octave:%{_libexecdir}/octave/* } %changelog * Tue May 26 2009 Akiya Jouraku - Initial import.