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

Diff of /branches/fprops2/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1608 by jpye, Thu Aug 30 01:31:05 2007 UTC revision 2785 by jpye, Mon Jun 23 08:17:49 2014 UTC
# Line 1  Line 1 
1  Name:       ascend  Name:       ascend
2  Summary:    ASCEND modelling environment  Summary:    ASCEND modelling environment
3  Version:    0.9.5.114  Version:    0.9.9
   
 # Use release 0.* so that other users can do patch releases with a higher number  
 # and still have the update occur automatically.  
4  Release:    0%{?dist}  Release:    0%{?dist}
   
 %define disttar_name ascend-0.9.5.114  
   
5  License:    GPLv2+  License:    GPLv2+
6  Group:      Applications/Engineering  URL:        http://ascend4.org/
7  Source:     %{disttar_name}.tar.bz2  Source:     ascend-0.9.9.tar.bz2
 URL:        http://ascend.cheme.cmu.edu/  
   
 Prefix:     %{_prefix}  
 Packager:   John Pye  
 Vendor:     Carnegie Mellon University  
   
 Buildroot: /var/tmp/%{name}-buildroot  
8    
9  #----------build dependencies------------  # 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  # ...general  #------ build dependencies -------
17  BuildRequires: scons >= 0.96.92  BuildRequires: scons >= 0.96.92
18  BuildRequires: bison  BuildRequires: bison
19  BuildRequires: flex >= 2.5.4  BuildRequires: flex >= 2.5.4
20  BuildRequires: swig >= 1.3.24  BuildRequires: swig >= 1.3.24
21  # removed version requirement for 2.0 on bison.  BuildRequires: gcc-gfortran >= 4
   
 %if 0%{?fedora_version}  
 BuildRequires: gcc-gfortran gcc-c++ >= 4  
22  BuildRequires: blas-devel  BuildRequires: blas-devel
23  BuildRequires: sundials-devel >= 2.2.0  BuildRequires: sundials-devel >= 2.4.0
24  BuildRequires: python-devel >= 2.4  #BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable
25  BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable  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  %else
 %if 0%{?suse_version}  
 BuildRequires: gcc-fortran gcc-c++  
 BuildRequires: sundials-devel >= 2.2.0  
 BuildRequires: blas  
33  BuildRequires: python-devel >= 2.4  BuildRequires: python-devel >= 2.4
34  BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable  BuildRequires: gcc-c++ >= 4
35  %if 0%{suse_version} == 1000  BuildRequires: ipopt-devel >= 3.10 or
 BuildRequires: xorg-x11-devel  
 %else  
 BuildRequires: xorg-x11-libX11-devel  
 %endif  
 %else  
 %if 0%{?mandriva_version}  
 BuildRequires: gcc-gfortran gcc-c++  
 BuildRequires: sundials-devel >= 2.2.0  
 BuildRequires: blas-devel python-devel tk tcl  
 %else  
 # xubuntu version is the fallback...  
 BuildRequires: g++-4.1 gfortran-4.1 libsundials-serial-dev python-dev tk8.3-dev tcl8.3-dev tktable  
 %endif  
36  %endif  %endif
 %endif  
   
 %define pyver %(python -c 'import sys ; print sys.version[:3]')  
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}  
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}  
   
 Buildroot: /var/tmp/%{name}-buildroot  
   
 %description  
 ASCEND IV is both a large-scale object-oriented mathematical  
 modeling environment and a strongly typed mathematical modeling  
 language. Although ASCEND has primarily been developed by Chemical  
 Engineers, great care has been exercised to assure that it is  
 domain independent. ASCEND can support modeling activities in  
 fields from Architecture to (computational) Zoology.  
37    
38  # ... documentation  # ... documentation
39  # There are no dependencies for documentation as the tarball  # There are no dependencies for documentation as the tarball
# Line 78  fields from Architecture to (computation Line 41  fields from Architecture to (computation
41  # when building from subversion are targets formats of the  # when building from subversion are targets formats of the
42  # documentation files not available.  # documentation files not available.
43    
44  #-----------runtime dependencies-----------  #------ runtime dependencies --------
45    Requires: blas%{?_isa}
46  # ...general  Requires: sundials%{?_isa}
47  Requires: gtksourceview  Requires: coin-or-Ipopt%{?_isa}
 Requires: blas  
 Requires: sundials  
 # ... is now packaged as a shared library  
