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

Contents of /trunk/ascend.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


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

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