/[ascend]/branches/fprops2/ascend.spec
ViewVC logotype

Contents of /branches/fprops2/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2785 - (show annotations) (download)
Mon Jun 23 08:17:49 2014 UTC (5 years, 5 months ago) by jpye
Original Path: trunk/ascend.spec
File size: 10351 byte(s)
updating RPM spec for Fed20
1 Name: ascend
2 Summary: ASCEND modelling environment
3 Version: 0.9.9
4 Release: 0%{?dist}
5 License: GPLv2+
6 URL: http://ascend4.org/
7 Source: ascend-0.9.9.tar.bz2
8
9 # prevent filtering for 'provides' tagging of ASCEND models/solvers
10 %{?filter_setup:
11 %filter_provides_in %{_libdir}/ascend/models/.*\.so$
12 %filter_provides_in %{_libdir}/ascend/solvers/.*\.so$
13 %filter_setup
14 }
15
16 #------ build dependencies -------
17 BuildRequires: scons >= 0.96.92
18 BuildRequires: bison
19 BuildRequires: flex >= 2.5.4
20 BuildRequires: swig >= 1.3.24
21 BuildRequires: gcc-gfortran >= 4
22 BuildRequires: blas-devel
23 BuildRequires: sundials-devel >= 2.4.0
24 #BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable
25 BuildRequires: graphviz-devel
26 BuildRequires: desktop-file-utils
27 %if 0%{?fedora}
28 BuildRequires: python2-devel
29 BuildRequires: coin-or-Ipopt-devel >= 3.10
30 BuildRequires: MUMPS-devel
31 BuildRequires: lapack-devel
32 %else
33 BuildRequires: python-devel >= 2.4
34 BuildRequires: gcc-c++ >= 4
35 BuildRequires: ipopt-devel >= 3.10 or
36 %endif
37
38 # ... documentation
39 # There are no dependencies for documentation as the tarball
40 # will always contain documentation in compiled form. Only
41 # when building from subversion are targets formats of the
42 # documentation files not available.
43
44 #------ runtime dependencies --------
45 Requires: blas%{?_isa}
46 Requires: sundials%{?_isa}
47 Requires: coin-or-Ipopt%{?_isa}
48
49 # ...pygtk
50 Requires: python%{?_isa} >= 2.4
51 Requires: pygtk2 >= 2.6
52 # ^...libglade is no longer required; we use gtk.Builder
53 Requires: python-matplotlib
54 Requires: numpy
55 Requires: ipython
56 # syntax highlighting for gedit
57 Requires: gtksourceview3
58
59 # ... file association
60 #Requires(post): desktop-file-utils shared-mime-info
61 #Requires(postun): desktop-file-utils shared-mime-info
62
63 %{!?python2_sitearch: %define python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(pat_specific=1)")}
64 %define gtksourceview_lang_file %{_datadir}/gtksourceview-3.0/language-specs/ascend.lang
65
66 %description
67 ASCEND IV is both a large-scale object-oriented mathematical
68 modeling environment and a strongly typed mathematical modeling
69 language. Although ASCEND has primarily been developed by Chemical
70 Engineers, great care has been exercised to assure that it is
71 domain independent. ASCEND can support modeling activities in
72 fields from Architecture to (computational) Zoology.
73
74 # for the moment we'll just make one big super-package, to keep things
75 # simple for end-users.
76
77 %package devel
78 Summary: Developer files ASCEND
79 Requires: %{name}
80 %description devel
81 Developer files for ASCEND, in the form for C header files for the core
82 ASCEND library, 'libascend'.
83
84 %package doc
85 Summary: Documentation for ASCEND
86 %description doc
87 Documentation for ASCEND, in the form of a PDF User's Manual.
88
89 #%package -n libascend1
90 #Summary: Shared library for core ASCEND functionality
91 #%description -n libascend1
92 #Shared library for ASCEND, providing core functionality including compiler
93 #and solver API.
94
95 #%package -n ascend-python
96 #Version: %{version}
97 #Summary: PyGTK user interface for ASCEND
98 #
99 #%description -n ascend-python
100 #PyGTK user interface for ASCEND. This is a new interface that follows GNOME
101 #human interface guidelines as closely as possible. It does not as yet provide
102 #access to all of the ASCEND functionality provided by the Tcl/Tk interface.
103 #
104
105 #%package tcltk
106 #Summary: Tcl/Tk user interface for ASCEND
107 #Requires: xgraph >= 11
108 #Requires: tcl%{?_isa} >= 8.3
109 #Requires: tk%{?_isa} >= 8.3
110 #Requires: tktable < 2.10, tktable >= 2.8
111 #
112 #%description tcltk
113 #Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface
114 #and is a more complete and mature interface than the alternative PyGTK
115 #interface. Use this interface if you need to use ASCEND *.a4s files or other
116 #functionality not provided by the PyGTK interface.
117
118 %prep
119 %setup -q -n ascend-0.9.9
120
121 %build
122 scons %{_smp_mflags} \
123 INSTALL_ROOT=%{buildroot} \
124 INSTALL_PREFIX=%{_prefix} \
125 INSTALL_SHARE=%{_datadir} \
126 INSTALL_BIN=%{_bindir} \
127 INSTALL_INCLUDE=%{_includedir} \
128 INSTALL_LIB=%{_libdir} \
129 INSTALL_DOC=%{_docdir}/%{name}-doc-%{version} \
130 DEBUG=1 \
131 WITH_DOC_BUILD=0 \
132 WITH_DOC_INSTALL=0 \
133 WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT,DOPRI5,IPOPT \
134 ABSOLUTE_PATHS=1 \
135 %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
136 ascend ascxx pygtk tcltk models solvers
137
138 %install
139 scons install
140
141 # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
142 pushd pygtk/gnome
143 install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop
144 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
145 install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png
146 install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
147 popd
148
149 # file-type icon for ascend models (double click should open in ASCEND)
150 pushd pygtk/glade
151 install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
152 popd
153
154 # language file for use with gedit
155 pushd tools/gtksourceview-3.0
156 install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
157 popd
158
159 # Install menu entry for Tcl/Tk interface
160 #pushd tcltk/gnome
161 #install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
162 #install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
163 #install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
164 #popd
165
166 #/usr/lib/rpm/redhat/brp-strip-shared /usr/bin/strip
167
168 ##Tricks
169 # Fix .desktop files entries
170 desktop-file-install \
171 --set-icon=ascend-app \
172 --remove-key=Encoding \
173 %{buildroot}/%{_datadir}/applications/%{name}.desktop
174
175 #desktop-file-install \
176 # --set-icon=ascend4-app \
177 # --remove-key=Encoding \
178 # --set-key=Exec --set-value="env ASCENDTK=%{_datadir}/%{name}/tcltk %{name}4" \
179 #%{buildroot}/%{_datadir}/applications/%{name}4.desktop
180
181 # Fixed execute permission
182 pushd %{buildroot}/%{_libdir}
183 for i in `find . -perm /644 -type f \( -name "*.so" -o -name "*.sh" -o -name "*.py" \)`; do
184 chmod a+x $i
185 done
186 popd
187
188 pushd %{buildroot}%{python2_sitearch}
189 for i in `find . -perm /644 -type f \( -name "*.so" -o -name "*.py" \)`; do
190 chmod a+x $i
191 done
192 popd
193
194 chmod a+x %{buildroot}/%{_libdir}/libascend.so.1.0
195
196 for file in %{buildroot}%{johnpye}/fprops/test/{ph,sat,sat1,ideal}; do
197 chmod a+x $file
198 done
199
200 %post
201 /sbin/ldconfig
202 update-desktop-database &> /dev/null || :
203 update-mime-database /usr/share/mime &> /dev/null || :
204 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
205
206 %postun
207 /sbin/ldconfig
208 update-desktop-database &> /dev/null || :
209 update-mime-database /usr/share/mime &> /dev/null || :
210 touch --no-create %{_datadir}/icons/hicolor &>/dev/null
211 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
212
213 %posttrans
214 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
215
216 %files
217 %defattr(644,root,root)
218 %doc INSTALL.txt LICENSE.txt
219
220 %defattr(644,root,root)
221 %{_libdir}/ascend/models
222 %{_libdir}/ascend/solvers
223 %{_datadir}/mime/packages/ascend.xml
224 %{gtksourceview_lang_file}
225 %{_datadir}/icons/text-x-ascend-model.svg
226
227 #%files -n libascend1
228 %defattr(755,root,root)
229 %{_libdir}/libascend.so.*
230
231 # %package python
232 %defattr(755,root,root)
233 %{_bindir}/ascend
234 %{python_sitearch}/ascend/_ascpy.so
235 %defattr(644,root,root)
236 %{python_sitearch}/ascend/*.py
237 %{python_sitearch}/ascend/*.py[oc]
238 %{_datadir}/ascend/glade
239 %{_datadir}/applications/ascend.desktop
240 %{_datadir}/icons/ascend-app.png
241 %{_datadir}/icons/hicolor/64x64/ascend.png
242
243 # %package -n python-fprops
244 %defattr(755,root,root)
245 %{python_sitearch}/_fprops.so
246 %defattr(644,root,root)
247 %{python_sitearch}/fprops.py
248 %{python_sitearch}/fprops.py[oc]
249
250 #%files tcltk
251 #%defattr(755,root,root)
252 #%{_bindir}/ascend4
253 #%{_libdir}/libascendtcl.so
254 #%defattr(644,root,root)
255 #%{_datadir}/ascend/tcltk
256 #%{_datadir}/applications/ascend4.desktop
257 #%{_datadir}/icons/ascend4-app.png
258 #%{_datadir}/icons/hicolor/64x64/ascend4.png
259
260 %files devel
261 %defattr(755,root,root)
262 %{_bindir}/ascend-config
263 %{_includedir}/ascend
264 %{_libdir}/lib*.so
265
266 %files doc
267 %defattr(644,root,root)
268 %doc doc/book.pdf
269
270 %changelog
271 * Mon Jun 23 2014 John Pye <john.pye@anu.edu.au> 0.9.8
272 - Incorporating changes from Antonio Trande's official Fedora packaging
273 - See: http://pkgs.fedoraproject.org/cgit/ascend.git/tree/
274
275 * Wed Dec 12 2012 John Pye <john.pye@anu.edu.au> 0.9.8
276 - New version
277
278 * Thu Apr 30 2009 John Pye <john.pye@anu.edu.au> 0.9.6
279 - New version
280
281 * Wed Jun 25 2008 John Pye <john.pye@anu.edu.au> 0.9.5.115
282 - New version
283 - Moved ascend-config to -devel pkg.
284
285 * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
286 - Minor fixes: error output.
287 - New 'air properties' model.
288 - GtkSourceView installed by Scons now.
289 - Added 'Incidence Graph' feature.
290
291 * Sun Aug 19 2007 John Pye <john.pye@anu.edu.au> 0.9.5.113
292 - External libraries renamed to 'lib<name>_ascend.so' for clarity
293 and to solve a Windows-based naming problem.
294 - Links in Help menu fixed (problem with call to Python webbrowser component).
295 - License re-tagged according to Fedora requirements.
296
297 * Sun Jul 22 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
298 - solvers are now all built as separate shared libraries
299 - mime-type icon added
300 - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
301
302 * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
303 - File ascend.lang has moved.
304 - book.pdf is included in package.
305 - some header files have been moved.
306
307 * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
308 - Added CONOPT support
309
310 * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
311 - Fixed fortran linking
312 - Removed ccache dependency
313 - Added xgraph dependency
314 - Added 'include' files plus 'ascend-config' script
315
316 * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
317 - Add Tcl/Tk interface to GNOME menu
318
319 * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
320 - Break out ascend-core, ascend-python and ascend-tcltk packages.
321
322 * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
323 - Modified for removed dir in pygtk source hierachy
324
325 * Thu Apr 06 2006 John Pye <john.pye@student.unsw.edu.au>
326 - First RPM package for new SCons build
327
328 # vim: set syntax=spec:
329

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