suitesparse-vl.spec 12 KB

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