/[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 2650 by jpye, Thu Dec 13 07:12:04 2012 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.8
4    
5  # Use release 0.* so that other users can do patch releases with a higher number  # Use release 0.* so that other users can do patch releases with a higher number
6  # and still have the update occur automatically.  # and still have the update occur automatically.
7  Release:    0%{?dist}  Release:    0%{?dist}
8    
 %define disttar_name ascend-0.9.5.114  
   
 License:    GPLv2+  
9  Group:      Applications/Engineering  Group:      Applications/Engineering
10  Source:     %{disttar_name}.tar.bz2  License:    GPLv2+
11  URL:        http://ascend.cheme.cmu.edu/  URL:        http://ascend.cheme.cmu.edu/
12    Source:     ascend-0.9.8.tar.bz2
13    
14  Prefix:     %{_prefix}  Prefix:     %{_prefix}
15  Packager:   John Pye  Packager:   John Pye
16  Vendor:     Carnegie Mellon University  Vendor:     Carnegie Mellon University
17    
18  Buildroot: /var/tmp/%{name}-buildroot  #------ build dependencies -------
   
 #----------build dependencies------------  
   
 # ...general  
19  BuildRequires: scons >= 0.96.92  BuildRequires: scons >= 0.96.92
20  BuildRequires: bison  BuildRequires: bison
21  BuildRequires: flex >= 2.5.4  BuildRequires: flex >= 2.5.4
22  BuildRequires: swig >= 1.3.24  BuildRequires: swig >= 1.3.24
 # removed version requirement for 2.0 on bison.  
   
 %if 0%{?fedora_version}  
23  BuildRequires: gcc-gfortran gcc-c++ >= 4  BuildRequires: gcc-gfortran gcc-c++ >= 4
24  BuildRequires: blas-devel  BuildRequires: blas-devel
25  BuildRequires: sundials-devel >= 2.2.0  BuildRequires: sundials-devel >= 2.4.0
26  BuildRequires: python-devel >= 2.4  BuildRequires: python-devel >= 2.4
27  BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable  BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable
28  %else  BuildRequires: graphviz-devel
 %if 0%{?suse_version}  
 BuildRequires: gcc-fortran gcc-c++  
 BuildRequires: sundials-devel >= 2.2.0  
 BuildRequires: blas  
 BuildRequires: python-devel >= 2.4  
 BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable  
 %if 0%{suse_version} == 1000  
 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  
 %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.  
29    
30  # ... documentation  # ... documentation
31  # 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 33  fields from Architecture to (computation
33  # when building from subversion are targets formats of the  # when building from subversion are targets formats of the
34  # documentation files not available.  # documentation files not available.
35    
36  #-----------runtime dependencies-----------  #------ runtime dependencies --------
37    Requires: blas%{?_isa}
38  # ...general  Requires: sundials%{?_isa}
 Requires: gtksourceview  
 Requires: blas  
 Requires: sundials  
 # ... is now packaged as a shared library  
39    
40  # ...pygtk  # ...pygtk
41  Requires: python >= 2.4  Requires: python%{?_isa} >= 2.4
42  Requires: pygtk2 >= 2.6  Requires: pygtk2 >= 2.6
43  Requires: pygtk2-libglade  Requires: pygtk2-libglade
44    # does this one get picked up automatically?
45  Requires: python-matplotlib  Requires: python-matplotlib
46  Requires: numpy  Requires: numpy
47  Requires: ipython  Requires: ipython
48    
 # ...tcl/tk  
 Requires: xgraph >= 11  
 Requires: tcl >= 8.3  
 Requires: tk >= 8.3  
 Requires: tktable < 2.10, tktable >= 2.8  
   
49  # ... file association  # ... file association
50  Requires(post): desktop-file-utils shared-mime-info  Requires(post): desktop-file-utils shared-mime-info
51  Requires(postun): desktop-file-utils shared-mime-info  Requires(postun): desktop-file-utils shared-mime-info
52    
53    # syntax highlighting for gedit
54    Requires: gtksourceview3
55    
56  #------------------------------------------  #------------------------------------------
57    
58  Provides: ascend-gui  Provides: ascend-gui
59    
60    %define pyver %(python -c 'import sys ; print sys.version[:3]')
61    %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=0)")}
62    %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(pat_specific=1)")}
63    %define gtksourceview_lang_file %{_datadir}/gtksourceview-3.0/language-specs/ascend.lang
64    
65    %{?filter_setup:
66    %filter_provides_in %{_libdir}/purple-2/.*\.so$
67    %filter_setup
68    }
69    
70    %description
71    ASCEND IV is both a large-scale object-oriented mathematical
72    modeling environment and a strongly typed mathematical modeling
73    language. Although ASCEND has primarily been developed by Chemical
74    Engineers, great care has been exercised to assure that it is
75    domain independent. ASCEND can support modeling activities in
76    fields from Architecture to (computational) Zoology.
77    
78  # 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
79  # simple for end-users.  # simple for end-users.
80    
81    %package devel
82    Summary: Developer files ASCEND
83    Group: Applications/Engineering
84    Requires: %{name}
85    %description devel
86    Developer files for ASCEND, in the form for C header files for the core
87    ASCEND library, 'libascend'.
88    
89    %package doc
90    Summary: Documentation for ASCEND
91    Group: Applications/Engineering
92    %description doc
93    Documentation for ASCEND, in the form of a PDF User's Manual.
94    
95    #%package -n libascend1
96    #Summary: Shared library for core ASCEND functionality
97    #Group: Applications/Engineering
98    #%description -n libascend1
99    #Shared library for ASCEND, providing core functionality including compiler
100    #and solver API.
101    
102  #%package -n ascend-python  #%package -n ascend-python
103  #Version:    %{version}  #Version:    %{version}
104  #Summary:    PyGTK user interface for ASCEND  #Summary:    PyGTK user interface for ASCEND
# Line 122  Provides: ascend-gui Line 109  Provides: ascend-gui
109  #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
110  #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.
111  #  #
 #%package -n ascend-tcltk  
 #Version:    %{version}  
 #Summary:    Tcl/Tk user interface for ASCEND  
 #Group:     Applications/Engineering  
 #  
 #%description -n ascend-tcltk  
 #Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface  
 #and is a more complete and mature interface than the alternative PyGTK  
 #interface. Use this interface if you need to use ASCEND *.a4s files or other  
 #functionality not provided by the PyGTK interface.  
