diff --git a/openblas-0.2.15-system_lapack.patch b/0001-openblas-0.2.15-system_lapack.patch similarity index 100% rename from openblas-0.2.15-system_lapack.patch rename to 0001-openblas-0.2.15-system_lapack.patch diff --git a/openblas-0.2.5-libname.patch b/0002-openblas-0.2.5-libname.patch similarity index 100% rename from openblas-0.2.5-libname.patch rename to 0002-openblas-0.2.5-libname.patch diff --git a/openblas-0.3.21-sbgemm-test.patch b/0003-openblas-0.3.21-sbgemm-test.patch similarity index 100% rename from openblas-0.3.21-sbgemm-test.patch rename to 0003-openblas-0.3.21-sbgemm-test.patch diff --git a/openblas-0.3.11-tests.patch b/0004-openblas-0.3.11-tests.patch similarity index 100% rename from openblas-0.3.11-tests.patch rename to 0004-openblas-0.3.11-tests.patch diff --git a/openblas-0.3.21-c99-1.patch b/0005-openblas-0.3.21-c99-1.patch similarity index 100% rename from openblas-0.3.21-c99-1.patch rename to 0005-openblas-0.3.21-c99-1.patch diff --git a/openblas-0.3.21-c99-2.patch b/0006-openblas-0.3.21-c99-2.patch similarity index 100% rename from openblas-0.3.21-c99-2.patch rename to 0006-openblas-0.3.21-c99-2.patch diff --git a/openblas-0.3.21-c99-3.patch b/0007-openblas-0.3.21-c99-3.patch similarity index 100% rename from openblas-0.3.21-c99-3.patch rename to 0007-openblas-0.3.21-c99-3.patch diff --git a/openblas-0.3.21-c99-4.patch b/0008-openblas-0.3.21-c99-4.patch similarity index 100% rename from openblas-0.3.21-c99-4.patch rename to 0008-openblas-0.3.21-c99-4.patch diff --git a/openblas-0.3.21-c99-5.patch b/0009-openblas-0.3.21-c99-5.patch similarity index 100% rename from openblas-0.3.21-c99-5.patch rename to 0009-openblas-0.3.21-c99-5.patch diff --git a/openblas.spec b/openblas.spec index 299c1d9da70ff2480f6ee80239862cfb17b963b5..53c29d0e4aee2192474c703112812752e2a278e0 100644 --- a/openblas.spec +++ b/openblas.spec @@ -1,67 +1,43 @@ -%define anolis_release 1 +%define anolis_release 2 + %bcond_with system_lapack -# Version of bundled lapack %global lapackver 3.9.1 -# DO NOT "CLEAN UP" OR MODIFY THIS SPEC FILE WITHOUT ASKING THE -# MAINTAINER FIRST! -# -# OpenBLAS is hand written assembler code and it has a limited number -# of supported architectures. Don't enable any new architectures / -# processors a) without checking that it is actually supported and b) -# without modifying the target flags. -# -# The same spec is also used on the EPEL branches, meaninng that some -# "obsoleted" features are still kept in the spec. - Name: openblas +Summary: An optimized BLAS library based on GotoBLAS2 Version: 0.3.21 Release: %{anolis_release}%{?dist} -Summary: An optimized BLAS library based on GotoBLAS2 License: BSD URL: https://github.com/xianyi/OpenBLAS/ Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}/openblas-%{version}.tar.gz -# Use system lapack -Patch0: openblas-0.2.15-system_lapack.patch -# Drop extra p from threaded library name -Patch1: openblas-0.2.5-libname.patch -# Fix SBGEMM test to work with INTERFACE64 -Patch3: openblas-0.3.21-sbgemm-test.patch -# Supply the proper flags to the test makefile -Patch4: openblas-0.3.11-tests.patch -# C99 porting. -Patch5: openblas-0.3.21-c99-1.patch -Patch6: openblas-0.3.21-c99-2.patch -Patch7: openblas-0.3.21-c99-3.patch -Patch8: openblas-0.3.21-c99-4.patch -Patch9: openblas-0.3.21-c99-5.patch - -BuildRequires: make -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: gcc-gfortran +Patch0001: 0001-openblas-0.2.15-system_lapack.patch +Patch0002: 0002-openblas-0.2.5-libname.patch +Patch0003: 0003-openblas-0.3.21-sbgemm-test.patch +Patch0004: 0004-openblas-0.3.11-tests.patch +Patch0005: 0005-openblas-0.3.21-c99-1.patch +Patch0006: 0006-openblas-0.3.21-c99-2.patch +Patch0007: 0007-openblas-0.3.21-c99-3.patch +Patch0008: 0008-openblas-0.3.21-c99-4.patch +Patch0009: 0009-openblas-0.3.21-c99-5.patch + +BuildRequires: make gcc gcc-c++ gcc-gfortran BuildRequires: perl-devel - -Obsoletes: %{name}-Rblas < %{version}-%{release} +Obsoletes: %{name}-Rblas < %{EVR} %global execstack 1 %if %{execstack} -BuildRequires: /usr/bin/execstack +BuildRequires: execstack %endif -# LAPACK %if %{with system_lapack} BuildRequires: lapack-static -# Do we have LAPACKE? (Needs at least lapack 3.4.0) %global lapacke 1 %else -# Use bundled LAPACK %global lapacke 1 Provides: bundled(lapack) = %{lapackver} %endif -# Build 64-bit interface binaries %global build64 1 %bcond_without cpp_thread_check @@ -71,41 +47,49 @@ BuildRequires: lapack64-static %endif %endif -%global base_description \ -OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ -version. The project is supported by the Lab of Parallel Software and \ -Computational Science, ISCAS. http://www.rdcps.ac.cn - - %description -%{base_description} +OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13 BSD version. + +For a general introduction to the BLAS routines, please refer to the extensive documentation of +their reference implementation hosted at netlib: https://www.netlib.org/blas. On that site you will +likewise find documentation for the reference implementation of the higher-level library LAPACK - +the Linear Algebra Package that comes included with OpenBLAS. If you are looking for a general primer +or refresher on Linear Algebra, the set of six 20-minute lecture videos by Prof. Gilbert Strang on either +MIT OpenCourseWare https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/ or +Youtube https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek may be helpful. %package serial Summary: An optimized BLAS library based on GotoBLAS2, serial version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description serial -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the sequential library compiled with a 32-bit integer interface. %package openmp Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description openmp -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with OpenMP support with 32-bit integer interface. %package threads Summary: An optimized BLAS library based on GotoBLAS2, pthreads version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description threads -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with threading support and a 32-bit integer interface. @@ -113,150 +97,158 @@ a 32-bit integer interface. %if %build64 %package serial64 Summary: An optimized BLAS library based on GotoBLAS2, serial version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description serial64 -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the sequential library compiled with a 64-bit integer interface. %package openmp64 Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description openmp64 -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with OpenMP support and 64-bit integer interface. %package threads64 Summary: An optimized BLAS library based on GotoBLAS2, pthreads version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description threads64 -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with threading support and 64-bit integer interface. %package serial64_ Summary: An optimized BLAS library based on GotoBLAS2, serial version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description serial64_ -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the sequential library compiled with a 64-bit integer interface and a symbol name suffix. %package openmp64_ Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description openmp64_ -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with OpenMP support and 64-bit integer interface and a symbol name suffix. %package threads64_ Summary: An optimized BLAS library based on GotoBLAS2, pthreads version -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} %description threads64_ -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the library compiled with threading support and 64-bit integer interface and a symbol name suffix. %endif - %package devel Summary: Development headers and libraries for OpenBLAS -Requires: %{name} = %{version}-%{release} -Requires: %{name}-serial = %{version}-%{release} -Requires: %{name}-openmp = %{version}-%{release} -Requires: %{name}-threads = %{version}-%{release} +Requires: %{name} = %{EVR} +Requires: %{name}-serial = %{EVR} +Requires: %{name}-openmp = %{EVR} +Requires: %{name}-threads = %{EVR} %if %build64 -Requires: %{name}-openmp64 = %{version}-%{release} -Requires: %{name}-threads64 = %{version}-%{release} -Requires: %{name}-serial64 = %{version}-%{release} -Requires: %{name}-openmp64_ = %{version}-%{release} -Requires: %{name}-threads64_ = %{version}-%{release} -Requires: %{name}-serial64_ = %{version}-%{release} +Requires: %{name}-serial64 = %{EVR} +Requires: %{name}-serial64_ = %{EVR} +Requires: %{name}-openmp64 = %{EVR} +Requires: %{name}-threads64 = %{EVR} +Requires: %{name}-openmp64_ = %{EVR} +Requires: %{name}-threads64_ = %{EVR} %endif Requires: %{name}-srpm-macros %description devel -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the development headers and libraries. %package static Summary: Static version of OpenBLAS -Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-devel = %{EVR} %description static -%{base_description} +OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ +version. The project is supported by the Lab of Parallel Software and \ +Computational Science, ISCAS. http://www.rdcps.ac.cn This package contains the static libraries. - %prep %setup -q -c -T -# Untar source tar zxf %{SOURCE0} cd OpenBLAS-%{version} %if %{with system_lapack} -%patch0 -p1 -b .system_lapack +%patch0001 -p1 -b .system_lapack %endif -%patch1 -p1 -b .libname -%patch3 -p1 -b .sbgemm -%patch4 -p1 -b .tests -%patch5 -p1 -b .c99-1 -%patch6 -p1 -b .c99-2 -%patch7 -p1 -b .c99-3 -%patch8 -p1 -b .c99-4 -%patch9 -p1 -b .c99-5 - -# Fix source permissions +%patch0002 -p1 -b .libname +%patch0003 -p1 -b .sbgemm +%patch0004 -p1 -b .tests +%patch0005 -p1 -b .c99-1 +%patch0006 -p1 -b .c99-2 +%patch0007 -p1 -b .c99-3 +%patch0008 -p1 -b .c99-4 +%patch0009 -p1 -b .c99-5 + find -name \*.f -exec chmod 644 {} \; %if %{with system_lapack} -# Get rid of bundled LAPACK sources rm -rf lapack-netlib %endif -# Make serial, threaded and OpenMP versions; as well as 64-bit versions cd .. cp -ar OpenBLAS-%{version} openmp cp -ar OpenBLAS-%{version} threaded + %if %build64 for d in {serial,threaded,openmp}64{,_}; do cp -ar OpenBLAS-%{version} $d done %endif + mv OpenBLAS-%{version} serial %if %{with system_lapack} -# Setup 32-bit interface LAPACK mkdir netliblapack cd netliblapack ar x %{_libdir}/liblapack_pic.a -# Get rid of duplicate functions. See list in Makefile of lapack directory for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do \rm {c,d,s,z}$f.o done -# LAPACKE %if %{lapacke} ar x %{_libdir}/liblapacke.a %endif -# Create makefile echo "TOPDIR = .." > Makefile echo "include ../Makefile.system" >> Makefile echo "COMMONOBJS = \\" >> Makefile @@ -271,29 +263,23 @@ cp -a %{_includedir}/lapacke . %endif cd .. -# Copy in place for d in serial threaded openmp; do cp -pr netliblapack $d done rm -rf netliblapack - -# Setup 64-bit interface LAPACK %if %build64 mkdir netliblapack64 cd netliblapack64 ar x %{_libdir}/liblapack64_pic.a -# Get rid of duplicate functions. See list in Makefile of lapack directory for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do \rm {c,d,s,z}$f.o done -# LAPACKE, no 64-bit interface %if %{lapacke} ar x %{_libdir}/liblapacke.a %endif -# Create makefile echo "TOPDIR = .." > Makefile echo "include ../Makefile.system" >> Makefile echo "COMMONOBJS = \\" >> Makefile @@ -306,9 +292,9 @@ echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile # Copy include files cp -a %{_includedir}/lapacke . %endif + cd .. -# Copy in place for d in {serial,threaded,openmp}64{,_}; do cp -pr netliblapack64 $d/netliblapack done @@ -317,17 +303,13 @@ rm -rf netliblapack64 %endif %build -# openblas fails to build with LTO due to undefined symbols. These could -# well be the result of the assembly code used in this package %define _lto_cflags %{nil} %if !%{lapacke} LAPACKE="NO_LAPACKE=1" %endif -# Maximum possible amount of processors NMAX="NUM_THREADS=128" -# Compability for old versions of GCC %ifarch x86_64 TARGET="TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1" %endif @@ -337,16 +319,13 @@ TARGET="TARGET=ARMV8 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1" COMMON="%{optflags} -fPIC" FCOMMON="%{optflags} -fPIC -frecursive" -# Use Fedora linker flags export LDFLAGS="%{__global_ldflags}" -# Declare some necessary build flags COMMON="%{optflags} -fPIC" FCOMMON="$COMMON -frecursive" make -C serial $TARGET USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="$COMMON" FCOMMON_OPT="$FCOMMON" $NMAX LIBPREFIX="libopenblas" $AVX $LAPACKE INTERFACE64=0 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 -# USE_THREAD determines use of SMP, not of pthreads COMMON="%{optflags} -fPIC -fopenmp -pthread" FCOMMON="$COMMON -frecursive" 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 %{with cpp_thread_check:CPP_THREAD_SAFETY_TEST=1} @@ -372,17 +351,13 @@ make -C openmp64_ $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_ %endif %install -# Install serial library and headers 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 -# Copy lapacke include files %if %{with system_lapack} && %{lapacke} cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name} %endif -# Fix name of libraries: runtime CPU detection has none suffix="" -# but archs that don't have it do have one slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so` mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a if [[ "$suffix" != "" ]]; then @@ -392,32 +367,29 @@ else sname=${slibname} fi -# Install the OpenMP library olibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o|g"` -install -D -p -m 644 openmp/${olibname}.a %{buildroot}%{_libdir}/lib%{name}o.a +install -D -pm 644 openmp/${olibname}.a %{buildroot}%{_libdir}/lib%{name}o.a if [[ "$suffix" != "" ]]; then oname=$(echo $olibname | sed "s|$suffix||g") else oname=${olibname} fi -install -D -p -m 755 openmp/${olibname}.so %{buildroot}%{_libdir}/${oname}.so +install -D -pm 755 openmp/${olibname}.so %{buildroot}%{_libdir}/${oname}.so -# Install the threaded library plibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p|g"` -install -D -p -m 644 threaded/${plibname}.a %{buildroot}%{_libdir}/lib%{name}p.a +install -D -pm 644 threaded/${plibname}.a %{buildroot}%{_libdir}/lib%{name}p.a if [[ "$suffix" != "" ]]; then pname=$(echo $plibname | sed "s|$suffix||g") else pname=${plibname} fi -install -D -p -m 755 threaded/${plibname}.so %{buildroot}%{_libdir}/${pname}.so +install -D -pm 755 threaded/${plibname}.so %{buildroot}%{_libdir}/${pname}.so -# Install the 64-bit interface libraries %if %build64 slibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64|g"` -install -D -p -m 644 serial64/${slibname64}.a %{buildroot}%{_libdir}/lib%{name}64.a +install -D -pm 644 serial64/${slibname64}.a %{buildroot}%{_libdir}/lib%{name}64.a slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"` -install -D -p -m 644 serial64_/${slibname64_}.a %{buildroot}%{_libdir}/lib%{name}64_.a +install -D -pm 644 serial64_/${slibname64_}.a %{buildroot}%{_libdir}/lib%{name}64_.a if [[ "$suffix" != "" ]]; then sname64=$(echo ${slibname64} | sed "s|$suffix||g") @@ -426,13 +398,13 @@ else sname64=${slibname64} sname64_=${slibname64_} fi -install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so -install -D -p -m 755 serial64_/${slibname64_}.so %{buildroot}%{_libdir}/${sname64_}.so +install -D -pm 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so +install -D -pm 755 serial64_/${slibname64_}.so %{buildroot}%{_libdir}/${sname64_}.so olibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64|g"` -install -D -p -m 644 openmp64/${olibname64}.a %{buildroot}%{_libdir}/lib%{name}o64.a +install -D -pm 644 openmp64/${olibname64}.a %{buildroot}%{_libdir}/lib%{name}o64.a olibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64_|g"` -install -D -p -m 644 openmp64_/${olibname64_}.a %{buildroot}%{_libdir}/lib%{name}o64_.a +install -D -pm 644 openmp64_/${olibname64_}.a %{buildroot}%{_libdir}/lib%{name}o64_.a if [[ "$suffix" != "" ]]; then oname64=$(echo ${olibname64} | sed "s|$suffix||g") @@ -441,13 +413,13 @@ else oname64=${olibname64} oname64_=${olibname64_} fi -install -D -p -m 755 openmp64/${olibname64}.so %{buildroot}%{_libdir}/${oname64}.so -install -D -p -m 755 openmp64_/${olibname64_}.so %{buildroot}%{_libdir}/${oname64_}.so +install -D -pm 755 openmp64/${olibname64}.so %{buildroot}%{_libdir}/${oname64}.so +install -D -pm 755 openmp64_/${olibname64_}.so %{buildroot}%{_libdir}/${oname64_}.so plibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64|g"` -install -D -p -m 644 threaded64/${plibname64}.a %{buildroot}%{_libdir}/lib%{name}p64.a +install -D -pm 644 threaded64/${plibname64}.a %{buildroot}%{_libdir}/lib%{name}p64.a plibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64_|g"` -install -D -p -m 644 threaded64_/${plibname64_}.a %{buildroot}%{_libdir}/lib%{name}p64_.a +install -D -pm 644 threaded64_/${plibname64_}.a %{buildroot}%{_libdir}/lib%{name}p64_.a if [[ "$suffix" != "" ]]; then pname64=$(echo $plibname64 | sed "s|$suffix||g") @@ -456,106 +428,98 @@ else pname64=${plibname64} pname64_=${plibname64_} fi -install -D -p -m 755 threaded64/${plibname64}.so %{buildroot}%{_libdir}/${pname64}.so -install -D -p -m 755 threaded64_/${plibname64_}.so %{buildroot}%{_libdir}/${pname64_}.so +install -D -pm 755 threaded64/${plibname64}.so %{buildroot}%{_libdir}/${pname64}.so +install -D -pm 755 threaded64_/${plibname64_}.so %{buildroot}%{_libdir}/${pname64_}.so %endif -# Fix symlinks pushd %{buildroot}%{_libdir} -# Serial libraries -ln -sf ${sname}.so lib%{name}.so ln -sf ${sname}.so lib%{name}.so.0 -# OpenMP libraries -ln -sf ${oname}.so lib%{name}o.so +ln -sf ${sname}.so lib%{name}.so ln -sf ${oname}.so lib%{name}o.so.0 -# Threaded libraries -ln -sf ${pname}.so lib%{name}p.so +ln -sf ${oname}.so lib%{name}o.so ln -sf ${pname}.so lib%{name}p.so.0 +ln -sf ${pname}.so lib%{name}p.so %if %build64 -# Serial libraries -ln -sf ${sname64}.so lib%{name}64.so ln -sf ${sname64}.so lib%{name}64.so.0 -ln -sf ${sname64_}.so lib%{name}64_.so +ln -sf ${sname64}.so lib%{name}64.so ln -sf ${sname64_}.so lib%{name}64_.so.0 -# OpenMP libraries -ln -sf ${oname64}.so lib%{name}o64.so +ln -sf ${sname64_}.so lib%{name}64_.so ln -sf ${oname64}.so lib%{name}o64.so.0 -ln -sf ${oname64_}.so lib%{name}o64_.so +ln -sf ${oname64}.so lib%{name}o64.so ln -sf ${oname64_}.so lib%{name}o64_.so.0 -# Threaded libraries -ln -sf ${pname64}.so lib%{name}p64.so +ln -sf ${oname64_}.so lib%{name}o64_.so ln -sf ${pname64}.so lib%{name}p64.so.0 -ln -sf ${pname64_}.so lib%{name}p64_.so +ln -sf ${pname64}.so lib%{name}p64.so ln -sf ${pname64_}.so lib%{name}p64_.so.0 +ln -sf ${pname64_}.so lib%{name}p64_.so %endif %if %{execstack} -# Get rid of executable stacks for lib in %{buildroot}%{_libdir}/libopenblas*.so; do execstack -c $lib done %endif -# Get rid of generated CMake config rm -rf %{buildroot}%{_libdir}/cmake -# Get rid of generated pkgconfig rm -rf %{buildroot}%{_libdir}/pkgconfig +%generate_compatibility_deps + %files %license serial/LICENSE %doc serial/Changelog.txt serial/GotoBLAS* %files serial -%{_libdir}/lib%{name}-*.so %{_libdir}/lib%{name}.so.* +%{_libdir}/lib%{name}-*.so %files openmp -%{_libdir}/lib%{name}o-*.so %{_libdir}/lib%{name}o.so.* +%{_libdir}/lib%{name}o-*.so %files threads -%{_libdir}/lib%{name}p-*.so %{_libdir}/lib%{name}p.so.* +%{_libdir}/lib%{name}p-*.so %if %build64 %files serial64 -%{_libdir}/lib%{name}64-*.so %{_libdir}/lib%{name}64.so.* +%{_libdir}/lib%{name}64-*.so %files openmp64 -%{_libdir}/lib%{name}o64-*.so %{_libdir}/lib%{name}o64.so.* +%{_libdir}/lib%{name}o64-*.so %files threads64 -%{_libdir}/lib%{name}p64-*.so %{_libdir}/lib%{name}p64.so.* +%{_libdir}/lib%{name}p64-*.so %files serial64_ -%{_libdir}/lib%{name}64_-*.so %{_libdir}/lib%{name}64_.so.* +%{_libdir}/lib%{name}64_-*.so %files openmp64_ -%{_libdir}/lib%{name}o64_-*.so %{_libdir}/lib%{name}o64_.so.* +%{_libdir}/lib%{name}o64_-*.so %files threads64_ -%{_libdir}/lib%{name}p64_-*.so %{_libdir}/lib%{name}p64_.so.* +%{_libdir}/lib%{name}p64_-*.so %endif %files devel %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so -%{_libdir}/lib%{name}o.so %{_libdir}/lib%{name}p.so +%{_libdir}/lib%{name}o.so %if %build64 -%{_libdir}/lib%{name}64.so +%{_libdir}/lib%{name}p64_.so %{_libdir}/lib%{name}o64.so %{_libdir}/lib%{name}p64.so %{_libdir}/lib%{name}64_.so %{_libdir}/lib%{name}o64_.so -%{_libdir}/lib%{name}p64_.so +%{_libdir}/lib%{name}64.so %endif %files static @@ -563,14 +527,17 @@ rm -rf %{buildroot}%{_libdir}/pkgconfig %{_libdir}/lib%{name}o.a %{_libdir}/lib%{name}p.a %if %build64 -%{_libdir}/lib%{name}64.a %{_libdir}/lib%{name}o64.a %{_libdir}/lib%{name}p64.a -%{_libdir}/lib%{name}64_.a %{_libdir}/lib%{name}o64_.a %{_libdir}/lib%{name}p64_.a +%{_libdir}/lib%{name}64.a +%{_libdir}/lib%{name}64_.a %endif %changelog +* Sat Apr 15 2023 Heng Qi - 0.3.21-2 +- Refactor the spec file + * Fri Jan 27 2023 Funda Wang - 0.3.21-1 - Import package for anolis 23