/[ascend]/trunk/ascend.spec
ViewVC logotype

Contents of /trunk/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1712 - (show annotations) (download)
Mon Jan 7 01:07:04 2008 UTC (10 years, 11 months ago) by jpye
File size: 9758 byte(s)
Added graphviz-devel build-time dependency for RPM build.
Fixed treatment of *_LIBS flags from command line in SCons.
1 Name: ascend
2 Summary: ASCEND modelling environment
3 Version: 0.9.5.114
4
5 # Use release 0.* so that other users can do patch releases with a higher number
6 # and still have the update occur automatically.
7 Release: 0%{?dist}
8
9 %define disttar_name ascend-0.9.5.114
10
11 License: GPLv2+
12 Group: Applications/Engineering
13 Source: %{disttar_name}.tar.bz2
14 URL: http://ascend.cheme.cmu.edu/
15
16 Prefix: %{_prefix}
17 Packager: John Pye
18 Vendor: Carnegie Mellon University
19
20 Buildroot: /var/tmp/%{name}-buildroot
21
22 #----------build dependencies------------
23
24 # ...general
25 BuildRequires: scons >= 0.96.92
26 BuildRequires: bison
27 BuildRequires: flex >= 2.5.4
28 BuildRequires: swig >= 1.3.24
29 # removed version requirement for 2.0 on bison.
30
31 %if 0%{?fedora_version}
32 BuildRequires: gcc-gfortran gcc-c++ >= 4
33 BuildRequires: blas-devel
34 BuildRequires: sundials-devel >= 2.2.0
35 BuildRequires: python-devel >= 2.4
36 BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable
37 BuildRequires: graphviz-devel
38 %else
39 %if 0%{?suse_version}
40 BuildRequires: gcc-fortran gcc-c++
41 BuildRequires: sundials-devel >= 2.2.0
42 BuildRequires: blas
43 BuildRequires: python-devel >= 2.4
44 BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable
45 BuildRequires: graphviz-devel
46 %if 0%{suse_version} == 1000
47 BuildRequires: xorg-x11-devel
48 %else
49 BuildRequires: xorg-x11-libX11-devel
50 %endif
51 %else
52 %if 0%{?mandriva_version}
53 BuildRequires: gcc-gfortran gcc-c++
54 BuildRequires: sundials-devel >= 2.2.0
55 BuildRequires: blas-devel python-devel tk tcl
56 %else
57 # xubuntu version is the fallback...
58 BuildRequires: g++-4.1 gfortran-4.1 libsundials-serial-dev python-dev tk8.3-dev tcl8.3-dev tktable
59 %endif
60 %endif
61 %endif
62
63 %define pyver %(python -c 'import sys ; print sys.version[:3]')
64 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
65 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
66
67 %{!?gtksourceview2: %define gtksourceview2 %(%{__python} -c 'from glob import glob; print len(glob("/usr/lib/libgtksourceview-2.0*"))')}
68
69 %if 0%{?gtksourceview2}
70 %define gtksourceview_lang_file %{_datadir}/gtksourceview-2.0/language-specs/ascend.lang
71 %else
72 %define gtksourceview_lang_file %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
73 %endif
74
75 Buildroot: /var/tmp/%{name}-buildroot
76
77 %description
78 ASCEND IV is both a large-scale object-oriented mathematical
79 modeling environment and a strongly typed mathematical modeling
80 language. Although ASCEND has primarily been developed by Chemical
81 Engineers, great care has been exercised to assure that it is
82 domain independent. ASCEND can support modeling activities in
83 fields from Architecture to (computational) Zoology.
84
85 # ... documentation
86 # There are no dependencies for documentation as the tarball
87 # will always contain documentation in compiled form. Only
88 # when building from subversion are targets formats of the
89 # documentation files not available.
90
91 #-----------runtime dependencies-----------
92
93 # ...general
94 Requires: gtksourceview
95 Requires: blas
96 Requires: sundials
97 # ... is now packaged as a shared library
98
99 # ...pygtk
100 Requires: python >= 2.4
101 Requires: pygtk2 >= 2.6
102 Requires: pygtk2-libglade
103 Requires: python-matplotlib
104 Requires: numpy
105 Requires: ipython
106
107 # ...tcl/tk
108 Requires: xgraph >= 11
109 Requires: tcl >= 8.3
110 Requires: tk >= 8.3
111 Requires: tktable < 2.10, tktable >= 2.8
112
113 # ... file association
114 Requires(post): desktop-file-utils shared-mime-info
115 Requires(postun): desktop-file-utils shared-mime-info
116
117
118 #------------------------------------------
119
120 Provides: ascend-gui
121
122 # for the moment we'll just make one big super-package, to keep things
123 # simple for end-users.
124
125 #%package -n ascend-python
126 #Version: %{version}
127 #Summary: PyGTK user interface for ASCEND
128 #Group: Applications/Engineering
129 #
130 #%description -n ascend-python
131 #PyGTK user interface for ASCEND. This is a new interface that follows GNOME
132 #human interface guidelines as closely as possible. It does not as yet provide
133 #access to all of the ASCEND functionality provided by the Tcl/Tk interface.
134 #
135 #%package -n ascend-tcltk
136 #Version: %{version}
137 #Summary: Tcl/Tk user interface for ASCEND
138 #Group: Applications/Engineering
139 #
140 #%description -n ascend-tcltk
141 #Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface
142 #and is a more complete and mature interface than the alternative PyGTK
143 #interface. Use this interface if you need to use ASCEND *.a4s files or other
144 #functionality not provided by the PyGTK interface.
145
146 %package doc
147 Summary: Documentation for ASCEND
148 Group: Applications/Engineering
149 %description doc
150 Documentation for ASCEND, in the form of a PDF User's Manual.
151
152 %package devel
153 Summary: Developer files ASCEND
154 Group: Applications/Engineering
155 Requires: %{name}
156 %description devel
157 Developer files for ASCEND, in the form for C header files for the core
158 ASCEND library, 'libascend'.
159
160 %prep
161 %setup -q -n %{disttar_name}
162
163 %build
164 scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \
165 INSTALL_ROOT=%{buildroot} \
166 INSTALL_PREFIX=%{_prefix} \
167 INSTALL_SHARE=%{_datadir} \
168 INSTALL_BIN=%{_bindir} \
169 INSTALL_INCLUDE=%{_includedir} \
170 INSTALL_LIB=%{_libdir} \
171 INSTALL_DOC=%{_docdir}/%{name}-%{version} \
172 WITH_DOC_BUILD=0 \
173 WITH_DOC_INSTALL=0 \
174 WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
175 ABSOLUTE_PATHS=1 \
176 %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
177 pygtk tcltk models solvers
178
179 %install
180 rm -rf %{buildroot}
181 scons %{_smp_mflags} install
182
183 # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
184 pushd pygtk/gnome
185 install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop
186 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
187 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png
188 install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
189 popd
190
191 # file-type icon for ascend models (double click should open in ASCEND)
192 pushd pygtk/glade
193 install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
194 popd
195
196 # language file for use with gedit
197 %if 0%{?gtksourceview2}
198 pushd tools/gtksourceview-2.0
199 install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
200 popd
201 %else
202 pushd tools/gedit
203 install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
204 popd
205 %endif
206
207 # TODO...
208 #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
209 #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
210
211 # Install menu entry for Tcl/Tk interface
212 pushd tcltk/gnome
213 install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
214 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
215 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
216 popd
217
218 %clean
219 rm -rf %{buildroot}
220
221 %post
222 update-desktop-database
223 update-mime-database /usr/share/mime &> /dev/null || :
224
225 %postun
226 update-desktop-database
227 update-mime-database /usr/share/mime &> /dev/null || :
228
229 %files
230 %defattr(-, root, root)
231 %doc INSTALL.txt LICENSE.txt
232
233 %{_bindir}/ascend-config
234 %{_datadir}/ascend/models
235 %{_datadir}/ascend/solvers
236 %{_libdir}/libascend.so
237 %{_datadir}/mime/packages/ascend.xml
238 %{gtksourceview_lang_file}
239 %{_datadir}/icons/text-x-ascend-model.svg
240
241 # %package -n ascend-python
242 %{_bindir}/ascend
243 %{_datadir}/ascend/*.py
244 %{_datadir}/ascend/*.py[co]
245
246 %{_datadir}/ascend/glade
247 %{_datadir}/ascend/_ascpy.so
248 %{_datadir}/applications/ascend.desktop
249 %{_datadir}/icons/ascend-app.png
250 %{_datadir}/icons/hicolor/64x64/ascend.png
251
252 # %package -n ascend-tcltk
253 %{_bindir}/ascend4
254 %{_datadir}/ascend/tcltk
255 %{_libdir}/libascendtcl.so
256 %{_datadir}/applications/ascend4.desktop
257 %{_datadir}/icons/ascend4-app.png
258 %{_datadir}/icons/hicolor/64x64/ascend4.png
259
260 %files devel
261 %{_includedir}/compiler
262 %{_includedir}/general
263 %{_includedir}/utilities
264 %{_includedir}/solver
265 %{_includedir}/linear
266 %{_includedir}/integrator
267 %{_includedir}/system
268
269 %files doc
270 %doc doc/book.pdf
271
272 %changelog
273 * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
274 - Minor fixes: error output.
275 - New 'air properties' model.
276 - GtkSourceView installed by Scons now.
277 - Added 'Incidence Graph' feature.
278
279 * Sun Aug 19 2007 John Pye <john.pye@anu.edu.au> 0.9.5.113
280 - External libraries renamed to 'lib<name>_ascend.so' for clarity
281 and to solve a Windows-based naming problem.
282 - Links in Help menu fixed (problem with call to Python webbrowser component).
283 - License re-tagged according to Fedora requirements.
284
285 * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
286 - solvers are now all built as separate shared libraries
287 - mime-type icon added
288 - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
289
290 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
291 - File ascend.lang has moved.
292 - book.pdf is included in package.
293 - some header files have been moved.
294
295 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
296 - Added CONOPT support
297
298 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
299 - Fixed fortran linking
300 - Removed ccache dependency
301 - Added xgraph dependency
302 - Added 'include' files plus 'ascend-config' script
303
304 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
305 - Add Tcl/Tk interface to GNOME menu
306
307 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
308 - Break out ascend-core, ascend-python and ascend-tcltk packages.
309
310 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
311 - Modified for removed dir in pygtk source hierachy
312
313 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
314 - First RPM package for new SCons build
315
316 # vim: set syntax=spec:
317

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22