source: projects/specs/trunk/s/suitesparse/suitesparse-vl.spec @ 9372

Revision 9372, 15.4 KB checked in by inagaki, 9 years ago (diff)

2015-02-22 Ryoichi INAGAKI <ryo1@…>

  • eigen3: NEW
  • gphoto2, suiteparse: updated


Line 
1Name:           suitesparse
2Version:        4.3.1
3Release:        1%{?_dist_release}
4Summary:        A collection of sparse matrix libraries
5Summary(ja):    疎行列ライブラリ集
6
7Group:          System Environment/Libraries
8License:        LGPLv2+ and GPLv2+
9URL:            http://www.cise.ufl.edu/research/sparse/SuiteSparse
10
11Source0:        http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz
12# Move #include <math.h> out of StuiteSparse_config.h and into SuiteSparse_config.c
13Patch0:         suitesparse-math.patch
14
15BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
16BuildRequires:  blas-devel
17BuildRequires:  lapack-devel
18
19%description
20suitesparse is a collection of libraries for computations involving sparse
21matrices.  The package includes the following libraries:
22  AMD                 approximate minimum degree ordering
23  BTF                 permutation to block triangular form (beta)
24  CAMD                constrained approximate minimum degree ordering
25  COLAMD              column approximate minimum degree ordering
26  CCOLAMD             constrained column approximate minimum degree ordering
27  CHOLMOD             sparse Cholesky factorization
28  CSparse             a concise sparse matrix package
29  CXSparse            CSparse extended: complex matrix, int and long int support
30  KLU                 sparse LU factorization, primarily for circuit simulation
31  LDL                 a simple LDL factorization
32  SQPR                a multithread, multifrontal, rank-revealing sparse QR
33                      factorization method
34  UMFPACK             sparse LU factorization
35  SuiteSparse_config  configuration file for all the above packages.
36  RBio                read/write files in Rutherford/Boeing format
37
38%package devel
39Summary:        Development headers for SuiteSparse
40Summary(ja):    SuiteSparse の開発用ヘッダファイル集
41Group:          Development/Libraries
42Requires:       %{name} = %{version}-%{release}
43
44%description devel
45The suitesparse-devel package contains files needed for developing
46applications which use the suitesparse libraries.
47
48
49%package static
50Summary:        Static version of SuiteSparse libraries
51Summary(ja):    SuiteSparse の静的ライブラリ
52Group:          Development/Libraries
53Requires:       %{name}-devel = %{version}-%{release}
54
55%description static
56The suitesparse-static package contains the statically linkable
57version of the suitesparse libraries.
58
59#'
60
61%prep
62%setup -q -n SuiteSparse
63%patch0 -p1 -b .math
64
65%build
66%define amd_version 2.4.0
67%define amd_version_major 2
68%define btf_version 1.2.0
69%define btf_version_major 1
70%define camd_version 2.4.0
71%define camd_version_major 2
72%define ccolamd_version 2.9.0
73%define ccolamd_version_major 2
74%define cholmod_version 3.0.1
75%define cholmod_version_major 3
76%define colamd_version 2.9.0
77%define colamd_version_major 2
78%define csparse_version 3.1.3
79%define csparse_version_major 3
80%define cxsparse_version 3.1.3
81%define cxsparse_version_major 3
82%define klu_version 1.3.0
83%define klu_version_major 1
84%define ldl_version 2.2.0
85%define ldl_version_major 2
86%define rbio_version 2.2.0
87%define rbio_version_major 2
88%define spqr_version 1.3.3
89%define spqr_version_major 1
90%define SuiteSparse_config_ver 4.3.1
91%define SuiteSparse_config_major 4
92%define umfpack_version 5.7.0
93%define umfpack_version_major 5
94### CHOLMOD can also be compiled to use the METIS library, but it is not
95### used here because its licensing terms exclude it from Fedora Extras.
96### To compile with METIS, define enable_metis as 1 below.
97%define enable_metis 0
98### CXSparse is a superset of CSparse, and the two share common header
99### names, so it does not make sense to build both. CXSparse is built
100### by default, but CSparse can be built instead by defining
101### enable_csparse as 1 below.
102%define enable_csparse 0
103
104mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR,RBio} Lib Include
105
106# SuiteSparse_config needs to come first
107pushd SuiteSparse_config
108  make CFLAGS="$RPM_OPT_FLAGS -fPIC"
109  ar x libsuitesparseconfig.a
110  pushd ../Lib
111    gcc -shared -Wl,-soname,libsuitesparseconfig.so.%{SuiteSparse_config_major} -o \
112        libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm
113    ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so.%{SuiteSparse_config_major}
114    ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so
115    cp -p ../SuiteSparse_config/*.a ./
116  popd
117  cp -p *.h ../Include
118popd
119
120pushd AMD
121  pushd Lib
122    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
123  popd
124  pushd ../Lib
125    gcc -shared -Wl,-soname,libamd.so.%{amd_version_major} -o \
126        libamd.so.%{amd_version} ../AMD/Lib/*.o \
127        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
128    ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
129    ln -sf libamd.so.%{amd_version} libamd.so
130    cp -p ../AMD/Lib/*.a ./
131  popd
132  cp -p Include/*.h ../Include
133  cp -p README.txt Doc/License Doc/ChangeLog Doc/*.pdf ../Doc/AMD
134popd
135
136pushd BTF
137  pushd Lib
138    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
139  popd
140  pushd ../Lib
141    gcc -shared -Wl,-soname,libbtf.so.%{btf_version_major} -o \
142        libbtf.so.%{btf_version} ../BTF/Lib/*.o
143    ln -sf libbtf.so.%{btf_version} libbtf.so.%{btf_version_major}
144    ln -sf libbtf.so.%{btf_version} libbtf.so
145    cp -p ../BTF/Lib/*.a ./
146  popd
147  cp -p Include/*.h ../Include
148  cp -p README.txt Doc/* ../Doc/BTF
149popd
150
151pushd CAMD
152  pushd Lib
153    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
154  popd
155  pushd ../Lib
156    gcc -shared -Wl,-soname,libcamd.so.%{camd_version_major} -o \
157        libcamd.so.%{camd_version} ../CAMD/Lib/*.o \
158        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
159    ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}
160    ln -sf libcamd.so.%{camd_version} libcamd.so
161    cp -p ../CAMD/Lib/*.a ./
162  popd
163  cp -p Include/*.h ../Include
164  cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD
165popd
166
167pushd CCOLAMD
168  pushd Lib
169    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
170  popd
171  pushd ../Lib
172    gcc -shared -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o \
173        libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \
174        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
175    ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
176    ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
177    cp -p ../CCOLAMD/Lib/*.a ./
178  popd
179  cp -p Include/*.h ../Include
180  cp -p README.txt Doc/* ../Doc/CCOLAMD
181popd
182
183pushd COLAMD
184  pushd Lib
185    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
186  popd
187  pushd ../Lib
188    gcc -shared -Wl,-soname,libcolamd.so.%{colamd_version_major} -o \
189        libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o \
190        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
191    ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
192    ln -sf libcolamd.so.%{colamd_version} libcolamd.so
193    cp -p ../COLAMD/Lib/*.a ./
194  popd
195  cp -p Include/*.h ../Include
196  cp -p README.txt Doc/* ../Doc/COLAMD
197popd
198
199%if "%{?enable_metis}" == "1"
200CHOLMOD_FLAGS="$RPM_OPT_FLAGS -I%{_includedir}/metis -fPIC"
201%else
202CHOLMOD_FLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
203%endif
204pushd CHOLMOD
205  pushd Lib
206    make CFLAGS="$CHOLMOD_FLAGS"
207  popd
208  pushd ../Lib
209    gcc -shared -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o \
210        libcholmod.so.%{cholmod_version} ../CHOLMOD/Lib/*.o \
211        libamd.so.%{amd_version_major} \
212        libcamd.so.%{camd_version_major} libcolamd.so.%{colamd_version_major} \
213        libccolamd.so.%{ccolamd_version_major} \
214        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
215        -llapack -lblas -lgfortran
216#        -L%{_libdir}/atlas %{atlaslibs} \
217    ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}
218    ln -sf libcholmod.so.%{cholmod_version} libcholmod.so
219    cp -p ../CHOLMOD/Lib/*.a ./
220  popd
221  cp -p Include/*.h ../Include
222  cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD
223  cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
224  cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt
225  cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
226  cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
227  cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
228popd
229
230%if "%{?enable_csparse}" == "1"
231pushd CSparse
232  pushd Source
233    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
234    cp -p cs.h ../../Include
235  popd
236  pushd ../Lib
237    gcc -shared -Wl,-soname,libcsparse.so.%{csparse_version_major} -o \
238        libcsparse.so.%{csparse_version} ../CSparse/Source/*.o -lm
239    ln -sf libcsparse.so.%{csparse_version} libcsparse.so.%{csparse_version_major}
240    ln -sf libcsparse.so.%{csparse_version} libcsparse.so
241    cp -p ../CSparse/Source/*.a ./
242  popd
243  mkdir ../Doc/CSparse/
244  cp -p Doc/* ../Doc/CSparse
245popd
246
247%else
248pushd CXSparse
249  pushd Lib
250    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
251  popd
252  pushd ../Lib
253    gcc -shared -Wl,-soname,libcxsparse.so.%{cxsparse_version_major} -o \
254        libcxsparse.so.%{cxsparse_version} ../CXSparse/Lib/*.o -lm
255    ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so.%{cxsparse_version_major}
256    ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so
257    cp -p ../CXSparse/Lib/*.a ./
258  popd
259  cp -p Include/cs.h ../Include
260  mkdir ../Doc/CXSparse/
261  cp -p Doc/* ../Doc/CXSparse
262popd
263%endif
264
265pushd KLU
266  pushd Lib
267    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
268  popd
269  pushd ../Lib
270    gcc -shared -Wl,-soname,libklu.so.%{klu_version_major} -o \
271        libklu.so.%{klu_version} ../KLU/Lib/*.o \
272        libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \
273        libbtf.so.%{btf_version_major} \
274        libsuitesparseconfig.so.%{SuiteSparse_config_major}
275    ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
276    ln -sf libklu.so.%{klu_version} libklu.so
277    cp -p ../KLU/Lib/*.a ./
278  popd
279  cp -p Include/*.h ../Include
280  cp -p README.txt Doc/lesser.txt ../Doc/KLU
281popd
282
283pushd LDL
284  pushd Lib
285    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
286  popd
287  pushd ../Lib
288    gcc -shared -Wl,-soname,libldl.so.%{ldl_version_major} -o \
289        libldl.so.%{ldl_version} ../LDL/Lib/*.o
290    ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}
291    ln -sf libldl.so.%{ldl_version} libldl.so
292    cp -p ../LDL/Lib/*.a ./
293  popd
294  cp -p Include/*.h ../Include
295  cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL
296popd
297
298pushd UMFPACK
299  pushd Lib
300    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
301  popd
302  pushd ../Lib
303    gcc -shared -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o \
304        libumfpack.so.%{umfpack_version} ../UMFPACK/Lib/*.o \
305        libamd.so.%{amd_version_major} \
306        libcholmod.so.%{cholmod_version_major} \
307        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
308        -llapack -lblas -lgfortran
309#        -L%{_libdir}/atlas %{atlaslibs} \
310    ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
311    ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
312    cp -p ../UMFPACK/Lib/*.a ./
313  popd
314  cp -p Include/*.h ../Include
315  cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK
316popd
317
318pushd SPQR
319  pushd Lib
320    make CFLAGS="$RPM_OPT_FLAGS %{?with_tbb:-DHAVE_TBB} -DNPARTITION -fPIC"
321  popd
322  pushd ../Lib
323    g++ -shared -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
324        libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
325        -L%{_libdir} \
326        %{?with_tbb:-ltbb} \
327        libcholmod.so.%{cholmod_version_major} \
328        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
329        -llapack -lblas -lgfortran
330#        -L%{_libdir}/atlas -L%{_libdir} %{atlaslibs} \
331    ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
332    ln -sf libspqr.so.%{spqr_version} libspqr.so
333    cp -p ../SPQR/Lib/*.a ./
334  popd
335  cp -p Include/*.h* ../Include
336  cp -p README{,_SPQR}.txt
337  cp -p README_SPQR.txt Doc/* ../Doc/SPQR
338popd
339
340pushd RBio
341  pushd Lib
342    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
343  popd
344  pushd ../Lib
345    gcc -shared -Wl,-soname,librbio.so.%{rbio_version_major} -o \
346        librbio.so.%{rbio_version} ../RBio/Lib/*.o \
347        libsuitesparseconfig.so.%{SuiteSparse_config_major}
348    ln -sf librbio.so.%{rbio_version} librbio.so.%{rbio_version_major}
349    ln -sf librbio.so.%{rbio_version} librbio.so
350    cp -p ../RBio/Lib/*.a ./
351  popd
352  cp -p Include/*.h ../Include
353  cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio
354popd
355
356%install
357rm -rf ${RPM_BUILD_ROOT}
358mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
359mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
360pushd Lib
361  for f in *.a *.so*; do
362    cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
363  done
364popd
365pushd Include
366  for f in *.h *.hpp;  do
367    cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
368  done
369popd
370
371
372%clean
373rm -rf ${RPM_BUILD_ROOT}
374
375%post -p /sbin/ldconfig
376
377%postun -p /sbin/ldconfig
378
379
380%files
381%defattr(-,root,root)
382%doc Doc/*
383%{_libdir}/lib*.so.*
384
385%files devel
386%defattr(-,root,root)
387%{_includedir}/%{name}
388%{_libdir}/lib*.so
389
390%files static
391%defattr(-,root,root)
392%{_libdir}/lib*.a
393
394
395%changelog
396* Tue Feb 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.3.1-1
397- updated to 4.3.1
398
399* Thu Mar 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.7.0-1
400- Updated to 3.7.0
401
402* Mon Dec 01 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.6.1-1
403- Updated to 3.6.1
404
405* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.0-3vl5
406- applied new versioning policy
407
408* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.1.0-2vl1
409- New release.
410
411* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.0.0-2vl1
412- Rebuild for VineSeed
413
414* Fri Aug 24 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-2
415- Rebuild for F8.
416
417* Tue Jul  3 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-1
418- Change package name to match upstream, including provides and obsoletes.
419- New release. Numerous changes in build to reflect source reorganization.
420- Moved static libs into separate package.
421
422* Mon Oct 16 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.1-1
423- New release, and package name change from UFsparse to SuiteSparse. Fixes
424  bug #210846. Keep the ufsparse package name for now.
425
426* Thu Sep  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.0-1
427- New release. Increment versions of some libraries.
428- Rearrange and clean up spec file so all definitions are in one place.
429
430* Mon Aug  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.0.0-1
431- New release.
432- Build newly added CAMD library.
433- Misc minor spec changes.
434
435* Tue Mar  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 1.2-1
436- New release.
437- Build newly added library CXSparse (but not CSparse--see comments
438  in build section).
439
440* Wed Feb 15 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-2
441- Rebuild for Fedora Extras 5.
442
443* Thu Feb  9 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-1
444- New release. Remove old patch.
445
446* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-2
447- Add patch0--fixes LDL/Makefile so CFLAGS are used when compiling ldl.a.
448
449* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-1
450- Update to Dec 8 2005 version.
451
452* Tue Oct 25 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-2
453- Rebuild.
454
455* Tue Oct 18 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-1
456- New upstream release, incorporating previous patches
457- chmod the build directory to ensure all headers are world readable
458
459* Fri Oct 07 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-3
460- Build cholmod, but disable METIS using -DNPARTITION flag.
461
462* Sat Oct 01 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-2
463- Modify description, other modifications for import into FE.
464- Add dist tag, cosmetic changes.
465
466* Tue Sep 08 2005 David Bateman <dbateman@free.fr> 0.9-1
467- First version.
Note: See TracBrowser for help on using the repository browser.