suitesparse-vl.spec 16 KB

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