File: libsbml.spec.in

package info (click to toggle)
libsbml 5.19.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 157,308 kB
  • sloc: cpp: 972,686; xml: 332,385; python: 128,188; cs: 57,289; ansic: 54,332; java: 27,244; makefile: 9,740; perl: 9,114; sh: 8,777; ruby: 4,760; javascript: 1,605; php: 202; csh: 3
file content (310 lines) | stat: -rw-r--r-- 10,756 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# @configure_input@
#
# Filename    : libsbml.spec.in
# Description : Template specification for RPM packages
# Author(s)   : SBML Team <sbml-team@googlegroups.com>
# Created     : 2009-05-26
# 
# <!--------------------------------------------------------------------------
# This file is part of libSBML.  Please visit http://sbml.org for more
# information about SBML, and the latest version of libSBML.
#
# Copyright (C) 2013-2017 jointly by the following organizations:
#     1. California Institute of Technology, Pasadena, CA, USA
#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
#     3. University of Heidelberg, Heidelberg, Germany
#
# Copyright (C) 2009-2013 jointly by the following organizations: 
#     1. California Institute of Technology, Pasadena, CA, USA
#     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
#  
# Copyright (C) 2006-2008 by the California Institute of Technology,
#     Pasadena, CA, USA 
#  
# Copyright (C) 2002-2005 jointly by the following organizations: 
#     1. California Institute of Technology, Pasadena, CA, USA
#     2. Japan Science and Technology Agency, Japan
# 
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation.  A copy of the license agreement is provided
# in the file named "LICENSE.txt" included with this software distribution
# and also available online as http://sbml.org/software/libsbml/license.html
# ---------------------------------------------------------------------- -->*/
#
# (NOTES)
#
# First, libsbml.spec needs to be generated by running the "configure" script.
# By default, libSBML tries to use the libxml2 XML parser library.  To use
# Expat or Xerces instead of libxml2, run the configure script as follows:
#
#   ./configure --with-expat   # for Expat
#   ./configure --with-xerces  # for Xerces
#
# To use a copy of Doxygen and/or SWIG that are not located on your shell's
# command search $path, add --with-doxygen=/path/to/doxygen/parent/dir and/or
# --with-swig=/path/to/swig/parent/dir when running the configure script.
#
# To create libSBML RPM packages, run the "rpmbuild" command as follows (where
# 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 options
# when running the rpmbuild command:
# 
#   --with csharp #  (C#)     
#   --with java   #  (Java)   
#   --with octave #  (Octave) 
#   --with perl   #  (Perl)   
#   --with python #  (Python) 
#   --with ruby   #  (Ruby)   
#
# For example, the following command will create a package with all the
# libSBML language interfaces enabled:
#
#  % rpmbuild -ba libsbml.spec --with java --with csharp --with python \
#             --with ruby --with perl --with octave 
#
# Note: libSBML also has a MATLAB interface, but this RPM package system
# doesn't build it yet because of how complicated it is to try to match
# up MATLAB versions.
#

%define xmlparser        @XML_PARSER@
%define @XML_PARSER@     1
%define name             libsbml-%{xmlparser}
%define major_version    @LIBSBML_MAJOR_VERSION@
%define minor_version    @LIBSBML_MINOR_VERSION@
%define revision_version @LIBSBML_REVISION_VERSION@
%define version          %{major_version}.%{minor_version}.%{revision_version}
%define package_version  @PACKAGE_VERSION@
%define release          1
%if @LIBSBML_BETA_VERSION@0
%define release          0.@LIBSBML_BETA_VERSION@
%endif
%define docdir           doc/libsbml-%{package_version}

Summary: libSBML: An API Library for SBML
Name: %{name}
Version: %{version}
Release: %{release}
Group: Development/Libraries
Source: http://downloads.sourceforge.net/sbml/libsbml-%{package_version}-src.tar.gz
URL: http://sbml.org/Software/libSBML
Packager: LibSBML Team <libsbml-team@googlegroups.com>
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 3 Version 1 and before, 
as well as the draft SBML Level 2 Layout proposal by Gauges, Rost, 
Sahle and Wegner.  It's written in ISO C and C++ but can also be 
used from C#, Java, MATLAB, Octave, Perl, Python, and Ruby.

###########################################################################

%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-%{package_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

%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 OLD_NEWS.txt NEWS.txt
%{_libdir}/libsbml.la
%{_libdir}/libsbml.so.4
%{_libdir}/libsbml.so.%{version}

%files devel
%defattr(-,root,root)
%{_datadir}/%{docdir}/cpp-api/*
%{_datadir}/%{docdir}/c-api/*
%{_libdir}/libsbml.so
%{_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:%{_datadir}/java/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

* Wed Jul 22 2009 Akiya Jouraku <jouraku@bio.keio.ac.jp>
- Initial import for libsbml-4 branch.