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

Diff of /trunk/ascend.spec

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

revision 602 by johnpye, Fri May 12 14:45:41 2006 UTC revision 1529 by jpye, Thu Jul 5 08:19:02 2007 UTC
# Line 1  Line 1 
1  Name:       ascend  Name:       ascend
2  Summary:    ASCEND modelling environment  Summary:    ASCEND modelling environment
3  Version:    0.9.5.91  Version:    0.9.5.112
4    
5  # Use release "0" so that distro-released versions will override ours.  # Use release 0.* so that other users can do patch releases with a higher number
6  Release:    0.jdpipe  # and still have the update occur automatically.
7    Release:    0%{?dist}
8    
9    %define disttar_name ascend-0.9.5.112
10    
11  License:    GPL  License:    GPL
12  Group:      Applications/Engineering  Group:      Applications/Engineering
13  Source:     ascend.tar.bz2  Source:     %{disttar_name}.tar.bz2
14  URL:        http://ascend.cheme.cmu.edu/  URL:        http://ascend.cheme.cmu.edu/
15    
16  Prefix:     %{_prefix}  Prefix:     %{_prefix}
17  Packager:   John Pye  Packager:   John Pye
18  Vendor:     Carnegie Mellon University  Vendor:     Carnegie Mellon University
 BuildRoot:  %{_tmppath}/%{name}-%{version}-root  