112    
113  %package doc  %package tcltk
114  Summary: Documentation for ASCEND  Summary: Tcl/Tk user interface for ASCEND
115  Group: Applications/Engineering  Group: Applications/Engineering
116  %description doc  Requires: xgraph >= 11
117  Documentation for ASCEND, in the form of a PDF User's Manual.  Requires: tcl%{?_isa} >= 8.3
118    Requires: tk%{?_isa} >= 8.3
119    Requires: tktable < 2.10, tktable >= 2.8
120    
121  %package devel  %description tcltk
122  Summary: Developer files ASCEND  Tcl/Tk user interface for ASCEND. This is the original ASCEND IV interface
123  Group: Applications/Engineering  and is a more complete and mature interface than the alternative PyGTK
124  Requires: %{name}  interface. Use this interface if you need to use ASCEND *.a4s files or other
125  %description devel  functionality not provided by the PyGTK interface.
 Developer files for ASCEND, in the form for C header files for the core  
 ASCEND library, 'libascend'.  
126    
127  %prep  %prep
128  %setup -q -n %{disttar_name}  %setup -q -n ascend-0.9.8
129    
130  %build  %build
131  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \  scons %{_smp_mflags} \
132      INSTALL_ROOT=%{buildroot} \      INSTALL_ROOT=%{buildroot} \
133      INSTALL_PREFIX=%{_prefix} \      INSTALL_PREFIX=%{_prefix} \
134      INSTALL_SHARE=%{_datadir} \      INSTALL_SHARE=%{_datadir} \
135      INSTALL_BIN=%{_bindir} \      INSTALL_BIN=%{_bindir} \
136      INSTALL_INCLUDE=%{_includedir} \      INSTALL_INCLUDE=%{_includedir} \
137      INSTALL_LIB=%{_libdir} \      INSTALL_LIB=%{_libdir} \
138      INSTALL_DOC=%{_docdir}/%{name}-%{version} \      INSTALL_DOC=%{_docdir}/%{name}-doc-%{version} \
139        DEBUG=1 \
140      WITH_DOC_BUILD=0 \      WITH_DOC_BUILD=0 \
141      WITH_DOC_INSTALL=0 \      WITH_DOC_INSTALL=0 \
142      WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \      WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
143      ABSOLUTE_PATHS=1 \      ABSOLUTE_PATHS=1 \
144      %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \      %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
145      pygtk tcltk models solvers      ascend ascxx pygtk tcltk models solvers
146    
147  %install  %install
 rm -rf %{buildroot}  
148  scons %{_smp_mflags} install  scons %{_smp_mflags} install
149    
150  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
# Line 183  pushd pygtk/glade Line 160  pushd pygtk/glade
160  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
161  popd  popd
162    
163  pushd tools/gedit  # language file for use with gedit
164  install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  # FIXME gtksourceview-3.0?
165    pushd tools/gtksourceview-2.0
166    install -m 644 -D ascend.lang %{buildroot}/%{gtksourceview_lang_file}
167  popd  popd
168    
 # 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}")'  
   
