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

Contents of /trunk/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

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