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

Contents of /trunk/ascend.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1519 - (show annotations) (download)
Thu Jun 28 15:04:00 2007 UTC (16 years, 5 months ago) by jpye
File size: 8247 byte(s)
Adding support for ASCENDSOLVERS env var, for defining location of the ASCEND solvers.
By default this will be /usr/share/ascend/solvers.
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 %description devel
142 Developer files for ASCEND, in the form for C header files for the core
143 ASCEND library, 'libascend'.
144
145 %prep
146 %setup -q -n %{disttar_name}
147
148 %build
149 scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \
150 INSTALL_ROOT=%{buildroot} \
151 INSTALL_PREFIX=%{_prefix} \
152 INSTALL_SHARE=%{_datadir} \
153 INSTALL_BIN=%{_bindir} \
154 INSTALL_INCLUDE=%{_includedir} \
155 INSTALL_LIB=%{_libdir} \
156 INSTALL_DOC=%{_docdir}/%{name}-%{version} \
157 WITH_DOC_BUILD=0 \
158 WITH_DOC_INSTALL=0 \
159 WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
160 ABSOLUTE_PATHS=1 \
161 %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
162 pygtk tcltk models
163
164 %install
165 rm -rf %{buildroot}
166 scons %{_smp_mflags} install
167
168 # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
169 pushd pygtk/gnome
170 install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop
171 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
172 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png
173 install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
174 popd
175 pushd tools/gedit
176 install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
177 popd
178
179 # TODO...
180 #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
181 #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
182
183 # Install menu entry for Tcl/Tk interface
184 pushd tcltk/gnome
185 install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
186 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
187 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
188 popd
189
190 %clean
191 rm -rf %{buildroot}
192
193 %post
194 update-desktop-database
195 update-mime-database /usr/share/mime &> /dev/null || :
196
197 %postun
198 update-desktop-database
199 update-mime-database /usr/share/mime &> /dev/null || :
200
201 %files
202 %defattr(-, root, root)
203 %doc INSTALL.txt LICENSE.txt
204
205 %{_bindir}/ascend-config
206 %{_datadir}/ascend/models
207 %{_datadir}/ascend/solvers
208 %{_libdir}/libascend.so
209 %{_datadir}/mime/packages/ascend.xml
210 %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
211
212 # %package -n ascend-python
213 %{_bindir}/ascend
214 %{_datadir}/ascend/*.py
215 %{_datadir}/ascend/*.py[co]
216
217 %{_datadir}/ascend/glade
218 %{_datadir}/ascend/_ascpy.so
219 %{_datadir}/applications/ascend.desktop
220 %{_datadir}/icons/ascend-app.png
221 %{_datadir}/icons/hicolor/64x64/ascend.png
222
223 # %package -n ascend-tcltk
224 %{_bindir}/ascend4
225 %{_datadir}/ascend/tcltk
226 %{_libdir}/libascendtcl.so
227 %{_datadir}/applications/ascend4.desktop
228 %{_datadir}/icons/ascend4-app.png
229 %{_datadir}/icons/hicolor/64x64/ascend4.png
230
231 %files devel
232 %{_includedir}/compiler
233 %{_includedir}/general
234 %{_includedir}/utilities
235 %{_includedir}/solver
236 %{_includedir}/linear
237 %{_includedir}/integrator
238 %{_includedir}/system
239
240 %files doc
241 %doc doc/book.pdf
242
243 %changelog
244 * Mon Apr 23 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
245 - solvers are now all built as separate shared libraries
246
247 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
248 - File ascend.lang has moved.
249 - book.pdf is included in package.
250 - some header files have been moved.
251
252 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
253 - Added CONOPT support
254
255 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
256 - Fixed fortran linking
257 - Removed ccache dependency
258 - Added xgraph dependency
259 - Added 'include' files plus 'ascend-config' script
260
261 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
262 - Add Tcl/Tk interface to GNOME menu
263
264 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
265 - Break out ascend-core, ascend-python and ascend-tcltk packages.
266
267 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
268 - Modified for removed dir in pygtk source hierachy
269
270 * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
271 - First RPM package for new SCons build

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