/[ascend]/branches/fprops2/ascend.spec
ViewVC logotype

Annotation of /branches/fprops2/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2150 - (hide annotations) (download)
Tue Feb 16 06:08:57 2010 UTC (9 years, 9 months ago) by mahesh
Original Path: trunk/ascend.spec
File size: 9781 byte(s)
Bump trunk to 0.9.8.
Some work on detection of SUNDIALS on Linux (will need to be reviewed on Windows).
Update DistTar for smoother building of tarball, less stray deps.
1 johnpye 439 Name: ascend
2 johnpye 601 Summary: ASCEND modelling environment
3 mahesh 2150 Version: 0.9.8
4 johnpye 439
5 johnpye 656 # Use release 0.* so that other users can do patch releases with a higher number
6 johnpye 657 # and still have the update occur automatically.
7 jpye 1412 Release: 0%{?dist}
8 johnpye 439
9 mahesh 2150 %define disttar_name ascend-0.9.8
10 jpye 1514
11 jpye 1596 License: GPLv2+
12 johnpye 555 Group: Applications/Engineering
13 jpye 1514 Source: %{disttar_name}.tar.bz2
14 johnpye 601 URL: http://ascend.cheme.cmu.edu/
15 johnpye 439
16     Prefix: %{_prefix}
17 johnpye 547 Packager: John Pye
18     Vendor: Carnegie Mellon University
19 johnpye 439
20 jpye 1443 Buildroot: /var/tmp/%{name}-buildroot
21    
22 jpye 1412 #----------build dependencies------------
23    
24     # ...general
25     BuildRequires: scons >= 0.96.92
26 jpye 1529 BuildRequires: bison
27 johnpye 794 BuildRequires: flex >= 2.5.4
28 johnpye 446 BuildRequires: swig >= 1.3.24
29 jpye 1529 # removed version requirement for 2.0 on bison.
30 jpye 1514
31 jpye 1527 %if 0%{?fedora_version}
32 jpye 1514 BuildRequires: gcc-gfortran gcc-c++ >= 4
33 jpye 1412 BuildRequires: blas-devel
34 jpye 1526 BuildRequires: sundials-devel >= 2.2.0
35 jpye 1412 BuildRequires: python-devel >= 2.4
36 jpye 1576 BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable
37 jpye 1712 BuildRequires: graphviz-devel
38 jpye 1514 %else
39 jpye 1527 %if 0%{?suse_version}
40 jpye 1514 BuildRequires: gcc-fortran gcc-c++
41 jpye 1526 BuildRequires: sundials-devel >= 2.2.0
42 jpye 1514 BuildRequires: blas
43     BuildRequires: python-devel >= 2.4
44 jpye 1545 BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable
45 jpye 1712 BuildRequires: graphviz-devel
46 jpye 1545 %if 0%{suse_version} == 1000
47     BuildRequires: xorg-x11-devel
48 jpye 1514 %else
49 jpye 1545 BuildRequires: xorg-x11-libX11-devel
50     %endif
51     %else
52 jpye 1527 %if 0%{?mandriva_version}
53 jpye 1514 BuildRequires: gcc-gfortran gcc-c++
54 jpye 1526 BuildRequires: sundials-devel >= 2.2.0
55 jpye 1514 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 jpye 1412
63 jpye 1514 %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 jpye 1691 %{!?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 jpye 1514 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 jpye 1441 # ... 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 jpye 1412 #-----------runtime dependencies-----------
92 johnpye 446
93 jpye 1412 # ...general
94     Requires: gtksourceview
95     Requires: blas
96 jpye 1604 Requires: sundials
97     # ... is now packaged as a shared library
98 jpye 1412
99     # ...pygtk
100 johnpye 440 Requires: python >= 2.4
101 johnpye 562 Requires: pygtk2 >= 2.6
102     Requires: pygtk2-libglade
103     Requires: python-matplotlib
104 jpye 1412 Requires: numpy
105     Requires: ipython
106    
107     # ...tcl/tk
108 johnpye 655 Requires: xgraph >= 11
109 jpye 1412 Requires: tcl >= 8.3
110     Requires: tk >= 8.3
111     Requires: tktable < 2.10, tktable >= 2.8
112 johnpye 440
113 jpye 1601 # ... file association
114     Requires(post): desktop-file-utils shared-mime-info
115     Requires(postun): desktop-file-utils shared-mime-info
116    
117    
118 jpye 1412 #------------------------------------------
119 johnpye 439
120 jpye 1412 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 johnpye 555 #%package -n ascend-python
126 jpye 1514 #Version: %{version}
127 johnpye 555 #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 jpye 1514 #Version: %{version}
137 johnpye 555 #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 jpye 1514 %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 jpye 1523 Requires: %{name}
156 jpye 1514 %description devel
157     Developer files for ASCEND, in the form for C header files for the core
158     ASCEND library, 'libascend'.
159    
160 johnpye 439 %prep
161 jpye 1514 %setup -q -n %{disttar_name}
162 johnpye 439
163     %build
164 jpye 2030 scons %{_smp_mflags} \
165 johnpye 676 INSTALL_ROOT=%{buildroot} \
166     INSTALL_PREFIX=%{_prefix} \
167     INSTALL_SHARE=%{_datadir} \
168     INSTALL_BIN=%{_bindir} \
169     INSTALL_INCLUDE=%{_includedir} \
170 jpye 1514 INSTALL_LIB=%{_libdir} \
171 jpye 1930 INSTALL_DOC=%{_docdir}/%{name}-doc-%{version} \
172 jpye 1443 WITH_DOC_BUILD=0 \
173     WITH_DOC_INSTALL=0 \
174 jpye 1514 WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
175 jpye 1412 ABSOLUTE_PATHS=1 \
176 jpye 1519 %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
177 jpye 1529 pygtk tcltk models solvers
178 johnpye 439
179     %install
180     rm -rf %{buildroot}
181 johnpye 795 scons %{_smp_mflags} install
182 johnpye 439
183 johnpye 651 # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
184 johnpye 532 pushd pygtk/gnome
185 johnpye 564 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 jpye 1407 popd
190 jpye 1525
191     # file-type icon for ascend models (double click should open in ASCEND)
192     pushd pygtk/glade
193 jpye 1529 install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
194 jpye 1525 popd
195    
196 jpye 1691 # language file for use with gedit
197     %if 0%{?gtksourceview2}
198     pushd tools/gtksourceview-2.0
199 jpye 1693 install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
200 jpye 1691 popd
201     %else
202     pushd tools/gedit
203 jpye 1693 install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
204 jpye 1691 popd
205     %endif
206    
207 jpye 1443 # 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 johnpye 651 # 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 johnpye 439 %clean
219     rm -rf %{buildroot}
220    
221 johnpye 448 %post
222     update-desktop-database
223 jpye 1523 update-mime-database /usr/share/mime &> /dev/null || :
224 johnpye 448
225     %postun
226     update-desktop-database
227 jpye 1523 update-mime-database /usr/share/mime &> /dev/null || :
228 johnpye 448
229 johnpye 439 %files
230     %defattr(-, root, root)
231 johnpye 561 %doc INSTALL.txt LICENSE.txt
232 jpye 1411
233 jpye 2018 %{_libdir}/libascend.so.*
234     %{_libdir}/ascend/models
235     %{_libdir}/ascend/solvers
236 johnpye 652 %{_datadir}/mime/packages/ascend.xml
237 jpye 1691 %{gtksourceview_lang_file}
238 jpye 1525 %{_datadir}/icons/text-x-ascend-model.svg
239 johnpye 554
240 johnpye 555 # %package -n ascend-python
241 johnpye 439 %{_bindir}/ascend
242 jpye 2030 %{python_sitelib}/ascend/_ascpy.so
243     %{python_sitelib}/ascend/*.py
244     %{python_sitelib}/ascend/*.py[oc]
245 johnpye 557 %{_datadir}/ascend/glade
246 johnpye 652 %{_datadir}/applications/ascend.desktop
247     %{_datadir}/icons/ascend-app.png
248     %{_datadir}/icons/hicolor/64x64/ascend.png
249 johnpye 439
250 johnpye 555 # %package -n ascend-tcltk
251 johnpye 554 %{_bindir}/ascend4
252     %{_datadir}/ascend/tcltk
253     %{_libdir}/libascendtcl.so
254 johnpye 652 %{_datadir}/applications/ascend4.desktop
255     %{_datadir}/icons/ascend4-app.png
256     %{_datadir}/icons/hicolor/64x64/ascend4.png
257 johnpye 448
258 jpye 1514 %files devel
259 jpye 1795 %{_bindir}/ascend-config
260 jpye 2018 %{_includedir}/ascend
261     %{_libdir}/lib*.so
262 johnpye 794
263 jpye 1514 %files doc
264     %doc doc/book.pdf
265    
266 johnpye 439 %changelog
267 jpye 2029 * Thu Apr 30 2009 John Pye <john.pye@anu.edu.au> 0.9.6
268     - New version
269    
270 jpye 1815 * 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 jpye 1691 * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
275 jpye 1609 - Minor fixes: error output.
276     - New 'air properties' model.
277 jpye 1691 - GtkSourceView installed by Scons now.
278     - Added 'Incidence Graph' feature.
279 jpye 1609
280 jpye 1604 * 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 jpye 1545 * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
287 jpye 1514 - solvers are now all built as separate shared libraries
288 jpye 1526 - mime-type icon added
289 jpye 1545 - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
290 jpye 1514
291 jpye 1412 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
292 jpye 1410 - File ascend.lang has moved.
293     - book.pdf is included in package.
294     - some header files have been moved.
295 jpye 1407
296 johnpye 795 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
297     - Added CONOPT support
298    
299 johnpye 794 * 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 johnpye 652 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
306     - Add Tcl/Tk interface to GNOME menu
307    
308 johnpye 554 * 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 johnpye 532 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
312     - Modified for removed dir in pygtk source hierachy
313    
314 johnpye 439 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
315     - First RPM package for new SCons build
316 jpye 1693
317     # vim: set syntax=spec:
318    

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