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

Contents of /trunk/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1525 - (show annotations) (download)
Mon Jul 2 13:51:40 2007 UTC (11 years, 11 months ago) by jpye
File size: 8482 byte(s)
Updating mime/application icons for RPM.
1 Name: ascend
2 Summary: ASCEND modelling environment
3 Version: 0.9.5.112
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: 0%{?dist}
8
9 %define disttar_name ascend-0.9.5.112
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
177 # file-type icon for ascend models (double click should open in ASCEND)
178 pushd pygtk/glade
179 install -m 644 -D ascend.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
180 popd
181
182 pushd tools/gedit
183 install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
184 popd
185
186 # TODO...
187 #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
188 #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
189
190 # Install menu entry for Tcl/Tk interface
191 pushd tcltk/gnome
192 install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
193 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
194 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
195 popd
196
197 %clean
198 rm -rf %{buildroot}
199
200 %post
201 update-desktop-database
202 update-mime-database /usr/share/mime &> /dev/null || :
203
204 %postun
205 update-desktop-database
206 update-mime-database /usr/share/mime &> /dev/null || :
207
208 %files
209 %defattr(-, root, root)
210 %doc INSTALL.txt LICENSE.txt
211
212 %{_bindir}/ascend-config
213 %{_datadir}/ascend/models
214 %{_datadir}/ascend/solvers
215 %{_libdir}/libascend.so
216 %{_datadir}/mime/packages/ascend.xml
217 %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
218 %{_datadir}/icons/text-x-ascend-model.svg
219
220 # %package -n ascend-python
221 %{_bindir}/ascend
222 %{_datadir}/ascend/*.py
223 %{_datadir}/ascend/*.py[co]
224
225 %{_datadir}/ascend/glade
226 %{_datadir}/ascend/_ascpy.so
227 %{_datadir}/applications/ascend.desktop
228 %{_datadir}/icons/ascend-app.png
229 %{_datadir}/icons/hicolor/64x64/ascend.png
230
231 # %package -n ascend-tcltk
232 %{_bindir}/ascend4
233 %{_datadir}/ascend/tcltk
234 %{_libdir}/libascendtcl.so
235 %{_datadir}/applications/ascend4.desktop
236 %{_datadir}/icons/ascend4-app.png
237 %{_datadir}/icons/hicolor/64x64/ascend4.png
238
239 %files devel
240 %{_includedir}/compiler
241 %{_includedir}/general
242 %{_includedir}/utilities
243 %{_includedir}/solver
244 %{_includedir}/linear
245 %{_includedir}/integrator
246 %{_includedir}/system
247
248 %files doc
249 %doc doc/book.pdf
250
251 %changelog
252 * Mon Apr 23 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
253 - solvers are now all built as separate shared libraries
254
255 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
256 - File ascend.lang has moved.
257 - book.pdf is included in package.
258 - some header files have been moved.
259
260 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
261 - Added CONOPT support
262
263 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
264 - Fixed fortran linking
265 - Removed ccache dependency
266 - Added xgraph dependency
267 - Added 'include' files plus 'ascend-config' script
268
269 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
270 - Add Tcl/Tk interface to GNOME menu
271
272 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
273 - Break out ascend-core, ascend-python and ascend-tcltk packages.
274
275 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
276 - Modified for removed dir in pygtk source hierachy
277
278 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
279 - First RPM package for new SCons build

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