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

Contents of /trunk/ascend.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2030 - (show annotations) (download)
Fri May 1 05:02:37 2009 UTC (9 years, 7 months ago) by jpye
File size: 9795 byte(s)
Packaging fixes for Fedora.
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 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} \
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}-doc-%{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 %{_libdir}/libascend.so.*
234 %{_libdir}/ascend/models
235 %{_libdir}/ascend/solvers
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 %{python_sitelib}/ascend/_ascpy.so
243 %{python_sitelib}/ascend/*.py
244 %{python_sitelib}/ascend/*.py[oc]
245 %{_datadir}/ascend/glade
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 %{_bindir}/ascend-config
260 %{_includedir}/ascend
261 %{_libdir}/lib*.so
262
263 %files doc
264 %doc doc/book.pdf
265
266 %changelog
267 * Thu Apr 30 2009 John Pye <john.pye@anu.edu.au> 0.9.6
268 - New version
269
270 * Wed Jun 25 2008 John Pye <john.pye@anu.edu.au> 0.9.5.115
271 - New version
272 - Moved ascend-config to -devel pkg.
273
274 * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
275 - Minor fixes: error output.
276 - New 'air properties' model.
277 - GtkSourceView installed by Scons now.
278 - Added 'Incidence Graph' feature.
279
280 * Sun Aug 19 2007 John Pye <john.pye@anu.edu.au> 0.9.5.113
281 - External libraries renamed to 'lib<name>_ascend.so' for clarity
282 and to solve a Windows-based naming problem.
283 - Links in Help menu fixed (problem with call to Python webbrowser component).
284 - License re-tagged according to Fedora requirements.
285
286 * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
287 - solvers are now all built as separate shared libraries
288 - mime-type icon added
289 - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
290
291 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
292 - File ascend.lang has moved.
293 - book.pdf is included in package.
294 - some header files have been moved.
295
296 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
297 - Added CONOPT support
298
299 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
300 - Fixed fortran linking
301 - Removed ccache dependency
302 - Added xgraph dependency
303 - Added 'include' files plus 'ascend-config' script
304
305 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
306 - Add Tcl/Tk interface to GNOME menu
307
308 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
309 - Break out ascend-core, ascend-python and ascend-tcltk packages.
310
311 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
312 - Modified for removed dir in pygtk source hierachy
313
314 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
315 - First RPM package for new SCons build
316
317 # vim: set syntax=spec:

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