169  # Install menu entry for Tcl/Tk interface  # Install menu entry for Tcl/Tk interface
170  pushd tcltk/gnome  pushd tcltk/gnome
171  install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop  install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
# Line 198  install -m 644 -D ascend4.png %{buildroo Line 173  install -m 644 -D ascend4.png %{buildroo
173  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
174  popd  popd
175    
176    /usr/lib/rpm/redhat/brp-strip-shared /usr/bin/strip
177    
178  %clean  %clean
179  rm -rf %{buildroot}  rm -rf %{buildroot}
180    
181  %post  %post
182    /sbin/ldconfig
183  update-desktop-database  update-desktop-database
184  update-mime-database /usr/share/mime &> /dev/null || :  update-mime-database /usr/share/mime &> /dev/null || :
185    
186  %postun  %postun
187    /sbin/ldconfig
188  update-desktop-database  update-desktop-database
189  update-mime-database /usr/share/mime &> /dev/null || :  update-mime-database /usr/share/mime &> /dev/null || :
190    
191  %files  %files
192  %defattr(-, root, root)  %defattr(644,root,root)
193  %doc INSTALL.txt LICENSE.txt  %doc INSTALL.txt LICENSE.txt
194    
195  %{_bindir}/ascend-config  %defattr(644,root,root)
196  %{_datadir}/ascend/models  %{_libdir}/ascend/models
197  %{_datadir}/ascend/solvers  %{_libdir}/ascend/solvers
 %{_libdir}/libascend.so  
198  %{_datadir}/mime/packages/ascend.xml  %{_datadir}/mime/packages/ascend.xml
199  %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  %{gtksourceview_lang_file}
200  %{_datadir}/icons/text-x-ascend-model.svg  %{_datadir}/icons/text-x-ascend-model.svg
201    
202  # %package -n ascend-python  #%files -n libascend1
203  %{_bindir}/ascend  %defattr(755,root,root)
204  %{_datadir}/ascend/*.py  %{_libdir}/libascend.so.*
 %{_datadir}/ascend/*.py[co]  
205    
206    # %package python
207    %defattr(755,root,root)
208    %{_bindir}/ascend
209    %{python_sitearch}/ascend/_ascpy.so
210    %defattr(644,root,root)
211    %{python_sitearch}/ascend/*.py
212    %{python_sitearch}/ascend/*.py[oc]
213  %{_datadir}/ascend/glade  %{_datadir}/ascend/glade
 %{_datadir}/ascend/_ascpy.so  
214  %{_datadir}/applications/ascend.desktop  %{_datadir}/applications/ascend.desktop
215  %{_datadir}/icons/ascend-app.png  %{_datadir}/icons/ascend-app.png
216  %{_datadir}/icons/hicolor/64x64/ascend.png  %{_datadir}/icons/hicolor/64x64/ascend.png
217    
218  # %package -n ascend-tcltk  # %package -n python-fprops
219    %defattr(755,root,root)
220    %{python_sitearch}/_fprops.so
221    %defattr(644,root,root)
222    %{python_sitearch}/fprops.py
223    %{python_sitearch}/fprops.py[oc]
224    
225    %files tcltk
226    %defattr(755,root,root)
227  %{_bindir}/ascend4  %{_bindir}/ascend4
 %{_datadir}/ascend/tcltk  
228  %{_libdir}/libascendtcl.so  %{_libdir}/libascendtcl.so
229    %defattr(644,root,root)
230    %{_datadir}/ascend/tcltk
231  %{_datadir}/applications/ascend4.desktop  %{_datadir}/applications/ascend4.desktop
232  %{_datadir}/icons/ascend4-app.png  %{_datadir}/icons/ascend4-app.png
233  %{_datadir}/icons/hicolor/64x64/ascend4.png  %{_datadir}/icons/hicolor/64x64/ascend4.png
234    
235  %files devel  %files devel
236  %{_includedir}/compiler  %defattr(755,root,root)
237  %{_includedir}/general  %{_bindir}/ascend-config
238  %{_includedir}/utilities  %{_includedir}/ascend
239  %{_includedir}/solver  %{_libdir}/lib*.so
 %{_includedir}/linear  
 %{_includedir}/integrator  
 %{_includedir}/system  
240    
241  %files doc  %files doc
242    %defattr(644,root,root)
243  %doc doc/book.pdf  %doc doc/book.pdf
244    
245  %changelog  %changelog
246    * Wed Dec 12 2012 John Pye <john.pye@anu.edu.au> 0.9.8
247    - New version
248    
249    * Thu Apr 30 2009 John Pye <john.pye@anu.edu.au> 0.9.6
250    - New version
251    
252    * Wed Jun 25 2008 John Pye <john.pye@anu.edu.au> 0.9.5.115
253    - New version
254    - Moved ascend-config to -devel pkg.
255    
256    * Wed Dec 26 2007 John Pye <john.pye@anu.edu.au> 0.9.5.114
257    - Minor fixes: error output.
258    - New 'air properties' model.
259    - GtkSourceView installed by Scons now.
260    - Added 'Incidence Graph' feature.
261    
262  * 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
263  - External libraries renamed to 'lib<name>_ascend.so' for clarity  - External libraries renamed to 'lib<name>_ascend.so' for clarity
264    and to solve a Windows-based naming problem.    and to solve a Windows-based naming problem.
# Line 289  update-mime-database /usr/share/mime &> Line 295  update-mime-database /usr/share/mime &>
295    
296  * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>  * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>
297  - First RPM package for new SCons build  - First RPM package for new SCons build
298    
299    # vim: set syntax=spec:
300    

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

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