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

Contents of /trunk/ascend.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


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

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