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

Contents of /trunk/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1820 - (show annotations) (download)
Sat Aug 16 13:58:43 2008 UTC (15 years, 1 month ago) by jpye
File size: 9869 byte(s)
Fixed dtar to support separate debian.tar.gz file.
1 Name: ascend
2 Summary: ASCEND modelling environment
3 Version: 0.9.5.116
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.116
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 %{_datadir}/ascend/models
234 %{_datadir}/ascend/solvers
235 %{_libdir}/libascend.so
236 %{_datadir}/mime/packages/ascend.xml
237 %{gtksourceview_lang_file}
238 %{_datadir}/icons/text-x-ascend-model.svg
239
240 # %package -n ascend-python
241 %{_bindir}/ascend
242 %{_datadir}/ascend/*.py
243 %{_datadir}/ascend/*.py[co]
244
245 %{_datadir}/ascend/glade
246 %{_datadir}/ascend/_ascpy.so
247 %{_datadir}/applications/ascend.desktop
248 %{_datadir}/icons/ascend-app.png
249 %{_datadir}/icons/hicolor/64x64/ascend.png
250
251 # %package -n ascend-tcltk
252 %{_bindir}/ascend4
253 %{_datadir}/ascend/tcltk
254 %{_libdir}/libascendtcl.so
255 %{_datadir}/applications/ascend4.desktop
256 %{_datadir}/icons/ascend4-app.png
257 %{_datadir}/icons/hicolor/64x64/ascend4.png
258
259 %files devel
260 %{_bindir}/ascend-config
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 Jun 25 2008 John Pye <john.pye@anu.edu.au> 0.9.5.115
274 - New version
275 - Moved ascend-config to -devel pkg.
276
277 * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
278 - Minor fixes: error output.
279 - New 'air properties' model.
280 - GtkSourceView installed by Scons now.
281 - Added 'Incidence Graph' feature.
282
283 * Sun Aug 19 2007 John Pye <john.pye@anu.edu.au> 0.9.5.113
284 - External libraries renamed to 'lib<name>_ascend.so' for clarity
285 and to solve a Windows-based naming problem.
286 - Links in Help menu fixed (problem with call to Python webbrowser component).
287 - License re-tagged according to Fedora requirements.
288
289 * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
290 - solvers are now all built as separate shared libraries
291 - mime-type icon added
292 - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
293
294 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
295 - File ascend.lang has moved.
296 - book.pdf is included in package.
297 - some header files have been moved.
298
299 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
300 - Added CONOPT support
301
302 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
303 - Fixed fortran linking
304 - Removed ccache dependency
305 - Added xgraph dependency
306 - Added 'include' files plus 'ascend-config' script
307
308 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
309 - Add Tcl/Tk interface to GNOME menu
310
311 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
312 - Break out ascend-core, ascend-python and ascend-tcltk packages.
313
314 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
315 - Modified for removed dir in pygtk source hierachy
316
317 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
318 - First RPM package for new SCons build
319
320 # vim: set syntax=spec:
321

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