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

Diff of /branches/fprops2/ascend.spec

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

trunk/ascend.spec revision 1608 by jpye, Thu Aug 30 01:31:05 2007 UTC branches/fprops2/ascend.spec revision 2844 by jpye, Thu Mar 5 01:42:51 2015 UTC
# Line 1  Line 1 
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  Name:       ascend
11  Summary:    ASCEND modelling environment  Summary:    ASCEND modelling environment
12  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.  
13  Release:    0%{?dist}  Release:    0%{?dist}
   
 %define disttar_name ascend-0.9.5.114  
   
14  License:    GPLv2+  License:    GPLv2+
15  Group:      Applications/Engineering  URL:        http://ascend4.org/
16  Source:     %{disttar_name}.tar.bz2  Source:     http://ascend4.org/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  
   
 #----------build dependencies------------  
17    
18  # ...general  #------ build dependencies -------
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
23  # removed version requirement for 2.0 on bison.  BuildRequires: gcc-gfortran >= 4
   
 %if 0%{?fedora_version}  
 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: tk-devel, tk, tcl-devel, tcl, tktable
27  BuildRequires: tk-devel, tk, tcl-devel, tcl, tktable  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  %else
 %if 0%{?suse_version}  
 BuildRequires: gcc-fortran gcc-c++  
 BuildRequires: sundials-devel >= 2.2.0  
 BuildRequires: blas  
36  BuildRequires: python-devel >= 2.4  BuildRequires: python-devel >= 2.4
37  BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable  BuildRequires: gcc-c++ >= 4
38  %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  
39  %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.  
40    
41  # ... documentation  # ... documentation
42  # 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 44  fields from Architecture to (computation
44  # when building from subversion are targets formats of the  # when building from subversion are targets formats of the
45  # documentation files not available.  # documentation files not available.
46    
47  #-----------runtime dependencies-----------  #------ runtime dependencies --------
48    Requires: blas%{?_isa}
49    Requires: sundials%{?_isa}
50    Requires: coin-or-Ipopt%{?_isa}
51    
52  # ...general  # ... pygtk
53  Requires: gtksourceview  Requires: python%{?_isa} >= 2.4
 Requires: blas  
 Requires: sundials  
 # ... is now packaged as a shared library  
   
 # ...pygtk  
 Requires: python >= 2.4  
54  Requires: pygtk2 >= 2.6  Requires: pygtk2 >= 2.6
55  Requires: pygtk2-libglade  #   ^...libglade is no longer required; we use gtk.Builder
56    
57  Requires: python-matplotlib  Requires: python-matplotlib
58  Requires: numpy  Requires: numpy
59  Requires: ipython  Requires: ipython
60    # ... syntax highlighting for gedit
61  # ...tcl/tk  Requires: gtksourceview3
 Requires: xgraph >= 11  
 Requires: tcl >= 8.3  
 Requires: tk >= 8.3  
 Requires: tktable < 2.10, tktable >= 2.8  
62    
63  # ... file association  # ... file association
64  Requires(post): desktop-file-utils shared-mime-info  #Requires(post): desktop-file-utils shared-mime-info
65  Requires(postun): desktop-file-utils shared-mime-info  #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  Provides: ascend-gui  language. Although ASCEND has primarily been developed by Chemical
71    Engineers, great care has been exercised to assure that it is
72  # for the moment we'll just make one big super-package, to keep things  domain independent. ASCEND can support modeling activities in
73  # simple for end-users.  fields from Architecture to (computational) Zoology.
   
 #%package -n ascend-python  
 #Version:    %{version}  
 #Summary:    PyGTK user interface for ASCEND  
 #Group:     Applications/Engineering  
 #  
 #%description -n ascend-python  
 #PyGTK user interface for ASCEND. This is a new interface that follows GNOME  
 #human interface guidelines as closely as possible. It does not as yet provide  
 #access to all of the ASCEND functionality provided by the Tcl/Tk interface.  
 #  
 #%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.  
   
 %package doc  
 Summary: Documentation for ASCEND  
 Group: Applications/Engineering  
 %description doc  
 Documentation for ASCEND, in the form of a PDF User's Manual.  
74    
75  %package devel  %package devel
76  Summary: Developer files ASCEND  Summary: ASCEND developer files
77  Group: Applications/Engineering  Requires: %{name} = %{version}-%{release}
 Requires: %{name}  
78  %description devel  %description devel
79  Developer files for ASCEND, in the form for C header files for the core  Developer files for ASCEND, in the form for C header files for the core
80  ASCEND library, 'libascend'.  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  %prep
89  %setup -q -n %{disttar_name}  %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  %build
93  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \  scons %{_smp_mflags} \
94      INSTALL_ROOT=%{buildroot} \      INSTALL_ROOT=%{buildroot} \
95      INSTALL_PREFIX=%{_prefix} \      INSTALL_PREFIX=%{_prefix} \
96      INSTALL_SHARE=%{_datadir} \      INSTALL_SHARE=%{_datadir} \
97      INSTALL_BIN=%{_bindir} \      INSTALL_BIN=%{_bindir} \
98      INSTALL_INCLUDE=%{_includedir} \      INSTALL_INCLUDE=%{_includedir} \
99      INSTALL_LIB=%{_libdir} \      INSTALL_LIB=%{_libdir} \
100      INSTALL_DOC=%{_docdir}/%{name}-%{version} \      INSTALL_DOC=%{_docdir}/%{name}-doc-%{version} \
101        DEBUG=1 \
102      WITH_DOC_BUILD=0 \      WITH_DOC_BUILD=0 \
103      WITH_DOC_INSTALL=0 \      WITH_DOC_INSTALL=0 \
104      WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \      WITH_TCLTK=0 \
105        WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT,DOPRI5,IPOPT \
106      ABSOLUTE_PATHS=1 \      ABSOLUTE_PATHS=1 \
107      %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \      %{?__cc:CC="%{?ccache} %__cc"} %{?__cxx:CXX="%{?ccache} %__cxx"} \
108      pygtk tcltk models solvers      ascend ascxx pygtk tcltk models solvers
109    
110  %install  %install
111  rm -rf %{buildroot}  scons install
 scons %{_smp_mflags} install  
