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

Contents of /trunk/ascend.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


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

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