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

Annotation of /trunk/ascend.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

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