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