/[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 1395 by jpye, Sat Apr 21 15:11:45 2007 UTC revision 1608 by jpye, Thu Aug 30 01:31:05 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.108  Version:    0.9.5.114
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  Release:    0%{?dist}
8    
9  License:    GPL  %define disttar_name ascend-0.9.5.114
10    
11    License:    GPLv2+
12  Group:      Applications/Engineering  Group:      Applications/Engineering
13  Source:     ascend-0.9.5.108.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.91  
22  BuildRequires: bison >= 2.0  #----------build dependencies------------
23    
24    # ...general
25    BuildRequires: scons >= 0.96.92
26    BuildRequires: bison
27  BuildRequires: flex >= 2.5.4  BuildRequires: flex >= 2.5.4
28  BuildRequires: swig >= 1.3.24  BuildRequires: swig >= 1.3.24
29  BuildRequires: tk-devel >= 8.3, tcl-devel >= 8.3  # removed version requirement for 2.0 on bison.
 BuildRequires: tktable < 2.10, tktable >= 2.8  
 BuildRequires: desktop-file-utils  
 BuildRequires: sundials >= 2.2.1  
 BuildRequires: conopt >= 3.14  
30    
31  # This contains the libg2c library; which on FC5 is not in the path, unfort.  %if 0%{?fedora_version}
32  BuildRequires: compat-gcc-32-g77 == 3.2.3  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, tk, tcl-devel, tcl, tktable
37    %else
38    %if 0%{?suse_version}
39    BuildRequires: gcc-fortran gcc-c++
40    BuildRequires: sundials-devel >= 2.2.0
41    BuildRequires: blas
42    BuildRequires: python-devel >= 2.4
43    BuildRequires: tk, tk-devel, tcl, tcl-devel, tktable
44    %if 0%{suse_version} == 1000
45    BuildRequires: xorg-x11-devel
46    %else
47    BuildRequires: xorg-x11-libX11-devel
48    %endif
49    %else
50    %if 0%{?mandriva_version}
51    BuildRequires: gcc-gfortran gcc-c++
52    BuildRequires: sundials-devel >= 2.2.0
53    BuildRequires: blas-devel python-devel tk tcl
54    %else
55    # xubuntu version is the fallback...
56    BuildRequires: g++-4.1 gfortran-4.1 libsundials-serial-dev python-dev tk8.3-dev tcl8.3-dev tktable
57    %endif
58    %endif
59    %endif
60    
61    %define pyver %(python -c 'import sys ; print sys.version[:3]')
62    %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
63    %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
64    
65  Requires: python >= 2.4  Buildroot: /var/tmp/%{name}-buildroot
 Requires: pygtk2 >= 2.6  
 Requires: pygtk2-libglade  
 Requires: python-matplotlib  
 Requires: python-numeric  
 Requires: gtksourceview  
 Requires: xgraph >= 11  
 # sundials is statically linked (hopefully)  
66    
67  %description  %description
68  ASCEND IV is both a large-scale object-oriented mathematical  ASCEND IV is both a large-scale object-oriented mathematical
# Line 47  Engineers, great care has been exercised Line 72  Engineers, great care has been exercised
72  domain independent. ASCEND can support modeling activities in  domain independent. ASCEND can support modeling activities in
73  fields from Architecture to (computational) Zoology.  fields from Architecture to (computational) Zoology.
74    
75    # ... documentation
76    # There are no dependencies for documentation as the tarball
77    # will always contain documentation in compiled form. Only
78    # when building from subversion are targets formats of the
79    # documentation files not available.
80    
81    #-----------runtime dependencies-----------
82    
83    # ...general
84    Requires: gtksourceview
85    Requires: blas
86    Requires: sundials
87    # ... is now packaged as a shared library
88    
89    # ...pygtk
90    Requires: python >= 2.4
91    Requires: pygtk2 >= 2.6
92    Requires: pygtk2-libglade
93    Requires: python-matplotlib
94    Requires: numpy
95    Requires: ipython
96    
97    # ...tcl/tk
98    Requires: xgraph >= 11
99    Requires: tcl >= 8.3
100    Requires: tk >= 8.3
101    Requires: tktable < 2.10, tktable >= 2.8
102    
103    # ... file association
104    Requires(post): desktop-file-utils shared-mime-info
105    Requires(postun): desktop-file-utils shared-mime-info
106    
107    
108    #------------------------------------------
109    
110    Provides: ascend-gui
111    
112    # for the moment we'll just make one big super-package, to keep things
113    # simple for end-users.
114    
115  #%package -n ascend-python  #%package -n ascend-python
116  #Version:    0.9.5.108  #Version:    %{version}
117  #Summary:    PyGTK user interface for ASCEND  #Summary:    PyGTK user interface for ASCEND
118  #Group:     Applications/Engineering  #Group:     Applications/Engineering
119  #  #
# Line 58  fields from Architecture to (computation Line 123  fields from Architecture to (computation
123  #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.
124  #  #
125  #%package -n ascend-tcltk  #%package -n ascend-tcltk
126  #Version:    0.9.5.108  #Version:    %{version}
127  #Summary:    Tcl/Tk user interface for ASCEND  #Summary:    Tcl/Tk user interface for ASCEND
128  #Group:     Applications/Engineering  #Group:     Applications/Engineering
129  #  #
# Line 68  fields from Architecture to (computation Line 133  fields from Architecture to (computation
133  #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
134  #functionality not provided by the PyGTK interface.  #functionality not provided by the PyGTK interface.
135    
136    %package doc
137    Summary: Documentation for ASCEND
138    Group: Applications/Engineering
139    %description doc
140    Documentation for ASCEND, in the form of a PDF User's Manual.
141    
142    %package devel
143    Summary: Developer files ASCEND
144    Group: Applications/Engineering
145    Requires: %{name}
146    %description devel
147    Developer files for ASCEND, in the form for C header files for the core
148    ASCEND library, 'libascend'.
149    
150  %prep  %prep
151  %setup -q -n ascend-0.9.5.108  %setup -q -n %{disttar_name}
152    
153  %build  %build
154  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \  scons %{_smp_mflags} DEFAULT_ASCENDLIBRARY=%{_datadir}/ascend/models \
# Line 78  scons %{_smp_mflags} DEFAULT_ASCENDLIBRA Line 157  scons %{_smp_mflags} DEFAULT_ASCENDLIBRA
157      INSTALL_SHARE=%{_datadir} \      INSTALL_SHARE=%{_datadir} \
158      INSTALL_BIN=%{_bindir} \      INSTALL_BIN=%{_bindir} \
159      INSTALL_INCLUDE=%{_includedir} \      INSTALL_INCLUDE=%{_includedir} \
160      F2C_LIBPATH=/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/ \      INSTALL_LIB=%{_libdir} \
161      WITH_SOLVERS=QRSLV,LSOD,CMSLV,LRSLV,CONOPT \      INSTALL_DOC=%{_docdir}/%{name}-%{version} \
162      pygtk tcltk      WITH_DOC_BUILD=0 \
163        WITH_DOC_INSTALL=0 \
164        WITH_SOLVERS=QRSLV,LSODE,CMSLV,IDA,LRSLV,CONOPT \
165        ABSOLUTE_PATHS=1 \
166        %{?__cc:CC="%__cc"} %{?__cxx:CXX="%__cxx"} \
167        pygtk tcltk models solvers
168    
169  %install  %install
170  rm -rf %{buildroot}  rm -rf %{buildroot}
# Line 92  install -m 644 -D ascend.desktop %{build Line 176  install -m 644 -D ascend.desktop %{build
176  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png  install -m 644 -D ascend.png %{buildroot}/%{_datadir}/icons/ascend-app.png
177  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
178  install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml  install -m 644 -D ascend.xml %{buildroot}/%{_datadir}/mime/packages/ascend.xml
179    popd
180    
181    # file-type icon for ascend models (double click should open in ASCEND)
182    pushd pygtk/glade
183    install -m 644 -D ascend-doc-48x48.svg %{buildroot}/%{_datadir}/icons/text-x-ascend-model.svg
184    popd
185    
186    pushd tools/gedit
187  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
188  popd  popd
189    
190    # TODO...
191    #%__python -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
192    #%__python -O -c 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT'/%{python_sitelib}",10,"%{python_sitelib}")'
193    
194  # Install menu entry for Tcl/Tk interface  # Install menu entry for Tcl/Tk interface
195  pushd tcltk/gnome  pushd tcltk/gnome
196  install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop  install -m 644 -D ascend4.desktop %{buildroot}/%{_datadir}/applications/ascend4.desktop
# Line 107  rm -rf %{buildroot} Line 203  rm -rf %{buildroot}
203    
204  %post  %post
205  update-desktop-database  update-desktop-database
206  update-mime-database /usr/share/mime  update-mime-database /usr/share/mime &> /dev/null || :
207    
208  %postun  %postun
209  update-desktop-database  update-desktop-database
210  update-mime-database /usr/share/mime  update-mime-database /usr/share/mime &> /dev/null || :
211    
212  %files  %files
213  %defattr(-, root, root)  %defattr(-, root, root)
214  %doc INSTALL.txt LICENSE.txt  %doc INSTALL.txt LICENSE.txt
215    
216  %{_bindir}/ascend-config  %{_bindir}/ascend-config
217  %{_datadir}/ascend/models  %{_datadir}/ascend/models
218    %{_datadir}/ascend/solvers
219  %{_libdir}/libascend.so  %{_libdir}/libascend.so
220  %{_datadir}/mime/packages/ascend.xml  %{_datadir}/mime/packages/ascend.xml
221  %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang  %{_datadir}/gtksourceview-1.0/language-specs/ascend.lang
222    %{_datadir}/icons/text-x-ascend-model.svg
223    
224  # %package -n ascend-python  # %package -n ascend-python
225  %{_bindir}/ascend  %{_bindir}/ascend
226  %{_datadir}/ascend/*.py  %{_datadir}/ascend/*.py
227  %{_datadir}/ascend/*.pyc  %{_datadir}/ascend/*.py[co]
228  %{_datadir}/ascend/*.pyo  
229  %{_datadir}/ascend/glade  %{_datadir}/ascend/glade
230  %{_datadir}/ascend/_ascpy.so  %{_datadir}/ascend/_ascpy.so
231  %{_datadir}/applications/ascend.desktop  %{_datadir}/applications/ascend.desktop
# Line 141  update-mime-database /usr/share/mime Line 240  update-mime-database /usr/share/mime
240  %{_datadir}/icons/ascend4-app.png  %{_datadir}/icons/ascend4-app.png
241  %{_datadir}/icons/hicolor/64x64/ascend4.png  %{_datadir}/icons/hicolor/64x64/ascend4.png
242    
243  # %package -b ascend-devel  %files devel
244  %{_includedir}/compiler  %{_includedir}/compiler
245  %{_includedir}/general  %{_includedir}/general
246  %{_includedir}/utilities  %{_includedir}/utilities
247  %{_includedir}/solver  %{_includedir}/solver
248    %{_includedir}/linear
249    %{_includedir}/integrator
250    %{_includedir}/system
251    
252    %files doc
253    %doc doc/book.pdf
254    
255  %changelog  %changelog
256    * Sun Aug 19 2007 John Pye <john.pye@anu.edu.au> 0.9.5.113
257    - External libraries renamed to 'lib<name>_ascend.so' for clarity
258      and to solve a Windows-based naming problem.
259    - Links in Help menu fixed (problem with call to Python webbrowser component).
260    - License re-tagged according to Fedora requirements.
261    
262    * Sun Jul 25 2007 John Pye <john.pye@anu.edu.au> 0.9.5.112
263    - solvers are now all built as separate shared libraries
264    - mime-type icon added
265    - RPM now builds on Fedora 5,6,7 and SUSE 10.0 and newer. Not Mandriva though.
266    
267    * Mon Apr 23 2007 John Pye <john.pye@student.unsw.edu.au> 0.9.5.108
268    - File ascend.lang has moved.
269    - book.pdf is included in package.
270    - some header files have been moved.
271    
272  * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>  * Fri Jul 28 2006 John Pye <john.pye@student.unsw.edu.au>
273  - Added CONOPT support  - Added CONOPT support
274    

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

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