suitesparse-vl.spec 16 KB

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