openblas-vl.spec 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. # Version of bundled lapack
  2. %global lapackver 3.8.0
  3. %global lapacke 1
  4. # Build 64-bit interface binaries?
  5. %ifarch %{ix86}
  6. %global build64 0
  7. %global libblas libblas.so.3 libcblas.so.3
  8. %global liblapack liblapack.so.3 liblapacke.so.3
  9. %endif
  10. %ifarch x86_64
  11. %global build64 1
  12. %global libblas libblas.so.3()(64bit) libcblas.so.3()(64bit)
  13. %global liblapack liblapack.so.3()(64bit) liblapacke.so.3()(64bit)
  14. %endif
  15. Summary: An optimized BLAS library based on GotoBLAS2
  16. Name: openblas
  17. Version: 0.3.19
  18. Release: 1%{?_dist_release}
  19. Group: system
  20. License: BSD
  21. URL: https://github.com/xianyi/OpenBLAS/
  22. # Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz
  23. Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz#/OpenBLAS-%{version}.tar.gz
  24. # pkg-config file (modoified)
  25. Source11: blas.pc.in
  26. Source12: cblas.pc.in
  27. Source13: lapack.pc.in
  28. Source14: lapacke.pc.in
  29. # Drop extra p from threaded library name
  30. Patch1: openblas-0.2.5-libname.patch
  31. # # Supply the proper flags to the test makefile
  32. # Patch2: openblas-0.2.19-tests.patch
  33. # # Disable CPU affinity, from upstream
  34. # Patch3: https://patch-diff.githubusercontent.com/raw/xianyi/OpenBLAS/pull/1495.patch
  35. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  36. BuildRequires: gcc-gfortran
  37. Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
  38. ExclusiveArch: x86_64 %{ix86}
  39. %global base_description \
  40. OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
  41. version. The project is supported by the Lab of Parallel Software and \
  42. Computational Science, ISCAS. http://www.rdcps.ac.cn
  43. %description
  44. %{base_description}
  45. %package Rblas
  46. Summary: A version of OpenBLAS for R to use as libRblas
  47. Group: system
  48. %description Rblas
  49. %{base_description}
  50. %package openmp
  51. Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
  52. Group: system
  53. Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
  54. %description openmp
  55. %{base_description}
  56. This package contains the library compiled with OpenMP support.
  57. %package threads
  58. Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
  59. Group: system
  60. Provides: blas lapack = %{lapackver} %{libblas} %{liblapack}
  61. %description threads
  62. %{base_description}
  63. This package contains the library compiled with threading support.
  64. %if %build64
  65. %package serial64
  66. Summary: An optimized BLAS library based on GotoBLAS2, serial version
  67. Group: system
  68. Provides: blas64 lapack64 = %{lapackver}
  69. %description serial64
  70. %{base_description}
  71. This package contains the sequential library compiled with a 64-bit
  72. interface.
  73. %package serial64_
  74. Summary: An optimized BLAS library based on GotoBLAS2, serial version
  75. Group: system
  76. Provides: blas64 lapack64 = %{lapackver}
  77. %description serial64_
  78. %{base_description}
  79. This package contains the sequential library compiled with a 64-bit
  80. interface and a symbol name suffix.
  81. %package openmp64
  82. Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
  83. Group: system
  84. Provides: blas64 lapack64 = %{lapackver}
  85. %description openmp64
  86. %{base_description}
  87. This package contains the library compiled with OpenMP support and
  88. 64-bit interface.
  89. %package openmp64_
  90. Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
  91. Group: system
  92. Provides: blas64 lapack64 = %{lapackver}
  93. %description openmp64_
  94. %{base_description}
  95. This package contains the library compiled with OpenMP support and
  96. 64-bit interface and a symbol name suffix.
  97. %package threads64
  98. Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
  99. Group: system
  100. Provides: blas64 lapack64 = %{lapackver}
  101. %description threads64
  102. %{base_description}
  103. This package contains the library compiled with threading support and
  104. 64-bit interface.
  105. %package threads64_
  106. Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
  107. Group: system
  108. Provides: blas64 lapack64 = %{lapackver}
  109. %description threads64_
  110. %{base_description}
  111. This package contains the library compiled with threading support and
  112. 64-bit interface and a symbol name suffix.
  113. %endif
  114. %package devel
  115. Summary: Development headers and libraries for OpenBLAS
  116. Group: programming
  117. Requires: %{name} = %{version}-%{release}
  118. Requires: %{name}-openmp = %{version}-%{release}
  119. Requires: %{name}-threads = %{version}-%{release}
  120. %description devel
  121. %{base_description}
  122. This package contains the development headers and libraries.
  123. %package static
  124. Summary: Static version of OpenBLAS
  125. Group: programming
  126. Requires: %{name}-devel = %{version}-%{release}
  127. %description static
  128. %{base_description}
  129. This package contains the static libraries.
  130. %if %build64
  131. %package -n %{name}64-devel
  132. Summary: Development headers and libraries for OpenBLAS (64bit)
  133. Group: programming
  134. Requires: %{name}-openmp64 = %{version}-%{release}
  135. Requires: %{name}-threads64 = %{version}-%{release}
  136. Requires: %{name}-serial64 = %{version}-%{release}
  137. Requires: %{name}-openmp64_ = %{version}-%{release}
  138. Requires: %{name}-threads64_ = %{version}-%{release}
  139. Requires: %{name}-serial64_ = %{version}-%{release}
  140. Requires: %{name}-devel = %{version}-%{release}
  141. %description -n %{name}64-devel
  142. %{base_description}
  143. This package contains the development headers and libraries
  144. compiled with a 64-bit interface.
  145. %package -n %{name}64-static
  146. Summary: Static version of OpenBLAS (64bit)
  147. Group: programming
  148. Requires: %{name}64-devel = %{version}-%{release}
  149. %description -n %{name}64-static
  150. %{base_description}
  151. This package contains the static libraries
  152. compiled with a 64-bit interface.
  153. %endif
  154. %debug_package
  155. %prep
  156. %setup -q -c -T
  157. # Untar source
  158. tar zxf %{SOURCE0}
  159. cd OpenBLAS-%{version}
  160. %patch1 -p1 -b .libname
  161. # %patch2 -p1 -b .tests
  162. # %patch3 -p1 -b .affinity
  163. # Fix source permissions
  164. find -name \*.f -exec chmod 644 {} \;
  165. # Make serial, threaded and OpenMP versions; as well as 64-bit versions
  166. # Also make an libRblas.so
  167. cd ..
  168. cp -ar OpenBLAS-%{version} openmp
  169. cp -ar OpenBLAS-%{version} threaded
  170. %if %build64
  171. for d in {serial,threaded,openmp}64{,_}; do
  172. cp -ar OpenBLAS-%{version} $d
  173. done
  174. %endif
  175. cp -ar OpenBLAS-%{version} Rblas
  176. mv OpenBLAS-%{version} serial
  177. # Hackup Rblas Makefiles
  178. sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/Makefile
  179. sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/exports/Makefile
  180. sed -i 's|@ln -fs $(LIBSONAME) $(LIBPREFIX).so|#@ln -fs $(LIBSONAME) $(LIBPREFIX).so|g' Rblas/Makefile
  181. %build
  182. # Maximum possible amount of processors
  183. NMAX="NUM_THREADS=128"
  184. TARGET="TARGET=CORE2 DYNAMIC_ARCH=1"
  185. export AVX="NO_AVX2=1"
  186. FCOMMON="%{optflags} -fPIC -frecursive"
  187. make -C Rblas $TARGET USE_THREAD=0 USEOPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libRblas" LIBSONAME="libRblas.so" $AVX $LAPACKE INTERFACE64=0
  188. # Declare some necessary build flags
  189. COMMON="%{optflags} -fPIC"
  190. FCOMMON="$COMMON -frecursive"
  191. make -C serial $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0
  192. make -C threaded $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp" $AVX $LAPACKE INTERFACE64=0
  193. # USE_THREAD determines use of SMP, not of pthreads
  194. COMMON="%{optflags} -fPIC -fopenmp -pthread"
  195. FCOMMON="$COMMON -frecursive"
  196. make -C openmp $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso" $AVX $LAPACKE INTERFACE64=0
  197. %if %build64
  198. COMMON="%{optflags} -fPIC"
  199. FCOMMON="$COMMON -frecursive -fdefault-integer-8"
  200. make -C serial64 $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64" $AVX $LAPACKE INTERFACE64=1
  201. make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64" $AVX $LAPACKE INTERFACE64=1
  202. COMMON="%{optflags} -fPIC -fopenmp -pthread"
  203. FCOMMON="$COMMON -frecursive -fdefault-integer-8"
  204. make -C openmp64 $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso64" $AVX $LAPACKE INTERFACE64=1
  205. COMMON="%{optflags} -fPIC"
  206. FCOMMON="$COMMON -frecursive -fdefault-integer-8"
  207. make -C serial64_ $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
  208. make -C threaded64_ $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
  209. COMMON="%{optflags} -fPIC -fopenmp -pthread"
  210. FCOMMON="$COMMON -frecursive -fdefault-integer-8"
  211. make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
  212. %endif
  213. %install
  214. rm -rf %{buildroot}
  215. # Install serial library and headers
  216. make -C serial USE_THREAD=0 PREFIX=%{buildroot} OPENBLAS_LIBRARY_DIR=%{buildroot}%{_libdir}/ OPENBLAS_INCLUDE_DIR=%{buildroot}%{_includedir}/%{name} OPENBLAS_BINARY_DIR=%{buildroot}%{_bindir} OPENBLAS_CMAKE_DIR=%{buildroot}%{_libdir}/cmake install
  217. slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
  218. mv %{buildroot}%{_libdir}/${slibname}.a \
  219. %{buildroot}%{_libdir}/lib%{name}.a
  220. if [[ "$suffix" != "" ]]; then
  221. sname=$(echo $slibname | sed "s|$suffix||g")
  222. mv %{buildroot}%{_libdir}/${slibname}.so \
  223. %{buildroot}%{_libdir}/${sname}.so
  224. else
  225. sname=${slibname}
  226. fi
  227. # Install the Rblas library
  228. mkdir -p %{buildroot}%{_libdir}/R/lib/
  229. install -p -m 755 Rblas/libRblas.so %{buildroot}%{_libdir}/R/lib/
  230. # Install the OpenMP library
  231. olibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o|g"`
  232. install -D -p -m 644 openmp/${olibname}.a \
  233. %{buildroot}%{_libdir}/lib%{name}o.a
  234. if [[ "$suffix" != "" ]]; then
  235. oname=$(echo $olibname | sed "s|$suffix||g")
  236. else
  237. oname=${olibname}
  238. fi
  239. install -D -p -m 755 openmp/${olibname}.so \
  240. %{buildroot}%{_libdir}/${oname}.so
  241. # Install the threaded library
  242. plibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p|g"`
  243. install -D -p -m 644 threaded/${plibname}.a \
  244. %{buildroot}%{_libdir}/lib%{name}p.a
  245. if [[ "$suffix" != "" ]]; then
  246. pname=$(echo $plibname | sed "s|$suffix||g")
  247. else
  248. pname=${plibname}
  249. fi
  250. install -D -p -m 755 threaded/${plibname}.so \
  251. %{buildroot}%{_libdir}/${pname}.so
  252. # Install the 64-bit interface libraries
  253. %if %build64
  254. slibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64|g"`
  255. install -D -p -m 644 serial64/${slibname64}.a \
  256. %{buildroot}%{_libdir}/lib%{name}64.a
  257. slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"`
  258. install -D -p -m 644 serial64_/${slibname64_}.a \
  259. %{buildroot}%{_libdir}/lib%{name}64_.a
  260. if [[ "$suffix" != "" ]]; then
  261. sname64=$(echo ${slibname64} | sed "s|$suffix||g")
  262. sname64_=$(echo ${slibname64_} | sed "s|$suffix||g")
  263. else
  264. sname64=${slibname64}
  265. sname64_=${slibname64_}
  266. fi
  267. install -D -p -m 755 serial64/${slibname64}.so \
  268. %{buildroot}%{_libdir}/${sname64}.so
  269. install -D -p -m 755 serial64_/${slibname64_}.so \
  270. %{buildroot}%{_libdir}/${sname64_}.so
  271. olibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64|g"`
  272. install -D -p -m 644 openmp64/${olibname64}.a \
  273. %{buildroot}%{_libdir}/lib%{name}o64.a
  274. olibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64_|g"`
  275. install -D -p -m 644 openmp64_/${olibname64_}.a \
  276. %{buildroot}%{_libdir}/lib%{name}o64_.a
  277. if [[ "$suffix" != "" ]]; then
  278. oname64=$(echo ${olibname64} | sed "s|$suffix||g")
  279. oname64_=$(echo ${olibname64_} | sed "s|$suffix||g")
  280. else
  281. oname64=${olibname64}
  282. oname64_=${olibname64_}
  283. fi
  284. install -D -p -m 755 openmp64/${olibname64}.so \
  285. %{buildroot}%{_libdir}/${oname64}.so
  286. install -D -p -m 755 openmp64_/${olibname64_}.so \
  287. %{buildroot}%{_libdir}/${oname64_}.so
  288. plibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64|g"`
  289. install -D -p -m 644 threaded64/${plibname64}.a \
  290. %{buildroot}%{_libdir}/lib%{name}p64.a
  291. plibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64_|g"`
  292. install -D -p -m 644 threaded64_/${plibname64_}.a \
  293. %{buildroot}%{_libdir}/lib%{name}p64_.a
  294. if [[ "$suffix" != "" ]]; then
  295. pname64=$(echo $plibname64 | sed "s|$suffix||g")
  296. pname64_=$(echo $plibname64_ | sed "s|$suffix||g")
  297. else
  298. pname64=${plibname64}
  299. pname64_=${plibname64_}
  300. fi
  301. install -D -p -m 755 threaded64/${plibname64}.so \
  302. %{buildroot}%{_libdir}/${pname64}.so
  303. install -D -p -m 755 threaded64_/${plibname64_}.so \
  304. %{buildroot}%{_libdir}/${pname64_}.so
  305. %endif
  306. # Fix symlinks
  307. pushd %{buildroot}%{_libdir}
  308. # Serial libraries
  309. ln -sf ${sname}.so lib%{name}.so
  310. ln -sf ${sname}.so lib%{name}.so.0
  311. # OpenMP libraries
  312. ln -sf ${oname}.so lib%{name}o.so
  313. ln -sf ${oname}.so lib%{name}o.so.0
  314. # Threaded libraries
  315. ln -sf ${pname}.so lib%{name}p.so
  316. ln -sf ${pname}.so lib%{name}p.so.0
  317. %if %build64
  318. # Serial libraries
  319. ln -sf ${sname64}.so lib%{name}64.so
  320. ln -sf ${sname64}.so lib%{name}64.so.0
  321. ln -sf ${sname64_}.so lib%{name}64_.so
  322. ln -sf ${sname64_}.so lib%{name}64_.so.0
  323. # OpenMP libraries
  324. ln -sf ${oname64}.so lib%{name}o64.so
  325. ln -sf ${oname64}.so lib%{name}o64.so.0
  326. ln -sf ${oname64_}.so lib%{name}o64_.so
  327. ln -sf ${oname64_}.so lib%{name}o64_.so.0
  328. # Threaded libraries
  329. ln -sf ${pname64}.so lib%{name}p64.so
  330. ln -sf ${pname64}.so lib%{name}p64.so.0
  331. ln -sf ${pname64_}.so lib%{name}p64_.so
  332. ln -sf ${pname64_}.so lib%{name}p64_.so.0
  333. %endif
  334. popd
  335. # Get rid of generated CMake config
  336. rm -rf %{buildroot}%{_libdir}/cmake
  337. # pkg-config
  338. # fix libdir/includedir in openblas.pc
  339. pushd %{buildroot}%{_libdir}/pkgconfig
  340. mv openblas.pc tmp
  341. echo "libdir=%{_libdir}" > openblas.pc
  342. echo "includedir=%{_includedir}/%{name}" >> openblas.pc
  343. sed -e "1,2d" tmp >> openblas.pc
  344. rm -f tmp
  345. sed "s/-lopenblas/-lopenblaso/" openblas.pc >> openblaso.pc
  346. sed "s/-lopenblas/-lopenblasp/" openblas.pc >> openblasp.pc
  347. %if %build64
  348. sed "s/-lopenblas/-lopenblas64/" openblas.pc >> openblas64.pc
  349. sed "s/-lopenblas/-lopenblaso64/" openblas.pc >> openblaso64.pc
  350. sed "s/-lopenblas/-lopenblasp64/" openblas.pc >> openblasp64.pc
  351. sed "s/-lopenblas/-lopenblas64_/" openblas.pc >> openblas64_.pc
  352. sed "s/-lopenblas/-lopenblaso64_/" openblas.pc >> openblaso64_.pc
  353. sed "s/-lopenblas/-lopenblasp64_/" openblas.pc >> openblasp64_.pc
  354. %endif
  355. popd
  356. # blas/lapack
  357. mkdir -p %{buildroot}%{_libdir}/%{name}
  358. pushd %{buildroot}%{_libdir}/%{name}
  359. cp %{SOURCE11} blas.pc
  360. cp %{SOURCE12} cblas.pc
  361. cp %{SOURCE13} lapack.pc
  362. cp %{SOURCE14} lapacke.pc
  363. # blas
  364. sed -i 's|@libdir@|%{_libdir}|g' blas.pc
  365. sed -i 's|@LAPACK_VERSION@|%{version}|g' blas.pc
  366. # cblas
  367. sed -i 's|@libdir@|%{_libdir}|g' cblas.pc
  368. sed -i 's|@includedir@|%{_includedir}/%{name}|g' cblas.pc
  369. sed -i 's|@LAPACK_VERSION@|%{version}|g' cblas.pc
  370. # lapack
  371. sed -i 's|@libdir@|%{_libdir}|g' lapack.pc
  372. sed -i 's|@LAPACK_VERSION@|%{version}|g' lapack.pc
  373. # lapacke
  374. sed -i 's|@libdir@|%{_libdir}|g' lapacke.pc
  375. sed -i 's|@includedir@|%{_includedir}/%{name}|g' lapacke.pc
  376. sed -i 's|@LAPACK_VERSION@|%{version}|g' lapacke.pc
  377. %if %build64
  378. sed 's/-lblas/-blas64_/g' blas.pc > blas64.pc
  379. sed 's/-lcblas/-cblas64_/g' cblas.pc > cblas64.pc
  380. sed 's/-llapack/-llapack64_/g' lapack.pc > lapack64.pc
  381. sed 's/-llapacke/-llapacke64_/g' lapacke.pc > lapacke64.pc
  382. %endif
  383. popd
  384. %post
  385. update-alternatives \
  386. --install %{_libdir}/libblas.so.3 libblas.so.3 \
  387. %{_libdir}/libopenblas.so.0 40 \
  388. --slave %{_libdir}/libcblas.so.3 libcblas.so.3 \
  389. %{_libdir}/libopenblas.so.0
  390. update-alternatives \
  391. --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
  392. %{_libdir}/libopenblas.so.0 40 \
  393. --slave %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
  394. %{_libdir}/libopenblas.so.0
  395. %preun
  396. if [ "$1" = "0" ]
  397. then
  398. update-alternatives \
  399. --remove libblas.so.3 %{_libdir}/libopenblas.so.0
  400. update-alternatives \
  401. --remove liblapack.so.3 %{_libdir}/libopenblas.so.0
  402. fi
  403. %post openmp
  404. update-alternatives \
  405. --install %{_libdir}/libblas.so.3 libblas.so.3 \
  406. %{_libdir}/libopenblaso.so.0 42 \
  407. --slave %{_libdir}/libcblas.so.3 libcblas.so.3 \
  408. %{_libdir}/libopenblaso.so.0
  409. update-alternatives \
  410. --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
  411. %{_libdir}/libopenblaso.so.0 42 \
  412. --slave %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
  413. %{_libdir}/libopenblaso.so.0
  414. %preun openmp
  415. if [ "$1" = "0" ]
  416. then
  417. update-alternatives \
  418. --remove libblas.so.3 %{_libdir}/libopenblaso.so.0
  419. update-alternatives \
  420. --remove liblapack.so.3 %{_libdir}/libopenblaso.so.0
  421. fi
  422. %post threads
  423. update-alternatives \
  424. --install %{_libdir}/libblas.so.3 libblas.so.3 \
  425. %{_libdir}/libopenblasp.so.0 45 \
  426. --slave %{_libdir}/libcblas.so.3 libcblas.so.3 \
  427. %{_libdir}/libopenblasp.so.0
  428. update-alternatives \
  429. --install %{_libdir}/liblapack.so.3 liblapack.so.3 \
  430. %{_libdir}/libopenblasp.so.0 45 \
  431. --slave %{_libdir}/liblapacke.so.3 liblapacke.so.3 \
  432. %{_libdir}/libopenblasp.so.0
  433. %preun threads
  434. if [ "$1" = "0" ]
  435. then
  436. update-alternatives \
  437. --remove libblas.so.3 %{_libdir}/libopenblasp.so.0
  438. update-alternatives \
  439. --remove liblapack.so.3 %{_libdir}/libopenblasp.so.0
  440. fi
  441. %if %build64
  442. %post serial64_
  443. update-alternatives \
  444. --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
  445. %{_libdir}/libopenblas64_.so.0 40 \
  446. --slave %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
  447. %{_libdir}/libopenblas64_.so.0
  448. update-alternatives \
  449. --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
  450. %{_libdir}/libopenblas64_.so.0 40
  451. update-alternatives \
  452. --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
  453. %{_libdir}/libopenblas64_.so.0 40
  454. %preun serial64_
  455. if [ "$1" = "0" ]
  456. then
  457. update-alternatives \
  458. --remove libblas64_.so.3 %{_libdir}/libopenblas64_.so.0
  459. update-alternatives \
  460. --remove liblapack64_.so.3 %{_libdir}/libopenblas64_.so.0
  461. update-alternatives \
  462. --remove liblapacke64_.so.3 %{_libdir}/libopenblas64_.so.0
  463. fi
  464. %post openmp64_
  465. update-alternatives \
  466. --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
  467. %{_libdir}/libopenblaso64_.so.0 42 \
  468. --slave %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
  469. %{_libdir}/libopenblaso64_.so.0
  470. update-alternatives \
  471. --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
  472. %{_libdir}/libopenblaso64_.so.0 42
  473. update-alternatives \
  474. --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
  475. %{_libdir}/libopenblaso64_.so.0 42
  476. %preun openmp64_
  477. if [ "$1" = "0" ]
  478. then
  479. update-alternatives \
  480. --remove libblas64_.so.3 %{_libdir}/libopenblaso64_.so.0
  481. update-alternatives \
  482. --remove liblapack64_.so.3 %{_libdir}/libopenblaso64_.so.0
  483. update-alternatives \
  484. --remove liblapacke64_.so.3 %{_libdir}/libopenblaso64_.so.0
  485. fi
  486. %post threads64_
  487. update-alternatives \
  488. --install %{_libdir}/libblas64_.so.3 libblas64_.so.3 \
  489. %{_libdir}/libopenblasp64_.so.0 45 \
  490. --slave %{_libdir}/libcblas64_.so.3 libcblas64_.so.3 \
  491. %{_libdir}/libopenblasp64_.so.0
  492. update-alternatives \
  493. --install %{_libdir}/liblapack64_.so.3 liblapack64_.so.3 \
  494. %{_libdir}/libopenblasp64_.so.0 45
  495. update-alternatives \
  496. --install %{_libdir}/liblapacke64_.so.3 liblapacke64_.so.3 \
  497. %{_libdir}/libopenblasp64_.so.0 45
  498. %preun threads64_
  499. if [ "$1" = "0" ]
  500. then
  501. update-alternatives \
  502. --remove libblas64_.so.3 %{_libdir}/libopenblasp64_.so.0
  503. update-alternatives \
  504. --remove liblapack64_.so.3 %{_libdir}/libopenblasp64_.so.0
  505. update-alternatives \
  506. --remove liblapacke64_.so.3 %{_libdir}/libopenblasp64_.so.0
  507. fi
  508. %endif
  509. %post devel
  510. update-alternatives \
  511. --install %{_libdir}/libblas.so libblas.so \
  512. %{_libdir}/libopenblas.so 40 \
  513. --slave %{_libdir}/libcblas.so libcblas.so \
  514. %{_libdir}/libopenblas.so \
  515. --slave %{_libdir}/pkgconfig/blas.pc blas.pc \
  516. %{_libdir}/%{name}/blas.pc \
  517. --slave %{_libdir}/pkgconfig/cblas.pc cblas.pc \
  518. %{_libdir}/%{name}/cblas.pc
  519. update-alternatives \
  520. --install %{_libdir}/liblapack.so liblapack.so \
  521. %{_libdir}/libopenblas.so 40 \
  522. --slave %{_libdir}/liblapacke.so liblapacke.so \
  523. %{_libdir}/libopenblas.so \
  524. --slave %{_libdir}/pkgconfig/lapack.pc lapack.pc \
  525. %{_libdir}/%{name}/lapack.pc \
  526. --slave %{_libdir}/pkgconfig/lapacke.pc lapacke.pc \
  527. %{_libdir}/%{name}/lapacke.pc
  528. %preun devel
  529. if [ "$1" = "0" ]
  530. then
  531. update-alternatives \
  532. --remove libblas.so %{_libdir}/libopenblas.so
  533. update-alternatives \
  534. --remove liblapack.so %{_libdir}/libopenblas.so
  535. fi
  536. %if %build64
  537. %post -n %{name}64-devel
  538. update-alternatives \
  539. --install %{_libdir}/libblas64_.so libblas64_.so \
  540. %{_libdir}/libopenblas64_.so 40 \
  541. --slave %{_libdir}/libcblas64_.so libcblas64_.so \
  542. %{_libdir}/libopenblas64_.so \
  543. --slave %{_libdir}/pkgconfig/blas64.pc blas64.pc \
  544. %{_libdir}/%{name}/blas64.pc \
  545. --slave %{_libdir}/pkgconfig/cblas64.pc cblas64.pc \
  546. %{_libdir}/%{name}/cblas64.pc
  547. update-alternatives \
  548. --install %{_libdir}/liblapack64_.so liblapack64_.so \
  549. %{_libdir}/libopenblas64_.so 40 \
  550. --slave %{_libdir}/pkgconfig/lapack64.pc lapack64.pc \
  551. %{_libdir}/%{name}/lapack64.pc
  552. update-alternatives \
  553. --install %{_libdir}/liblapacke64_.so liblapacke64_.so \
  554. %{_libdir}/libopenblas64_.so 40 \
  555. --slave %{_libdir}/pkgconfig/lapacke64.pc lapacke64.pc \
  556. %{_libdir}/%{name}/lapacke64.pc
  557. %preun -n %{name}64-devel
  558. if [ "$1" = "0" ]
  559. then
  560. update-alternatives \
  561. --remove libblas64_.so %{_libdir}/libopenblas64_.so
  562. update-alternatives \
  563. --remove liblapack64_.so %{_libdir}/libopenblas64_.so
  564. update-alternatives \
  565. --remove liblapacke64_.so %{_libdir}/libopenblas64_.so
  566. fi
  567. %endif
  568. %post static
  569. update-alternatives \
  570. --install %{_libdir}/libblas.a libblas.a \
  571. %{_libdir}/libopenblas.a 40 \
  572. --slave %{_libdir}/libcblas.a libcblas.a \
  573. %{_libdir}/libopenblas.a
  574. update-alternatives \
  575. --install %{_libdir}/liblapack.a liblapack.a \
  576. %{_libdir}/libopenblas.a 40 \
  577. --slave %{_libdir}/liblapacke.a liblapacke.a \
  578. %{_libdir}/libopenblas.a
  579. %preun static
  580. if [ "$1" = "0" ]
  581. then
  582. update-alternatives \
  583. --remove libblas.a %{_libdir}/libopenblas.a
  584. update-alternatives \
  585. --remove liblapack.a %{_libdir}/libopenblas.a
  586. fi
  587. %if %build64
  588. %post -n %{name}64-static
  589. update-alternatives \
  590. --install %{_libdir}/libblas64_.a libblas64_.a \
  591. %{_libdir}/libopenblas64_.a 40 \
  592. --slave %{_libdir}/libcblas64_.a libcblas64_.a \
  593. %{_libdir}/libopenblas64_.a
  594. update-alternatives \
  595. --install %{_libdir}/liblapack64_.a liblapack64_.a \
  596. %{_libdir}/libopenblas64_.a 40
  597. update-alternatives \
  598. --install %{_libdir}/liblapacke64_.a liblapacke64_.a \
  599. %{_libdir}/libopenblas64_.a 40
  600. %preun -n %{name}64-static
  601. if [ "$1" = "0" ]
  602. then
  603. update-alternatives \
  604. --remove libblas64_.a %{_libdir}/libopenblas64_.a
  605. update-alternatives \
  606. --remove liblapack64_.a %{_libdir}/libopenblas64_.a
  607. update-alternatives \
  608. --remove liblapacke64_.a %{_libdir}/libopenblas64_.a
  609. fi
  610. %endif
  611. %clean
  612. rm -rf %{buildroot}
  613. %files
  614. %doc serial/Changelog.txt serial/GotoBLAS* serial/LICENSE
  615. %{_libdir}/lib%{name}-*.so
  616. %{_libdir}/lib%{name}.so.*
  617. %files openmp
  618. %doc openmp/Changelog.txt openmp/GotoBLAS* openmp/LICENSE
  619. %{_libdir}/lib%{name}o-*.so
  620. %{_libdir}/lib%{name}o.so.*
  621. %files threads
  622. %doc threaded/Changelog.txt threaded/GotoBLAS* threaded/LICENSE
  623. %{_libdir}/lib%{name}p-*.so
  624. %{_libdir}/lib%{name}p.so.*
  625. %if %build64
  626. %files serial64
  627. %doc serial64/Changelog.txt serial64/GotoBLAS* serial64/LICENSE
  628. %{_libdir}/lib%{name}64-*.so
  629. %{_libdir}/lib%{name}64.so.*
  630. %files serial64_
  631. %doc serial64_/Changelog.txt serial64_/GotoBLAS* serial64_/LICENSE
  632. %{_libdir}/lib%{name}64_-*.so
  633. %{_libdir}/lib%{name}64_.so.*
  634. %files openmp64
  635. %doc openmp64/Changelog.txt openmp64/GotoBLAS* openmp64/LICENSE
  636. %{_libdir}/lib%{name}o64-*.so
  637. %{_libdir}/lib%{name}o64.so.*
  638. %files openmp64_
  639. %doc openmp64_/Changelog.txt openmp64_/GotoBLAS* openmp64_/LICENSE
  640. %{_libdir}/lib%{name}o64_-*.so
  641. %{_libdir}/lib%{name}o64_.so.*
  642. %files threads64
  643. %doc threaded64/Changelog.txt threaded64/GotoBLAS* threaded64/LICENSE
  644. %{_libdir}/lib%{name}p64-*.so
  645. %{_libdir}/lib%{name}p64.so.*
  646. %files threads64_
  647. %doc threaded64_/Changelog.txt threaded64_/GotoBLAS* threaded64_/LICENSE
  648. %{_libdir}/lib%{name}p64_-*.so
  649. %{_libdir}/lib%{name}p64_.so.*
  650. %endif
  651. %files Rblas
  652. %dir %{_libdir}/R/lib
  653. %{_libdir}/R/lib/libRblas.so
  654. %files devel
  655. %{_includedir}/%{name}/
  656. %{_libdir}/lib%{name}.so
  657. %{_libdir}/lib%{name}o.so
  658. %{_libdir}/lib%{name}p.so
  659. %{_libdir}/pkgconfig/openblas.pc
  660. %{_libdir}/pkgconfig/openblaso.pc
  661. %{_libdir}/pkgconfig/openblasp.pc
  662. %dir %{_libdir}/%{name}
  663. %{_libdir}/%{name}/blas.pc
  664. %{_libdir}/%{name}/cblas.pc
  665. %{_libdir}/%{name}/lapack.pc
  666. %{_libdir}/%{name}/lapacke.pc
  667. %files static
  668. %{_libdir}/lib%{name}.a
  669. %{_libdir}/lib%{name}o.a
  670. %{_libdir}/lib%{name}p.a
  671. %if %build64
  672. %files -n %{name}64-devel
  673. %{_libdir}/lib%{name}64.so
  674. %{_libdir}/lib%{name}o64.so
  675. %{_libdir}/lib%{name}p64.so
  676. %{_libdir}/lib%{name}64_.so
  677. %{_libdir}/lib%{name}o64_.so
  678. %{_libdir}/lib%{name}p64_.so
  679. %{_libdir}/pkgconfig/*64.pc
  680. %{_libdir}/pkgconfig/*64_.pc
  681. %dir %{_libdir}/%{name}
  682. %{_libdir}/%{name}/*64*.pc
  683. %files -n %{name}64-static
  684. %{_libdir}/lib%{name}64.a
  685. %{_libdir}/lib%{name}o64.a
  686. %{_libdir}/lib%{name}p64.a
  687. %{_libdir}/lib%{name}64_.a
  688. %{_libdir}/lib%{name}o64_.a
  689. %{_libdir}/lib%{name}p64_.a
  690. %endif
  691. %changelog
  692. * Tue Jan 25 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.3.19-1
  693. - new upstream release.
  694. - dropped ldconfig scriptlets.
  695. * Sun Feb 28 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.3.13-1
  696. - new upstream release.
  697. * Mon Oct 14 2019 Toshiaki Ara <ara_t@384.jp> 0.3.7-1
  698. - update to 0.3.7
  699. * Fri Jan 25 2019 Toshiaki Ara <ara_t@384.jp> 0.3.3-2
  700. - rebuild with gfortran-8.2.0
  701. * Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 0.3.3-1
  702. - update to 0.3.3
  703. - drop Patch2 and 3
  704. * Mon Jul 02 2018 Toshiaki Ara <ara_t@384.jp> 0.2.20-2
  705. - divide subpackages: openblas64-devel openblas64-static
  706. - fix wrong Provides
  707. * Wed Jun 27 2018 Toshiaki Ara <ara_t@384.jp> 0.2.20-1
  708. - initial build for Vine Linux (only x86_64 and %%{ix86})