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 |
johnpye |
804 |
BuildRequires: bison >= 2.0 |
27 |
johnpye |
794 |
BuildRequires: flex >= 2.5.4 |
28 |
johnpye |
446 |
BuildRequires: swig >= 1.3.24 |
29 |
jpye |
1514 |
|
30 |
|
|
%if %{defined fedora_version} |
31 |
|
|
BuildRequires: gcc-gfortran gcc-c++ >= 4 |
32 |
jpye |
1412 |
BuildRequires: blas-devel |
33 |
|
|
BuildRequires: sundials >= 2.2.0 |
34 |
|
|
BuildRequires: python-devel >= 2.4 |
35 |
johnpye |
987 |
BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3 |
36 |
johnpye |
794 |
BuildRequires: tktable < 2.10, tktable >= 2.8 |
37 |
jpye |
1514 |
%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 |
jpye |
1412 |
|
57 |
jpye |
1514 |
#BuildRequires: conopt >= 3.14 |
58 |
|
|
|
59 |
jpye |
1412 |
# ... GNOME |
60 |
johnpye |
446 |
BuildRequires: desktop-file-utils |
61 |
johnpye |
680 |
|
62 |
jpye |
1514 |
%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 |
jpye |
1441 |
# ... 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 |
jpye |
1412 |
#-----------runtime dependencies----------- |
83 |
johnpye |
446 |
|
84 |
jpye |
1412 |
# ...general |
85 |
|
|
Requires: gtksourceview |
86 |
|
|
Requires: blas |
87 |
|
|
# sundials will be statically linked |
88 |
jpye |
1514 |
Requires: desktop-file-utils shared-mime-info |
89 |
jpye |
1412 |
|
90 |
|
|
# ...pygtk |
91 |
johnpye |
440 |
Requires: python >= 2.4 |
92 |
johnpye |
562 |
Requires: pygtk2 >= 2.6 |
93 |
|
|
Requires: pygtk2-libglade |
94 |
|
|
Requires: python-matplotlib |
95 |
jpye |
1412 |
Requires: numpy |
96 |
|
|
Requires: ipython |
97 |
|
|
|
98 |
|
|
# ...tcl/tk |
99 |
johnpye |
655 |
Requires: xgraph >= 11 |
100 |
jpye |
1412 |
Requires: tcl >= 8.3 |
101 |
|
|
Requires: tk >= 8.3 |
102 |
|
|
Requires: tktable < 2.10, tktable >= 2.8 |
103 |
johnpye |
440 |
|
104 |
jpye |
1412 |
#------------------------------------------ |
105 |
johnpye |
439 |
|
106 |
jpye |
1412 |
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 |
johnpye |
555 |
#%package -n ascend-python |
112 |
jpye |
1514 |
#Version: %{version} |
113 |
johnpye |
555 |
#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 |
jpye |
1514 |
#Version: %{version} |
123 |
johnpye |
555 |
#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 |
jpye |
1514 |
%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 |
jpye |
1523 |
Requires: %{name} |
142 |
jpye |
1514 |
%description devel |
143 |
|
|
Developer files for ASCEND, in the form for C header files for the core |
144 |
|
|
ASCEND library, 'libascend'. |
145 |
|
|
|
146 |
johnpye |
439 |
%prep |
147 |
jpye |
1514 |
%setup -q -n %{disttar_name} |
148 |
johnpye |
439 |
|
149 |
|
|
%build |
150 |
johnpye |
795 |
scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \ |
151 |
johnpye |
676 |
INSTALL_ROOT=%{buildroot} \ |
152 |
|
|
INSTALL_PREFIX=%{_prefix} \ |
153 |
|
|
INSTALL_SHARE=%{_datadir} \ |
154 |
|
|
INSTALL_BIN=%{_bindir} \ |
155 |
|
|
INSTALL_INCLUDE=%{_includedir} \ |
156 |
jpye |
1514 |
INSTALL_LIB=%{_libdir} \ |
157 |
jpye |
1443 |
INSTALL_DOC=%{_docdir}/%{name}-%{version} \ |
158 |
|
|
WITH_DOC_BUILD=0 \ |
159 |
|
|
WITH_DOC_INSTALL=0 \ |
160 |
jpye |
1514 |
WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \ |
161 |
jpye |
1412 |
ABSOLUTE_PATHS=1 \ |
162 |
jpye |
1519 |
%{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \ |
163 |
jpye |
1514 |
pygtk tcltk models |
164 |
johnpye |
439 |
|
165 |
|
|
%install |
166 |
|
|
rm -rf %{buildroot} |
167 |
johnpye |
795 |
scons %{_smp_mflags} install |
168 |
johnpye |
439 |
|
169 |
johnpye |
651 |
# Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition |
170 |
johnpye |
532 |
pushd pygtk/gnome |
171 |
johnpye |
564 |
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 |
jpye |
1407 |
popd |
176 |
|
|
pushd tools/gedit |
177 |
johnpye |
564 |
install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang |
178 |
johnpye |
447 |
popd |
179 |
|
|
|
180 |
jpye |
1443 |
# 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 |
johnpye |
651 |
# 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 |
johnpye |
439 |
%clean |
192 |
|
|
rm -rf %{buildroot} |
193 |
|
|
|
194 |
johnpye |
448 |
%post |
195 |
|
|
update-desktop-database |
196 |
jpye |
1523 |
update-mime-database /usr/share/mime &> /dev/null || : |
197 |
johnpye |
448 |
|
198 |
|
|
%postun |
199 |
|
|
update-desktop-database |
200 |
jpye |
1523 |
update-mime-database /usr/share/mime &> /dev/null || : |
201 |
johnpye |
448 |
|
202 |
johnpye |
439 |
%files |
203 |
|
|
%defattr(-, root, root) |
204 |
johnpye |
561 |
%doc INSTALL.txt LICENSE.txt |
205 |
jpye |
1411 |
|
206 |
johnpye |
685 |
%{_bindir}/ascend-config |
207 |
johnpye |
557 |
%{_datadir}/ascend/models |
208 |
jpye |
1514 |
%{_datadir}/ascend/solvers |
209 |
johnpye |
554 |
%{_libdir}/libascend.so |
210 |
johnpye |
652 |
%{_datadir}/mime/packages/ascend.xml |
211 |
|
|
%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang |
212 |
johnpye |
554 |
|
213 |
johnpye |
555 |
# %package -n ascend-python |
214 |
johnpye |
439 |
%{_bindir}/ascend |
215 |
johnpye |
557 |
%{_datadir}/ascend/*.py |
216 |
jpye |
1449 |
%{_datadir}/ascend/*.py[co] |
217 |
|
|
|
218 |
johnpye |
557 |
%{_datadir}/ascend/glade |
219 |
johnpye |
562 |
%{_datadir}/ascend/_ascpy.so |
220 |
johnpye |
652 |
%{_datadir}/applications/ascend.desktop |
221 |
|
|
%{_datadir}/icons/ascend-app.png |
222 |
|
|
%{_datadir}/icons/hicolor/64x64/ascend.png |
223 |
johnpye |
439 |
|
224 |
johnpye |
555 |
# %package -n ascend-tcltk |
225 |
johnpye |
554 |
%{_bindir}/ascend4 |
226 |
|
|
%{_datadir}/ascend/tcltk |
227 |
|
|
%{_libdir}/libascendtcl.so |
228 |
johnpye |
652 |
%{_datadir}/applications/ascend4.desktop |
229 |
|
|
%{_datadir}/icons/ascend4-app.png |
230 |
|
|
%{_datadir}/icons/hicolor/64x64/ascend4.png |
231 |
johnpye |
448 |
|
232 |
jpye |
1514 |
%files devel |
233 |
johnpye |
794 |
%{_includedir}/compiler |
234 |
|
|
%{_includedir}/general |
235 |
|
|
%{_includedir}/utilities |
236 |
|
|
%{_includedir}/solver |
237 |
jpye |
1410 |
%{_includedir}/linear |
238 |
|
|
%{_includedir}/integrator |
239 |
jpye |
1411 |
%{_includedir}/system |
240 |
johnpye |
794 |
|
241 |
jpye |
1514 |
%files doc |
242 |
|
|
%doc doc/book.pdf |
243 |
|
|
|
244 |
johnpye |
439 |
%changelog |
245 |
jpye |
1514 |
* 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 |
jpye |
1412 |
* Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108 |
249 |
jpye |
1410 |
- File ascend.lang has moved. |
250 |
|
|
- book.pdf is included in package. |
251 |
|
|
- some header files have been moved. |
252 |
jpye |
1407 |
|
253 |
johnpye |
795 |
* Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au> |
254 |
|
|
- Added CONOPT support |
255 |
|
|
|
256 |
johnpye |
794 |
* 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 |
johnpye |
652 |
* Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au> |
263 |
|
|
- Add Tcl/Tk interface to GNOME menu |
264 |
|
|
|
265 |
johnpye |
554 |
* 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 |
johnpye |
532 |
* Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au> |
269 |
|
|
- Modified for removed dir in pygtk source hierachy |
270 |
|
|
|
271 |
johnpye |
439 |
* Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au> |
272 |
|
|
- First RPM package for new SCons build |