48    
49  # ...pygtk  # ...pygtk
50  Requires: python >= 2.4  Requires: python%{?_isa} >= 2.4
51  Requires: pygtk2 >= 2.6  Requires: pygtk2 >= 2.6
52  Requires: pygtk2-libglade  #         ^...libglade is no longer required; we use gtk.Builder
53  Requires: python-matplotlib  Requires: python-matplotlib
54  Requires: numpy  Requires: numpy
55  Requires: ipython  Requires: ipython
56    # syntax highlighting for gedit
57  # ...tcl/tk  Requires: gtksourceview3
 Requires: xgraph >= 11  
 Requires: tcl >= 8.3  
 Requires: tk >= 8.3  
 Requires: tktable < 2.10, tktable >= 2.8  
58    
59  # ... file association  # ... file association
60  Requires(post): desktop-file-utils shared-mime-info  #Requires(post): desktop-file-utils shared-mime-info
61  Requires(postun): desktop-file-utils shared-mime-info  #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  Provides: ascend-gui  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  # for the moment we'll just make one big super-package, to keep things
75  # simple for end-users.  # 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  #%package -n ascend-python
96  #Version:    %{version}  #Version:    %{version}
97  #Summary:    PyGTK user interface for ASCEND  #Summary:    PyGTK user interface for ASCEND
 #Group:     Applications/Engineering  
98  #  #
99  #%description -n ascend-python  #%description -n ascend-python
100  #PyGTK user interface for ASCEND. This is a new interface that follows GNOME  #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  #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.  #access to all of the ASCEND functionality provided by the Tcl/Tk interface.
103  #  #
104  #%package -n ascend-tcltk  
105  #Version:    %{version}  #%package tcltk
106  #Summary:    Tcl/Tk user interface for ASCEND  #Summary: Tcl/Tk user interface for ASCEND
107  #Group:     Applications/Engineering  #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 -n ascend-tcltk  #%description tcltk
113  #Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface  #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  #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  #interface. Use this interface if you need to use ASCEND *.a4s files or other
116  #functionality not provided by the PyGTK interface.  #functionality not provided by the PyGTK interface.
117    
 %package doc  
 Summary: Documentation for ASCEND  
 Group: Applications/Engineering  
 %description doc  
 Documentation for ASCEND, in the form of a PDF User's Manual.  
   
 %package devel  
 Summary: Developer files ASCEND  
 Group: Applications/Engineering  
 Requires: %{name}  
 %description devel  
 Developer files for ASCEND, in the form for C header files for the core  
 ASCEND library, 'libascend'.  
   
118  %prep  %prep
119  %setup -q -n %{disttar_name}  %setup -q -n ascend-0.9.9
120    
121  %build  %build
122  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \  scons %{_smp_mflags} \
123      INSTALL_ROOT=%{buildroot} \      INSTALL_ROOT=%{buildroot} \
124      INSTALL_PREFIX=%{_prefix} \      INSTALL_PREFIX=%{_prefix} \
125      INSTALL_SHARE=%{_datadir} \      INSTALL_SHARE=%{_datadir} \
126      INSTALL_BIN=%{_bindir} \      INSTALL_BIN=%{_bindir} \
127      INSTALL_INCLUDE=%{_includedir} \      INSTALL_INCLUDE=%{_includedir} \
128      INSTALL_LIB=%{_libdir} \      INSTALL_LIB=%{_libdir} \
129      INSTALL_DOC=%{_docdir}/%{name}-%{version} \      INSTALL_DOC=%{_docdir}/%{name}-doc-%{version} \
130        DEBUG=1 \
131      WITH_DOC_BUILD=0 \      WITH_DOC_BUILD=0 \
132      WITH_DOC_INSTALL=0 \      WITH_DOC_INSTALL=0 \
133      WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \      WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT,DOPRI5,IPOPT \
134      ABSOLUTE_PATHS=1 \      ABSOLUTE_PATHS=1 \
135      %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \      %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
136      pygtk tcltk models solvers      ascend ascxx pygtk tcltk models solvers
137    
138  %install  %install
139  rm -rf %{buildroot}  scons install
 scons %{_smp_mflags} install  
140    
141  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
142  pushd pygtk/gnome  pushd pygtk/gnome
# Line 183  pushd pygtk/glade Line 151  pushd pygtk/glade
151  install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg  install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
152  popd  popd
153    
154  pushd tools/gedit  # language file for use with gedit
155  install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  pushd tools/gtksourceview-3.0
156    install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
157  popd  popd
158    
 # TODO...  
 #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'  
 #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'  
   