112    
113  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition  # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
114  pushd pygtk/gnome  pushd pygtk/gnome
# Line 183  pushd pygtk/glade Line 123  pushd pygtk/glade
123  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
124  popd  popd
125    
126  pushd tools/gedit  # language file for use with gedit
127  install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  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  popd
146    
147  # TODO...  pushd %{buildroot}%{python2_sitearch}
148  #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'   for i in `find . -perm /644 -type f \( -name "*.so" -o -name "*.py" \)`; do
149  #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'   chmod a+x $i
150    done
 # Install menu entry for Tcl/Tk interface  
 pushd tcltk/gnome  
 install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop  
 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png  
 install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png  
151  popd  popd
152    
153  %clean  chmod a+x %{buildroot}/%{_libdir}/libascend.so.1.0
154  rm -rf %{buildroot}  
155    #for file in %{buildroot}%{johnpye}/fprops/test/{ph,sat,sat1,ideal}; do
156    #   chmod a+x $file
157    #done
158    
159  %post  %post
160  update-desktop-database  /sbin/ldconfig
161    update-desktop-database &> /dev/null || :
162  update-mime-database /usr/share/mime &> /dev/null || :  update-mime-database /usr/share/mime &> /dev/null || :
163    touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
164    
165  %postun  %postun
166  update-desktop-database  /sbin/ldconfig
167    update-desktop-database &> /dev/null || :
168  update-mime-database /usr/share/mime &> /dev/null || :  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  %files
176  %defattr(-, root, root)  %defattr(644,root,root)
177  %doc INSTALL.txt LICENSE.txt  %doc INSTALL.txt LICENSE.txt
178    
179  %{_bindir}/ascend-config  %defattr(644,root,root)
180  %{_datadir}/ascend/models  %{_libdir}/ascend/models
181  %{_datadir}/ascend/solvers  %{_libdir}/ascend/solvers
 %{_libdir}/libascend.so  
182  %{_datadir}/mime/packages/ascend.xml  %{_datadir}/mime/packages/ascend.xml
183  %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  %{gtksourceview_lang_file}
184  %{_datadir}/icons/text-x-ascend-model.svg  %{_datadir}/icons/text-x-ascend-model.svg
185    
186  # %package -n ascend-python  %defattr(755,root,root)
187  %{_bindir}/ascend  %{_libdir}/libascend.so.*
 %{_datadir}/ascend/*.py  
 %{_datadir}/ascend/*.py[co]  
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  %{_datadir}/ascend/glade
 %{_datadir}/ascend/_ascpy.so  
196  %{_datadir}/applications/ascend.desktop  %{_datadir}/applications/ascend.desktop
197  %{_datadir}/icons/ascend-app.png  %{_datadir}/icons/ascend-app.png
198  %{_datadir}/icons/hicolor/64x64/ascend.png  %{_datadir}/icons/hicolor/64x64/ascend.png
199    
200  # %package -n ascend-tcltk  # ...files python-fprops
201  %{_bindir}/ascend4  %defattr(755,root,root)
202  %{_datadir}/ascend/tcltk  %{python_sitearch}/_fprops.so
203  %{_libdir}/libascendtcl.so  %defattr(644,root,root)
204  %{_datadir}/applications/ascend4.desktop  %{python_sitearch}/fprops.py
205  %{_datadir}/icons/ascend4-app.png  %{python_sitearch}/fprops.py[oc]
 %{_datadir}/icons/hicolor/64x64/ascend4.png  
206    
207  %files devel  %files devel
208  %{_includedir}/compiler  %defattr(755,root,root)
209  %{_includedir}/general  %{_bindir}/ascend-config
210  %{_includedir}/utilities  %{_includedir}/ascend
211  %{_includedir}/solver  %{_libdir}/lib*.so
 %{_includedir}/linear  
 %{_includedir}/integrator  
 %{_includedir}/system  
212    
213  %files doc  %files doc
214    %defattr(644,root,root)
215  %doc doc/book.pdf  %doc doc/book.pdf
216    
217  %changelog  %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  * 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  - External libraries renamed to 'lib<name>_ascend.so' for clarity
240    and to solve a Windows-based naming problem.    and to solve a Windows-based naming problem.
241  - Links in Help menu fixed (problem with call to Python webbrowser component).  - Links in Help menu fixed (problem with call to Python webbrowser component).
242  - License re-tagged according to Fedora requirements.  - License re-tagged according to Fedora requirements.
243    
244  * 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
245  - solvers are now all built as separate shared libraries  - solvers are now all built as separate shared libraries
246  - mime-type icon added  - mime-type icon added
247  - 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 269  update-mime-database /usr/share/mime &>
269  * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>  * Mon Apr 24 2006 John Pye <john.pye@student.unsw.edu.au>
270  - Modified for removed dir in pygtk source hierachy  - Modified for removed dir in pygtk source hierachy
271    
272  * Thu Apr 04 2006 John Pye <john.pye@student.unsw.edu.au>  * Thu Apr 06 2006 John Pye <john.pye@student.unsw.edu.au>
273  - First RPM package for new SCons build  - First RPM package for new SCons build

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

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