19    
20  BuildRequires: python >= 2.4, python-devel  Buildroot: /var/tmp/%{name}-buildroot
21  BuildRequires: scons >= 0.96.1  
22  BuildRequires: bison, flex  #----------build dependencies------------
23    
24    # ...general
25    BuildRequires: scons >= 0.96.92
26    BuildRequires: bison
27    BuildRequires: flex >= 2.5.4
28  BuildRequires: swig >= 1.3.24  BuildRequires: swig >= 1.3.24
29  BuildRequires: desktop-file-utils  # removed version requirement for 2.0 on bison.
30  BuildRequires: tk-devel < 8.5  
31  BuildRequires: tcl-devel < 8.5  %if 0%{?fedora_version}
32    BuildRequires: gcc-gfortran gcc-c++ >= 4
33    BuildRequires: blas-devel
34    BuildRequires: sundials-devel >= 2.2.0
35    BuildRequires: python-devel >= 2.4
36    BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3
37    BuildRequires: tktable < 2.10, tktable >= 2.8
38    %else
39    %if 0%{?suse_version}
40    BuildRequires: gcc-fortran gcc-c++
41    BuildRequires: sundials-devel >= 2.2.0
42    BuildRequires: blas
43    BuildRequires: python-devel >= 2.4
44    BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3
45  BuildRequires: tktable < 2.10, tktable >= 2.8  BuildRequires: tktable < 2.10, tktable >= 2.8
46  BuildRequires: ccache  %else
47    %if 0%{?mandriva_version}
48    BuildRequires: gcc-gfortran gcc-c++
49    BuildRequires: sundials-devel >= 2.2.0
50    BuildRequires: blas-devel python-devel tk tcl
51    %else
52    # xubuntu version is the fallback...
53    BuildRequires: g++-4.1 gfortran-4.1 libsundials-serial-dev python-dev tk8.3-dev tcl8.3-dev tktable
54    %endif
55    %endif
56    %endif
57    
58  Requires: python >= 2.4  #BuildRequires: conopt >= 3.14
59  Requires: pygtk2 >= 2.6  
60  Requires: pygtk2-libglade  # ... GNOME
61  Requires: python-matplotlib  BuildRequires: desktop-file-utils
62  Requires: python-numeric  
63  Requires: gtksourceview  %define pyver %(python -c 'import sys ; print sys.version[:3]')
64    %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
65    %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
66    
67    Buildroot: /var/tmp/%{name}-buildroot
68    
69  %description  %description
70  ASCEND IV is both a large-scale object-oriented mathematical  ASCEND IV is both a large-scale object-oriented mathematical
# Line 40  Engineers, great care has been exercised Line 74  Engineers, great care has been exercised
74  domain independent. ASCEND can support modeling activities in  domain independent. ASCEND can support modeling activities in
75  fields from Architecture to (computational) Zoology.  fields from Architecture to (computational) Zoology.
76    
77    # ... documentation
78    # There are no dependencies for documentation as the tarball
79    # will always contain documentation in compiled form. Only
80    # when building from subversion are targets formats of the
81    # documentation files not available.
82    
83    #-----------runtime dependencies-----------
84    
85    # ...general
86    Requires: gtksourceview
87    Requires: blas
88    # sundials will be statically linked
89    Requires: desktop-file-utils shared-mime-info
90    
91    # ...pygtk
92    Requires: python >= 2.4
93    Requires: pygtk2 >= 2.6
94    Requires: pygtk2-libglade
95    Requires: python-matplotlib
96    Requires: numpy
97    Requires: ipython
98    
99    # ...tcl/tk
100    Requires: xgraph >= 11
101    Requires: tcl >= 8.3
102    Requires: tk >= 8.3
103    Requires: tktable < 2.10, tktable >= 2.8
104    
105    #------------------------------------------
106    
107    Provides: ascend-gui
108    
109    # for the moment we'll just make one big super-package, to keep things
110    # simple for end-users.
111    
112  #%package -n ascend-python  #%package -n ascend-python
113  #Version:    0.9.5.91  #Version:    %{version}
114  #Summary:    PyGTK user interface for ASCEND  #Summary:    PyGTK user interface for ASCEND
115  #Group:     Applications/Engineering  #Group:     Applications/Engineering
116  #  #
# Line 51  fields from Architecture to (computation Line 120  fields from Architecture to (computation
120  #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.
121  #  #
122  #%package -n ascend-tcltk  #%package -n ascend-tcltk
123  #Version:    0.9.5.91  #Version:    %{version}
124  #Summary:    Tcl/Tk user interface for ASCEND  #Summary:    Tcl/Tk user interface for ASCEND
125  #Group:     Applications/Engineering  #Group:     Applications/Engineering
126  #  #
# Line 61  fields from Architecture to (computation Line 130  fields from Architecture to (computation
130  #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
131  #functionality not provided by the PyGTK interface.  #functionality not provided by the PyGTK interface.
132    
133    %package doc
134    Summary: Documentation for ASCEND
135    Group: Applications/Engineering
136    %description doc
137    Documentation for ASCEND, in the form of a PDF User's Manual.
138    
139    %package devel
140    Summary: Developer files ASCEND
141    Group: Applications/Engineering
142    Requires: %{name}
143    %description devel
144    Developer files for ASCEND, in the form for C header files for the core
145    ASCEND library, 'libascend'.
146    
147  %prep  %prep
148  %setup -q -n ascend  %setup -q -n %{disttar_name}
149    
150  %build  %build
151  scons %{?_smp_mflags} CC="ccache gcc" CXX="ccache g++" DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models INSTALL_ROOT=%{buildroot} INSTALL_PREFIX=%{_prefix} INSTALL_DATA=%{_datadir} INSTALL_BIN=%{_bindir} INSTALL_INCLUDE=%{_incdir} WITH_PYTHON=1 WITH_TCLTK=1 TCL=/usr TCL_LIB=tcl8.4 TK_LIB=tk8.4  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \
152        INSTALL_ROOT=%{buildroot} \
153        INSTALL_PREFIX=%{_prefix} \
154        INSTALL_SHARE=%{_datadir} \
155        INSTALL_BIN=%{_bindir} \
156        INSTALL_INCLUDE=%{_includedir} \
157        INSTALL_LIB=%{_libdir} \
158        INSTALL_DOC=%{_docdir}/%{name}-%{version} \
159        WITH_DOC_BUILD=0 \
160        WITH_DOC_INSTALL=0 \
161        WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
162        ABSOLUTE_PATHS=1 \
163        %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
164        pygtk tcltk models solvers
165    
166  %install  %install
167  rm -rf %{buildroot}  rm -rf %{buildroot}
168  scons %{?_smp_mflags} CC="ccache gcc" CXX="ccache g++" DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models INSTALL_ROOT=%{buildroot} INSTALL_PREFIX=%{_prefix} INSTALL_DATA=%{_datadir} INSTALL_BIN=%{_bindir} INSTALL_INCLUDE=%{_incdir} WITH_PYTHON=1 WITH_TCLTK=1 install  scons %{_smp_mflags} install
169    
170    # Install menu entry for PyGTK interface, gtksourceview syntax highlighting, and MIME definition
171  pushd pygtk/gnome  pushd pygtk/gnome
172  install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop  install -m 644 -D ascend.desktop %{buildroot}/%{_datadir}/applications/ascend.desktop
173  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
174  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend.png
175  install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml  install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
176    popd
177    
178    # file-type icon for ascend models (double click should open in ASCEND)
179    pushd pygtk/glade
180    install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
181    popd
182    
183    pushd tools/gedit
184  install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  install -m 644 -D ascend.lang %{buildroot}/%{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
185  popd  popd
186    
187    # TODO...
188    #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
189    #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
190    
191    # Install menu entry for Tcl/Tk interface
192    pushd tcltk/gnome
193    install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
194    install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/ascend4-app.png
195    install -m 644 -D ascend4.png %{buildroot}/%{_datadir}/icons/hicolor/64x64/ascend4.png
196    popd
197    
198  %clean  %clean
199  rm -rf %{buildroot}  rm -rf %{buildroot}
200    
201  %post  %post
202  update-desktop-database  update-desktop-database
203  update-mime-database /usr/share/mime  update-mime-database /usr/share/mime &> /dev/null || :
204    
205  %postun  %postun
206  update-desktop-database  update-desktop-database
207  update-mime-database /usr/share/mime  update-mime-database /usr/share/mime &> /dev/null || :
208    
209  %files  %files
210  %defattr(-, root, root)  %defattr(-, root, root)
211  %doc INSTALL.txt LICENSE.txt  %doc INSTALL.txt LICENSE.txt
212  %{_datadir}/applications/ascend.desktop  
213    %{_bindir}/ascend-config
214  %{_datadir}/ascend/models  %{_datadir}/ascend/models
215    %{_datadir}/ascend/solvers
216  %{_libdir}/libascend.so  %{_libdir}/libascend.so
217    %{_datadir}/mime/packages/ascend.xml
218    %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
219    %{_datadir}/icons/text-x-ascend-model.svg
220    
221  # %package -n ascend-python  # %package -n ascend-python
222  %{_bindir}/ascend  %{_bindir}/ascend
 %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  
 %{_datadir}/icons/ascend-app.png  
 %{_datadir}/icons/hicolor/64x64/ascend.png  
 %{_datadir}/mime/packages/ascend.xml  
223  %{_datadir}/ascend/*.py  %{_datadir}/ascend/*.py
224  %{_datadir}/ascend/*.pyc  %{_datadir}/ascend/*.py[co]
225  %{_datadir}/ascend/*.pyo  
226  %{_datadir}/ascend/glade  %{_datadir}/ascend/glade
227  %{_datadir}/ascend/_ascpy.so  %{_datadir}/ascend/_ascpy.so
228    %{_datadir}/applications/ascend.desktop
229    %{_datadir}/icons/ascend-app.png
230    %{_datadir}/icons/hicolor/64x64/ascend.png
231    
232  # %package -n ascend-tcltk  # %package -n ascend-tcltk
233  %{_bindir}/ascend4  %{_bindir}/ascend4
234  %{_datadir}/ascend/tcltk  %{_datadir}/ascend/tcltk
235  %{_libdir}/libascendtcl.so  %{_libdir}/libascendtcl.so
236    %{_datadir}/applications/ascend4.desktop
237    %{_datadir}/icons/ascend4-app.png
238    %{_datadir}/icons/hicolor/64x64/ascend4.png
239    
240    %files devel
241    %{_includedir}/compiler
242    %{_includedir}/general
243    %{_includedir}/utilities
244    %{_includedir}/solver
245    %{_includedir}/linear
246    %{_includedir}/integrator
247    %{_includedir}/system
248    
249    %files doc
250    %doc doc/book.pdf
251    
252  %changelog  %changelog
253    * Mon Jul 02 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
254    - solvers are now all built as separate shared libraries
255    - mime-type icon added
256    - build-time dependences allow building on more different distros
257    
258    * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
259    - File ascend.lang has moved.
260    - book.pdf is included in package.
261    - some header files have been moved.
262    
263    * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
264    - Added CONOPT support
265    
266    * Wed Jul 12 2006 John Pye <john.pye@student.unsw.edu.au>
267    - Fixed fortran linking
268    - Removed ccache dependency
269    - Added xgraph dependency
270    - Added 'include' files plus 'ascend-config' script
271    
272    * Thu Jun 01 2006 John Pye <john.pye@student.unsw.edu.au>
273    - Add Tcl/Tk interface to GNOME menu
274    
275  * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>  * Tue May 02 2006 John Pye <john.pye@student.unsw.edu.au>
276  - Break out ascend-core, ascend-python and ascend-tcltk packages.  - Break out ascend-core, ascend-python and ascend-tcltk packages.
277    

Legend:
Removed from v.602  
changed lines
  Added in v.1529

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