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

Annotation of /branches/fprops2/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1529 - (hide annotations) (download)
Thu Jul 5 08:19:02 2007 UTC (12 years, 5 months ago) by jpye
Original Path: trunk/ascend.spec
File size: 8630 byte(s)
Making build of IPOPT dependent on config test.
1 johnpye 439 Name: ascend
2 johnpye 601 Summary: ASCEND modelling environment
3 jpye 1514 Version: 0.9.5.112
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 jpye 1514 %define disttar_name ascend-0.9.5.112
10    
11 johnpye 439 License: GPL
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 johnpye 987 BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3
37 johnpye 794 BuildRequires: tktable < 2.10, tktable >= 2.8
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     BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3
45     BuildRequires: tktable < 2.10, tktable >= 2.8
46     %else
47 jpye 1527 %if 0%{?mandriva_version}
48 jpye 1514 BuildRequires: gcc-gfortran gcc-c++
49 jpye 1526 BuildRequires: sundials-devel >= 2.2.0
50 jpye 1514 BuildRequires: blas-devel python-devel tk tcl
51     %else
52     # xubuntu version is the fallback...
53     BuildRequires: g++-4.1 gfortran-4.1 libsundials-serial-dev python-dev tk8.3-dev tcl8.3-dev tktable
54     %endif
55     %endif
56     %endif
57 jpye 1412
58 jpye 1514 #BuildRequires: conopt >= 3.14
59    
60 jpye 1412 # ... GNOME
61 johnpye 446 BuildRequires: desktop-file-utils
62 johnpye 680
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     Buildroot: /var/tmp/%{name}-buildroot
68    
69     %description
70     ASCEND IV is both a large-scale object-oriented mathematical
71     modeling environment and a strongly typed mathematical modeling
72     language. Although ASCEND has primarily been developed by Chemical
73     Engineers, great care has been exercised to assure that it is
74     domain independent. ASCEND can support modeling activities in
75     fields from Architecture to (computational) Zoology.
76    
77 jpye 1441 # ... documentation
78     # There are no dependencies for documentation as the tarball
79     # will always contain documentation in compiled form. Only
80     # when building from subversion are targets formats of the
81     # documentation files not available.
82    
83 jpye 1412 #-----------runtime dependencies-----------
84 johnpye 446
85 jpye 1412 # ...general
86     Requires: gtksourceview
87     Requires: blas
88     # sundials will be statically linked
89 jpye 1514 Requires: desktop-file-utils shared-mime-info
90 jpye 1412
91     # ...pygtk
92 johnpye 440 Requires: python >= 2.4
93 johnpye 562 Requires: pygtk2 >= 2.6
94     Requires: pygtk2-libglade
95     Requires: python-matplotlib
96 jpye 1412 Requires: numpy
97     Requires: ipython
98    
99     # ...tcl/tk
100 johnpye 655 Requires: xgraph >= 11
101 jpye 1412 Requires: tcl >= 8.3
102     Requires: tk >= 8.3
103     Requires: tktable < 2.10, tktable >= 2.8
104 johnpye 440
105 jpye 1412 #------------------------------------------
106 johnpye 439
107 jpye 1412 Provides: ascend-gui
108    
109     # for the moment we'll just make one big super-package, to keep things
110     # simple for end-users.
111    
112 johnpye 555 #%package -n ascend-python
113 jpye 1514 #Version: %{version}
114 johnpye 555 #Summary: PyGTK user interface for ASCEND
115     #Group: Applications/Engineering
116     #
117     #%description -n ascend-python
118     #PyGTK user interface for ASCEND. This is a new interface that follows GNOME
119     #human interface guidelines as closely as possible. It does not as yet provide
120     #access to all of the ASCEND functionality provided by the Tcl/Tk interface.
121     #
122     #%package -n ascend-tcltk
123 jpye 1514 #Version: %{version}
124 johnpye 555 #Summary: Tcl/Tk user interface for ASCEND
125     #Group: Applications/Engineering
126     #
127     #%description -n ascend-tcltk
128     #Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface
129     #and is a more complete and mature interface than the alternative PyGTK
130     #interface. Use this interface if you need to use ASCEND *.a4s files or other
131     #functionality not provided by the PyGTK interface.
132    
133 jpye 1514 %package doc
134     Summary: Documentation for ASCEND
135     Group: Applications/Engineering
136     %description doc
137     Documentation for ASCEND, in the form of a PDF User's Manual.
138    
139     %package devel
140     Summary: Developer files ASCEND
141     Group: Applications/Engineering
142 jpye 1523 Requires: %{name}
143 jpye 1514 %description devel
144     Developer files for ASCEND, in the form for C header files for the core
145     ASCEND library, 'libascend'.
146    
147 johnpye 439 %prep
148 jpye 1514 %setup -q -n %{disttar_name}
149 johnpye 439
150     %build
151 johnpye 795 scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \
152 johnpye 676 INSTALL_ROOT=%{buildroot} \
153     INSTALL_PREFIX=%{_prefix} \
154     INSTALL_SHARE=%{_datadir} \
155     INSTALL_BIN=%{_bindir} \
156     INSTALL_INCLUDE=%{_includedir} \
157 jpye 1514 INSTALL_LIB=%{_libdir} \
158 jpye 1443 INSTALL_DOC=%{_docdir}/%{name}-%{version} \
159     WITH_DOC_BUILD=0 \
160     WITH_DOC_INSTALL=0 \
161 jpye 1514 WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
162 jpye 1412 ABSOLUTE_PATHS=1 \
163 jpye 1519 %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
164 jpye 1529 pygtk tcltk models solvers
165 johnpye 439
166     %install
167     rm -rf %{buildroot}
168 johnpye 795 scons %{_smp_mflags} install
169 johnpye 439
170 johnpye 651 # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
171 johnpye 532 pushd pygtk/gnome
172 johnpye 564 install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop
173     install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
174     install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png
175     install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
176 jpye 1407 popd
177 jpye 1525
178     # file-type icon for ascend models (double click should open in ASCEND)
179     pushd pygtk/glade
180 jpye 1529 install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
181 jpye 1525 popd
182    
183 jpye 1407 pushd tools/gedit
184 johnpye 564 install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
185 johnpye 447 popd
186    
187 jpye 1443 # TODO...
188     #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
189     #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
190    
191 johnpye 651 # Install menu entry for Tcl/Tk interface
192     pushd tcltk/gnome
193     install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
194     install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
195     install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
196     popd
197    
198 johnpye 439 %clean
199     rm -rf %{buildroot}
200    
201 johnpye 448 %post
202     update-desktop-database
203 jpye 1523 update-mime-database /usr/share/mime &> /dev/null || :
204 johnpye 448
205     %postun
206     update-desktop-database
207 jpye 1523 update-mime-database /usr/share/mime &> /dev/null || :
208 johnpye 448
209 johnpye 439 %files
210     %defattr(-, root, root)
211 johnpye 561 %doc INSTALL.txt LICENSE.txt
212 jpye 1411
213 johnpye 685 %{_bindir}/ascend-config
214 johnpye 557 %{_datadir}/ascend/models
215 jpye 1514 %{_datadir}/ascend/solvers
216 johnpye 554 %{_libdir}/libascend.so
217 johnpye 652 %{_datadir}/mime/packages/ascend.xml
218     %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
219 jpye 1525 %{_datadir}/icons/text-x-ascend-model.svg
220 johnpye 554
221 johnpye 555 # %package -n ascend-python
222 johnpye 439 %{_bindir}/ascend
223 johnpye 557 %{_datadir}/ascend/*.py
224 jpye 1449 %{_datadir}/ascend/*.py[co]
225    
226 johnpye 557 %{_datadir}/ascend/glade
227 johnpye 562 %{_datadir}/ascend/_ascpy.so
228 johnpye 652 %{_datadir}/applications/ascend.desktop
229     %{_datadir}/icons/ascend-app.png
230     %{_datadir}/icons/hicolor/64x64/ascend.png
231 johnpye 439
232 johnpye 555 # %package -n ascend-tcltk
233 johnpye 554 %{_bindir}/ascend4
234     %{_datadir}/ascend/tcltk
235     %{_libdir}/libascendtcl.so
236 johnpye 652 %{_datadir}/applications/ascend4.desktop
237     %{_datadir}/icons/ascend4-app.png
238     %{_datadir}/icons/hicolor/64x64/ascend4.png
239 johnpye 448
240 jpye 1514 %files devel
241 johnpye 794 %{_includedir}/compiler
242     %{_includedir}/general
243     %{_includedir}/utilities
244     %{_includedir}/solver
245 jpye 1410 %{_includedir}/linear
246     %{_includedir}/integrator
247 jpye 1411 %{_includedir}/system
248 johnpye 794
249 jpye 1514 %files doc
250     %doc doc/book.pdf
251    
252 johnpye 439 %changelog
253 jpye 1526 * Mon Jul 02 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
254 jpye 1514 - solvers are now all built as separate shared libraries
255 jpye 1526 - mime-type icon added
256     - build-time dependences allow building on more different distros
257 jpye 1514
258 jpye 1412 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
259 jpye 1410 - File ascend.lang has moved.
260     - book.pdf is included in package.
261     - some header files have been moved.
262 jpye 1407
263 johnpye 795 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
264     - Added CONOPT support
265    
266 johnpye 794 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
267     - Fixed fortran linking
268     - Removed ccache dependency
269     - Added xgraph dependency
270     - Added 'include' files plus 'ascend-config' script
271    
272 johnpye 652 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
273     - Add Tcl/Tk interface to GNOME menu
274    
275 johnpye 554 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
276     - Break out ascend-core, ascend-python and ascend-tcltk packages.
277    
278 johnpye 532 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
279     - Modified for removed dir in pygtk source hierachy
280    
281 johnpye 439 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
282     - First RPM package for new SCons build

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