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

Revision 521, 11.5 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1Name:           suitesparse
2Version:        3.1.0
3Release:        3%{?_dist_release}
4Summary:        A collection of sparse matrix libraries
5
6Group:          System Environment/Libraries
7License:        Distributable
8URL:            http://www.cise.ufl.edu/research/sparse/SuiteSparse
9Source:         http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz
10BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12BuildRequires:  blas-devel
13
14%description
15suitesparse is a collection of libraries for computations involving sparse
16matrices.  The package includes the following libraries:
17  AMD         approximate minimum degree ordering
18  BTF         permutation to block triangular form (beta)
19  CAMD        constrained approximate minimum degree ordering
20  COLAMD      column approximate minimum degree ordering
21  CCOLAMD     constrained column approximate minimum degree ordering
22  CHOLMOD     sparse Cholesky factorization
23  CSparse     a concise sparse matrix package
24  CXSparse    CSparse extended: complex matrix, int and long int support
25  KLU         sparse LU factorization, primarily for circuit simulation
26  LDL         a simple LDL' factorization
27  UMFPACK     sparse LU factorization
28  UFconfig    configuration file for all the above packages.
29
30
31%package devel
32Summary:        Development headers for SuiteSparse
33Group:          Development/Libraries
34Requires:       %{name} = %{version}-%{release}
35
36%description devel
37The suitesparse-devel package contains files needed for developing
38applications which use the suitesparse libraries.
39
40
41%package static
42Summary:        Static version of SuiteSparse libraries
43Group:          Development/Libraries
44Requires:       %{name}-devel = %{version}-%{release}
45
46%description static
47The suitesparse-static package contains the statically linkable
48version of the suitesparse libraries.
49
50
51
52%prep
53%setup -q -n SuiteSparse
54
55%build
56%define amd_version 2.2
57%define amd_version_major 2
58%define btf_version 1.0
59%define btf_version_major 1
60%define camd_version 2.2
61%define camd_version_major 2
62%define ccolamd_version 2.7
63%define ccolamd_version_major 2
64%define cholmod_version 1.6
65%define cholmod_version_major 1
66%define colamd_version 2.7
67%define colamd_version_major 2
68%define csparse_version 2.2.0
69%define csparse_version_major 2
70%define cxsparse_version 2.2.0
71%define cxsparse_version_major 2
72%define klu_version 1.0
73%define klu_version_major 1
74%define ldl_version 2.0
75%define ldl_version_major 2
76%define umfpack_version 5.2.0
77%define umfpack_version_major 5
78### CHOLMOD can also be compiled to use the METIS library, but it is not
79### used here because its licensing terms exclude it from Fedora Extras.
80### To compile with METIS, define enable_metis as 1 below.
81%define enable_metis 0
82### CXSparse is a superset of CSparse, and the two share common header
83### names, so it does not make sense to build both. CXSparse is built
84### by default, but CSparse can be built instead by defining
85### enable_csparse as 1 below.
86%define enable_csparse 0
87
88mkdir Devel Devel/AMD Devel/CHOLMOD Devel/KLU Devel/LDL Devel/UMFPACK \
89        Doc Doc/AMD Doc/BTF Doc/CAMD Doc/CCOLAMD Doc/CHOLMOD Doc/COLAMD \
90        Doc/KLU Doc/LDL Doc/UMFPACK Lib Include
91
92pushd AMD
93  pushd Lib
94    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
95    gcc -shared -Wl,-soname,libamd.so.%{amd_version_major} -o ../Lib/libamd.so.%{amd_version} `ls *.o`
96  popd
97  cp -p Lib/*.a Lib/*.so* ../Lib
98  cp -p Include/*.h ../Include
99  cp -p README.txt Doc/License Doc/ChangeLog ../Doc/AMD
100  cp -p Doc/*.pdf ../Devel/AMD
101popd
102
103pushd BTF
104  pushd Lib
105    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
106    gcc -shared -Wl,-soname,libbtf.so.%{btf_version_major} -o libbtf.so.%{btf_version} `ls *.o`
107  popd
108  cp -p Lib/*.a Lib/*.so* ../Lib
109  cp -p Include/*.h ../Include
110  cp -p README.txt Doc/* ../Doc/BTF
111popd
112
113pushd CAMD
114  pushd Lib
115    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
116    gcc -shared -Wl,-soname,libcamd.so.%{camd_version_major} -o ../Lib/libcamd.so.%{camd_version} `ls *.o`
117  popd
118  cp -p Lib/*.a Lib/*.so* ../Lib
119  cp -p Include/*.h ../Include
120  cp -p README.txt Doc/ChangeLog Doc/License ../Doc/CAMD
121  cp -p Doc/*.pdf ../Devel/CAMD
122popd
123
124pushd CCOLAMD
125  pushd Lib
126    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
127    gcc -shared -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o libccolamd.so.%{ccolamd_version} `ls *.o`
128  popd
129  cp -p Lib/*.a Lib/*.so* ../Lib
130  cp -p Include/*.h ../Include
131  cp -p README.txt Doc/* ../Doc/CCOLAMD
132popd
133pushd Lib
134popd
135
136%if "%{?enable_metis}" == "1"
137CHOLMOD_FLAGS="$RPM_OPT_FLAGS -I%{_includedir}/metis -fPIC"
138%else
139CHOLMOD_FLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
140%endif
141pushd CHOLMOD
142  pushd Lib
143    make CFLAGS="$CHOLMOD_FLAGS"
144    gcc -shared -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o ../Lib/libcholmod.so.%{cholmod_version} `ls *.o`
145  popd
146  cp -p Lib/*.a Lib/*.so* ../Lib
147  cp -p Include/*.h ../Include
148  cp -p README.txt ../Doc/CHOLMOD
149  cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
150  cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt
151  cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
152  cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
153  cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
154  cp -p Doc/*.pdf ../Devel/CHOLMOD
155popd
156
157pushd COLAMD
158  pushd Lib
159    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
160    gcc -shared -Wl,-soname,libcolamd.so.%{colamd_version_major} -o libcolamd.so.%{colamd_version} `ls *.o`
161  popd
162  cp -p Lib/*.a Lib/*.so* ../Lib
163  cp -p Include/*.h ../Include
164  cp -p README.txt Doc/* ../Doc/COLAMD
165popd
166
167%if "%{?enable_csparse}" == "1"
168pushd CSparse
169  pushd Source
170    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
171    gcc -shared -Wl,-soname,libcsparse.so.%{csparse_version_major} -o libcsparse.so.%{csparse_version} `ls *.o`
172    cp -p *.a *.so* ../../Lib
173    cp -p cs.h ../../Include
174  popd
175  mkdir ../Doc/CSparse/
176  cp -p Doc/* ../Doc/CSparse
177popd
178
179%else
180pushd CXSparse
181  pushd Lib
182    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
183    gcc -shared -Wl,-soname,libcxsparse.so.%{cxsparse_version_major} -o libcxsparse.so.%{cxsparse_version} `ls *.o`
184  popd
185  cp -p Lib/*.a Lib/*.so* ../Lib
186  cp -p Include/cs.h ../Include
187  mkdir ../Doc/CXSparse/
188  cp -p Doc/* ../Doc/CXSparse
189popd
190%endif
191
192pushd KLU
193  pushd Lib
194    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
195    gcc -shared -Wl,-soname,libklu.so.%{klu_version_major} -o libklu.so.%{klu_version} `ls *.o`
196  popd
197  cp -p Lib/*.a Lib/*.so* ../Lib
198  cp -p Include/*.h ../Include
199  cp -p README.txt Doc/lesser.txt ../Doc/KLU
200popd
201
202pushd LDL
203  pushd Lib
204    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
205    gcc -shared -Wl,-soname,libldl.so.%{ldl_version_major} -o libldl.so.%{ldl_version} `ls *.o`
206  popd
207  cp -p Lib/*.a Lib/*.so* ../Lib
208  cp -p Include/*.h ../Include
209  cp -p README.txt Doc/ChangeLog Doc/lesser.txt ../Doc/LDL
210  cp -p Doc/*.pdf ../Devel/LDL
211popd
212
213pushd UMFPACK
214  pushd Lib
215    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
216    gcc -shared -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o ../Lib/libumfpack.so.%{umfpack_version} `ls *.o` -lblas -lm
217  popd
218  cp -p Lib/*.a Lib/*.so* ../Lib
219  cp -p Include/*.h ../Include
220  cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt ../Doc/UMFPACK
221  cp -p Doc/*.pdf ../Devel/UMFPACK
222popd
223
224pushd Lib
225  ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
226  ln -sf libamd.so.%{amd_version} libamd.so
227  ln -sf libbtf.so.%{btf_version} libbtf.so.%{btf_version_major}
228  ln -sf libbtf.so.%{btf_version} libbtf.so
229  ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}
230  ln -sf libcamd.so.%{camd_version} libcamd.so
231  ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
232  ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
233  ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}
234  ln -sf libcholmod.so.%{cholmod_version} libcholmod.so
235  ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
236  ln -sf libcolamd.so.%{colamd_version} libcolamd.so
237%if "%{?enable_csparse}" == "1"
238  ln -sf libcsparse.so.%{csparse_version} libcsparse.so.%{csparse_version_major}
239  ln -sf libcsparse.so.%{csparse_version} libcsparse.so
240%else
241  ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so.%{cxsparse_version_major}
242  ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so
243%endif
244  ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
245  ln -sf libklu.so.%{klu_version} libklu.so
246  ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}
247  ln -sf libldl.so.%{ldl_version} libldl.so
248  ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
249  ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
250popd
251
252cp -p UFconfig/UFconfig.h Include
253
254%install
255rm -rf ${RPM_BUILD_ROOT}
256mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
257mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
258pushd Lib
259  for f in *.a *.so*; do
260    cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
261  done
262popd
263pushd Include
264  for f in *.h;  do
265    cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
266  done
267popd
268
269
270%clean
271rm -rf ${RPM_BUILD_ROOT}
272
273%post -p /sbin/ldconfig
274
275%postun -p /sbin/ldconfig
276
277
278%files
279%defattr(-,root,root)
280%doc Doc/*
281%{_libdir}/lib*.so.*
282
283%files devel
284%defattr(-,root,root)
285%doc Devel/*
286%{_includedir}/%{name}
287%{_libdir}/lib*.so
288
289%files static
290%defattr(-,root,root)
291%{_libdir}/lib*.a
292
293%changelog
294* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.0-3vl5
295- applied new versioning policy
296
297* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.1.0-2vl1
298- New release.
299
300* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.0.0-2vl1
301- Rebuild for VineSeed
302
303* Fri Aug 24 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-2
304- Rebuild for F8.
305
306* Tue Jul  3 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-1
307- Change package name to match upstream, including provides and obsoletes.
308- New release. Numerous changes in build to reflect source reorganization.
309- Moved static libs into separate package.
310
311* Mon Oct 16 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.1-1
312- New release, and package name change from UFsparse to SuiteSparse. Fixes
313  bug #210846. Keep the ufsparse package name for now.
314
315* Thu Sep  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.0-1
316- New release. Increment versions of some libraries.
317- Rearrange and clean up spec file so all definitions are in one place.
318
319* Mon Aug  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.0.0-1
320- New release.
321- Build newly added CAMD library.
322- Misc minor spec changes.
323
324* Tue Mar  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 1.2-1
325- New release.
326- Build newly added library CXSparse (but not CSparse--see comments
327  in build section).
328
329* Wed Feb 15 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-2
330- Rebuild for Fedora Extras 5.
331
332* Thu Feb  9 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-1
333- New release. Remove old patch.
334
335* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-2
336- Add patch0--fixes LDL/Makefile so CFLAGS are used when compiling ldl.a.
337
338* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-1
339- Update to Dec 8 2005 version.
340
341* Tue Oct 25 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-2
342- Rebuild.
343
344* Tue Oct 18 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-1
345- New upstream release, incorporating previous patches
346- chmod the build directory to ensure all headers are world readable
347
348* Fri Oct 07 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-3
349- Build cholmod, but disable METIS using -DNPARTITION flag.
350
351* Sat Oct 01 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-2
352- Modify description, other modifications for import into FE.
353- Add dist tag, cosmetic changes.
354
355* Tue Sep 08 2005 David Bateman <dbateman@free.fr> 0.9-1
356- First version.
Note: See TracBrowser for help on using the repository browser.