suitesparse-vl.spec 12 KB

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