159  # Install menu entry for Tcl/Tk interface  # Install menu entry for Tcl/Tk interface
160  pushd tcltk/gnome  #pushd tcltk/gnome
161  install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop  #install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
162  install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png  #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  #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  popd
193    
194  %clean  chmod a+x %{buildroot}/%{_libdir}/libascend.so.1.0
195  rm -rf %{buildroot}  
196    for file in %{buildroot}%{johnpye}/fprops/test/{ph,sat,sat1,ideal}; do
197       chmod a+x $file
198    done
199    
200  %post  %post
201  update-desktop-database  /sbin/ldconfig
202    update-desktop-database &> /dev/null || :
203  update-mime-database /usr/share/mime &> /dev/null || :  update-mime-database /usr/share/mime &> /dev/null || :
204    touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
205    
206  %postun  %postun
207  update-desktop-database  /sbin/ldconfig
208    update-desktop-database &> /dev/null || :
209  update-mime-database /usr/share/mime &> /dev/null || :  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  %files
217  %defattr(-, root, root)  %defattr(644,root,root)
218  %doc INSTALL.txt LICENSE.txt  %doc INSTALL.txt LICENSE.txt
219    
220  %{_bindir}/ascend-config  %defattr(644,root,root)
221  %{_datadir}/ascend/models  %{_libdir}/ascend/models
222  %{_datadir}/ascend/solvers  %{_libdir}/ascend/solvers
 %{_libdir}/libascend.so  
223  %{_datadir}/mime/packages/ascend.xml  %{_datadir}/mime/packages/ascend.xml
224  %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  %{gtksourceview_lang_file}
225  %{_datadir}/icons/text-x-ascend-model.svg  %{_datadir}/icons/text-x-ascend-model.svg
226    
227  # %package -n ascend-python  #%files -n libascend1
228  %{_bindir}/ascend  %defattr(755,root,root)
229  %{_datadir}/ascend/*.py  %{_libdir}/libascend.so.*
 %{_datadir}/ascend/*.py[co]  
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  %{_datadir}/ascend/glade
 %{_datadir}/ascend/_ascpy.so  
239  %{_datadir}/applications/ascend.desktop  %{_datadir}/applications/ascend.desktop
240  %{_datadir}/icons/ascend-app.png  %{_datadir}/icons/ascend-app.png
241  %{_datadir}/icons/hicolor/64x64/ascend.png  %{_datadir}/icons/hicolor/64x64/ascend.png
242    
243  # %package -n ascend-tcltk  # %package -n python-fprops
244  %{_bindir}/ascend4  %defattr(755,root,root)
245  %{_datadir}/ascend/tcltk  %{python_sitearch}/_fprops.so
246  %{_libdir}/libascendtcl.so  %defattr(644,root,root)
247  %{_datadir}/applications/ascend4.desktop  %{python_sitearch}/fprops.py
248  %{_datadir}/icons/ascend4-app.png  %{python_sitearch}/fprops.py[oc]
249  %{_datadir}/icons/hicolor/64x64/ascend4.png  
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  %files devel
261  %{_includedir}/compiler  %defattr(755,root,root)
262  %{_includedir}/general  %{_bindir}/ascend-config
263  %{_includedir}/utilities  %{_includedir}/ascend
264  %{_includedir}/solver  %{_libdir}/lib*.so
 %{_includedir}/linear  
 %{_includedir}/integrator  
 %{_includedir}/system  
265    
266  %files doc  %files doc
267    %defattr(644,root,root)
268  %doc doc/book.pdf  %doc doc/book.pdf
269    
270  %changelog  %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  * 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  - External libraries renamed to 'lib<name>_ascend.so' for clarity
293    and to solve a Windows-based naming problem.    and to solve a Windows-based naming problem.
294  - Links in Help menu fixed (problem with call to Python webbrowser component).  - Links in Help menu fixed (problem with call to Python webbrowser component).
295  - License re-tagged according to Fedora requirements.  - License re-tagged according to Fedora requirements.
296    
297  * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112  * 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  - solvers are now all built as separate shared libraries
299  - mime-type icon added  - mime-type icon added
300  - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.  - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
# Line 287  update-mime-database /usr/share/mime &> Line 322  update-mime-database /usr/share/mime &>
322  * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>  * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
323  - Modified for removed dir in pygtk source hierachy  - Modified for removed dir in pygtk source hierachy
324    
325  * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>  * Thu Apr 06 2006 John Pye <john.pye@student.unsw.edu.au>
326  - First RPM package for new SCons build  - First RPM package for new SCons build
327    
328    # vim: set syntax=spec:
329    

Legend:
Removed from v.1608  
changed lines
  Added in v.2785

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