openblas/openblas.spec

890 lines
28 KiB
RPMSpec
Raw Normal View History

%bcond_with system_lapack
# Version of bundled lapack
2018-05-24 02:01:58 +00:00
%global lapackver 3.8.0
2016-08-18 03:13:18 +00:00
# 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
2018-05-24 02:01:58 +00:00
Version: 0.3.0
Release: 1.0.riscv64%{?dist}
Summary: An optimized BLAS library based on GotoBLAS2
Group: Development/Libraries
License: BSD
URL: https://github.com/xianyi/OpenBLAS/
2016-04-13 00:49:47 +00:00
Source0: https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz
2013-01-14 13:49:28 +00:00
# Use system lapack
2015-10-28 15:41:47 +00:00
Patch0: openblas-0.2.15-system_lapack.patch
2013-01-14 13:49:28 +00:00
# Drop extra p from threaded library name
Patch1: openblas-0.2.5-libname.patch
2016-03-18 18:27:41 +00:00
# Don't use constructor priorities on too old architectures
Patch2: openblas-0.2.15-constructor.patch
2016-07-13 19:36:59 +00:00
# Supply the proper flags to the test makefile
2016-09-01 20:53:31 +00:00
Patch3: openblas-0.2.19-tests.patch
2018-06-01 22:35:38 +00:00
# Upstream pull 1572, fixes fail on ppc64le
Patch4: 1572.patch
# Add support for RISC-V (riscv64)
# Taken from https://github.com/xianyi/OpenBLAS/pull/1526
# No additional modifications done
Patch5: openblass-0.3.0-riscv64.patch
2016-07-13 19:36:59 +00:00
2018-02-27 11:10:18 +00:00
BuildRequires: gcc
BuildRequires: gcc-gfortran
BuildRequires: perl-devel
# Do we have execstack?
%if 0%{?rhel} == 7
%ifarch ppc64le aarch64
%global execstack 0
%else
%global execstack 1
%endif
%else
%global execstack 1
%endif
%if %{execstack}
2015-08-04 16:30:39 +00:00
BuildRequires: /usr/bin/execstack
%endif
2013-01-14 13:49:28 +00:00
# LAPACK
%if %{with system_lapack}
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
BuildRequires: lapack-devel
%else
BuildRequires: lapack-static
%endif
2013-01-14 13:49:28 +00:00
# Do we have LAPACKE? (Needs at least lapack 3.4.0)
%if 0%{?fedora}
2013-01-14 13:49:28 +00:00
%global lapacke 1
%else
%global lapacke 0
%endif
%else
# Use bundled LAPACK
%global lapacke 1
Provides: bundled(lapack) = %{lapackver}
%endif
2013-01-14 13:49:28 +00:00
# Build 64-bit interface binaries?
%if 0%{?__isa_bits} == 64
%global build64 1
%else
%global build64 0
%endif
%if %{with system_lapack}
%if %build64
BuildRequires: lapack64-static
%endif
%endif
2013-01-15 17:44:34 +00:00
# Upstream supports the package only on these architectures.
# Runtime processor detection is not available on other archs.
ExclusiveArch: %{openblas_arches}
2013-01-14 13:49:28 +00:00
%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
2013-01-14 13:49:28 +00:00
%description
%{base_description}
%package Rblas
Summary: A version of OpenBLAS for R to use as libRblas
Group: Development/Libraries
%description Rblas
%{base_description}
2013-01-14 13:49:28 +00:00
%package openmp
Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
Group: Development/Libraries
2013-01-14 13:49:28 +00:00
%description openmp
%{base_description}
This package contains the library compiled with OpenMP support.
%package threads
Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
Group: Development/Libraries
2013-01-14 13:49:28 +00:00
%description threads
%{base_description}
This package contains the library compiled with threading support.
%if %build64
%package serial64
Summary: An optimized BLAS library based on GotoBLAS2, serial version
Group: Development/Libraries
%description serial64
%{base_description}
This package contains the sequential library compiled with a 64-bit
interface.
%package openmp64
Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
Group: Development/Libraries
%description openmp64
%{base_description}
This package contains the library compiled with OpenMP support and
64-bit interface.
%package threads64
Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
Group: Development/Libraries
%description threads64
%{base_description}
This package contains the library compiled with threading support and
64-bit interface.
%package serial64_
Summary: An optimized BLAS library based on GotoBLAS2, serial version
Group: Development/Libraries
%description serial64_
%{base_description}
This package contains the sequential library compiled with a 64-bit
interface and a symbol name suffix.
%package openmp64_
Summary: An optimized BLAS library based on GotoBLAS2, OpenMP version
Group: Development/Libraries
%description openmp64_
%{base_description}
This package contains the library compiled with OpenMP support and
64-bit interface and a symbol name suffix.
%package threads64_
Summary: An optimized BLAS library based on GotoBLAS2, pthreads version
Group: Development/Libraries
%description threads64_
%{base_description}
This package contains the library compiled with threading support and
64-bit interface and a symbol name suffix.
%endif
2013-01-14 13:49:28 +00:00
%package devel
Summary: Development headers and libraries for OpenBLAS
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-openmp%{?_isa} = %{version}-%{release}
Requires: %{name}-threads%{?_isa} = %{version}-%{release}
%if %build64
Requires: %{name}-openmp64%{?_isa} = %{version}-%{release}
Requires: %{name}-threads64%{?_isa} = %{version}-%{release}
Requires: %{name}-serial64%{?_isa} = %{version}-%{release}
Requires: %{name}-openmp64_%{?_isa} = %{version}-%{release}
Requires: %{name}-threads64_%{?_isa} = %{version}-%{release}
Requires: %{name}-serial64_%{?_isa} = %{version}-%{release}
%endif
Requires: %{name}-srpm-macros
2013-01-14 13:49:28 +00:00
%description devel
%{base_description}
This package contains the development headers and libraries.
%package static
Summary: Static version of OpenBLAS
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
2013-01-14 13:49:28 +00:00
%description static
%{base_description}
This package contains the static libraries.
2013-01-14 13:49:28 +00:00
%prep
%setup -q -c -T
# Untar source
tar zxf %{SOURCE0}
cd OpenBLAS-%{version}
%if %{with system_lapack}
2013-07-23 10:06:13 +00:00
%patch0 -p1 -b .system_lapack
%endif
%patch1 -p1 -b .libname
%if 0%{?rhel} == 5
%patch2 -p1 -b .constructor
%endif
2016-07-13 19:36:59 +00:00
%patch3 -p1 -b .tests
2018-06-01 22:35:38 +00:00
%patch4 -p1 -b .ppc64le
%patch5 -p2 -b .riscv64
2013-07-23 10:06:13 +00:00
2015-12-23 20:09:06 +00:00
# Fix source permissions
find -name \*.f -exec chmod 644 {} \;
%if %{with system_lapack}
2013-07-23 10:06:13 +00:00
# Get rid of bundled LAPACK sources
rm -rf lapack-netlib
%endif
2013-01-14 13:49:28 +00:00
# Make serial, threaded and OpenMP versions; as well as 64-bit versions
# Also make an libRblas.so
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
cp -ar OpenBLAS-%{version} Rblas
mv OpenBLAS-%{version} serial
# Hackup Rblas Makefiles
sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/Makefile
sed -i 's|.so.$(MAJOR_VERSION)|.so|g' Rblas/exports/Makefile
sed -i 's|@ln -fs $(LIBSONAME) $(LIBPREFIX).so|#@ln -fs $(LIBSONAME) $(LIBPREFIX).so|g' Rblas/Makefile
%if %{with system_lapack}
# Setup 32-bit interface LAPACK
2013-01-14 13:49:28 +00:00
mkdir netliblapack
cd netliblapack
ar x %{_libdir}/liblapack_pic.a
2013-07-23 10:06:13 +00:00
# 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
2013-01-14 13:49:28 +00:00
# LAPACKE
%if %{lapacke}
ar x %{_libdir}/liblapacke.a
%endif
# Create makefile
echo "TOPDIR = .." > Makefile
echo "include ../Makefile.system" >> Makefile
echo "COMMONOBJS = \\" >> Makefile
for i in *.o; do
echo "$i \\" >> Makefile
done
echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile
%if %{lapacke}
# Copy include files
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
for i in *.o; do
echo "$i \\" >> Makefile
done
echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile
%if %{lapacke}
# Copy include files
cp -a %{_includedir}/lapacke .
%endif
2013-01-14 13:49:28 +00:00
cd ..
# Copy in place
for d in {serial,threaded,openmp}64{,_}; do
cp -pr netliblapack64 $d/netliblapack
done
rm -rf netliblapack64
%endif
%endif
2013-01-14 13:49:28 +00:00
%build
%if !%{lapacke}
2013-01-14 13:49:28 +00:00
LAPACKE="NO_LAPACKE=1"
%endif
# Maximum possible amount of processors
NMAX="NUM_THREADS=128"
2015-12-01 17:50:42 +00:00
%ifarch %{ix86} x86_64
TARGET="TARGET=CORE2 DYNAMIC_ARCH=1"
2015-12-23 21:39:56 +00:00
# Compability for old versions of GCC
%if 0%{?rhel} == 5
export AVX="NO_AVX=1 NO_AVX2=1"
%endif
%if 0%{?rhel} == 6
export AVX="NO_AVX2=1"
%endif
2015-12-01 17:50:42 +00:00
%endif
%ifarch armv7hl
TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
%endif
2016-07-13 19:36:59 +00:00
%ifarch ppc64
TARGET="TARGET=POWER6 DYNAMIC_ARCH=0"
%endif
%ifarch ppc64p7
TARGET="TARGET=POWER7 DYNAMIC_ARCH=0"
%endif
%ifarch ppc64le
TARGET="TARGET=POWER8 DYNAMIC_ARCH=0"
2015-12-01 17:50:42 +00:00
%endif
%ifarch aarch64
TARGET="TARGET=ARMV8 DYNAMIC_ARCH=0"
%endif
%ifarch riscv64
TARGET="TARGET=RISCV64 DYNAMIC_ARCH=0"
%endif
2015-12-01 17:50:42 +00:00
2016-01-13 20:25:34 +00:00
%if 0%{?rhel} == 5
2016-01-13 20:24:14 +00:00
# Gfortran too old to recognize -frecursive
2017-09-14 12:01:02 +00:00
COMMON="%{optflags} -fPIC"
FCOMMON="%{optflags} -fPIC"
2016-01-13 20:24:14 +00:00
%else
2017-09-14 12:01:02 +00:00
FCOMMON="%{optflags} -fPIC -frecursive"
2016-01-13 20:24:14 +00:00
%endif
# Use Fedora linker flags
export LDFLAGS="%{__global_ldflags}"
2016-01-13 20:24:14 +00:00
2017-09-14 12:01:02 +00:00
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
2016-01-13 03:58:05 +00:00
# Declare some necessary build flags
2017-09-14 12:01:02 +00:00
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive"
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
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
2013-01-14 13:49:28 +00:00
# USE_THREAD determines use of SMP, not of pthreads
2017-09-14 12:01:02 +00:00
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
2013-01-14 13:49:28 +00:00
%if %build64
2017-09-14 12:01:02 +00:00
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive -fdefault-integer-8"
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
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
COMMON="%{optflags} -fPIC -fopenmp -pthread"
FCOMMON="$COMMON -frecursive -fdefault-integer-8"
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
2017-09-14 12:01:02 +00:00
COMMON="%{optflags} -fPIC"
FCOMMON="$COMMON -frecursive -fdefault-integer-8"
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_
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_
COMMON="%{optflags} -fPIC -fopenmp -pthread"
FCOMMON="$COMMON -frecursive -fdefault-integer-8"
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_
%endif
2013-01-14 13:49:28 +00:00
%install
rm -rf %{buildroot}
2013-01-14 13:49:28 +00:00
# Install serial library and headers
2015-12-14 21:10:59 +00:00
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
2013-01-14 13:49:28 +00:00
2013-01-15 17:44:34 +00:00
# Copy lapacke include files
%if %{with system_lapack} && %{lapacke}
2013-01-15 17:44:34 +00:00
cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
%endif
2015-12-23 20:09:06 +00:00
# Fix name of libraries
%ifarch armv7hl
2015-12-23 19:21:37 +00:00
suffix="_armv7"
%endif
2016-07-13 19:36:59 +00:00
%ifarch ppc64
suffix="_power6"
%endif
%ifarch ppc64p7
suffix="_power7"
%endif
2015-12-23 21:15:28 +00:00
%ifarch ppc64le
2016-03-16 20:59:21 +00:00
suffix="_power8"
2015-12-23 21:15:28 +00:00
%endif
%ifarch aarch64
suffix="_armv8"
%endif
2017-05-29 14:04:28 +00:00
%ifarch s390x
suffix="_zarch_generic"
%endif
%ifarch riscv64
suffix="_riscv64"
%endif
2015-12-23 19:21:37 +00:00
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
2013-01-14 13:49:28 +00:00
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
sname=$(echo $slibname | sed "s|$suffix||g")
mv %{buildroot}%{_libdir}/${slibname}.so %{buildroot}%{_libdir}/${sname}.so
else
sname=${slibname}
fi
2013-01-14 13:49:28 +00:00
# Install the Rblas library
mkdir -p %{buildroot}%{_libdir}/R/lib/
install -p -m 755 Rblas/libRblas.so %{buildroot}%{_libdir}/R/lib/
2013-01-14 13:49:28 +00:00
# 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
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
oname=$(echo $olibname | sed "s|$suffix||g")
else
2015-12-23 20:09:06 +00:00
oname=${olibname}
fi
install -D -p -m 755 openmp/${olibname}.so %{buildroot}%{_libdir}/${oname}.so
2013-01-14 13:49:28 +00:00
# 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
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
pname=$(echo $plibname | sed "s|$suffix||g")
else
pname=${plibname}
fi
2015-12-23 20:34:08 +00:00
install -D -p -m 755 threaded/${plibname}.so %{buildroot}%{_libdir}/${pname}.so
2013-01-14 13:49:28 +00:00
# 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
2015-12-23 22:00:34 +00:00
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
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
2015-12-23 22:00:34 +00:00
sname64=$(echo ${slibname64} | sed "s|$suffix||g")
sname64_=$(echo ${slibname64_} | sed "s|$suffix||g")
2015-12-23 20:09:06 +00:00
else
sname64=${slibname64}
2015-12-23 22:00:34 +00:00
sname64_=${slibname64_}
2015-12-23 20:09:06 +00:00
fi
install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so
2015-12-23 22:00:34 +00:00
install -D -p -m 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
2015-12-23 22:00:34 +00:00
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
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
2015-12-23 22:00:34 +00:00
oname64=$(echo ${olibname64} | sed "s|$suffix||g")
2015-12-23 22:24:00 +00:00
oname64_=$(echo ${olibname64_} | sed "s|$suffix||g")
2015-12-23 20:09:06 +00:00
else
oname64=${olibname64}
2015-12-23 22:24:00 +00:00
oname64_=${olibname64_}
2015-12-23 20:09:06 +00:00
fi
install -D -p -m 755 openmp64/${olibname64}.so %{buildroot}%{_libdir}/${oname64}.so
2015-12-23 22:24:00 +00:00
install -D -p -m 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
2015-12-23 22:00:34 +00:00
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
2015-12-23 20:09:06 +00:00
if [[ "$suffix" != "" ]]; then
pname64=$(echo $plibname64 | sed "s|$suffix||g")
2015-12-23 22:00:34 +00:00
pname64_=$(echo $plibname64_ | sed "s|$suffix||g")
2015-12-23 20:09:06 +00:00
else
pname64=${plibname64}
2015-12-23 22:00:34 +00:00
pname64_=${plibname64_}
2015-12-23 20:09:06 +00:00
fi
install -D -p -m 755 threaded64/${plibname64}.so %{buildroot}%{_libdir}/${pname64}.so
2015-12-23 22:24:00 +00:00
install -D -p -m 755 threaded64_/${plibname64_}.so %{buildroot}%{_libdir}/${pname64_}.so
%endif
2013-01-14 13:49:28 +00:00
# Fix symlinks
pushd %{buildroot}%{_libdir}
# Serial libraries
2015-12-23 20:09:06 +00:00
ln -sf ${sname}.so lib%{name}.so
ln -sf ${sname}.so lib%{name}.so.0
2013-01-14 13:49:28 +00:00
# OpenMP libraries
2015-12-23 20:09:06 +00:00
ln -sf ${oname}.so lib%{name}o.so
ln -sf ${oname}.so lib%{name}o.so.0
2013-01-14 13:49:28 +00:00
# Threaded libraries
2015-12-23 20:09:06 +00:00
ln -sf ${pname}.so lib%{name}p.so
ln -sf ${pname}.so lib%{name}p.so.0
2013-01-14 13:49:28 +00:00
%if %build64
# Serial libraries
2015-12-23 20:09:06 +00:00
ln -sf ${sname64}.so lib%{name}64.so
ln -sf ${sname64}.so lib%{name}64.so.0
2015-12-23 22:24:00 +00:00
ln -sf ${sname64_}.so lib%{name}64_.so
ln -sf ${sname64_}.so lib%{name}64_.so.0
# OpenMP libraries
2015-12-23 20:09:06 +00:00
ln -sf ${oname64}.so lib%{name}o64.so
ln -sf ${oname64}.so lib%{name}o64.so.0
2015-12-23 22:24:00 +00:00
ln -sf ${oname64_}.so lib%{name}o64_.so
ln -sf ${oname64_}.so lib%{name}o64_.so.0
# Threaded libraries
2015-12-23 22:42:13 +00:00
ln -sf ${pname64}.so lib%{name}p64.so
2015-12-23 20:09:06 +00:00
ln -sf ${pname64}.so lib%{name}p64.so.0
2015-12-23 22:42:13 +00:00
ln -sf ${pname64_}.so lib%{name}p64_.so
2015-12-23 22:24:00 +00:00
ln -sf ${pname64_}.so lib%{name}p64_.so.0
%endif
%if %{execstack}
2013-01-14 13:49:28 +00:00
# Get rid of executable stacks
2015-12-23 20:09:06 +00:00
for lib in %{buildroot}%{_libdir}/libopenblas*.so; do
2013-01-14 13:49:28 +00:00
execstack -c $lib
done
%endif
2013-01-14 13:49:28 +00:00
2014-12-05 20:41:18 +00:00
# Get rid of generated CMake config
2015-03-25 19:41:49 +00:00
rm -rf %{buildroot}%{_libdir}/cmake
2017-07-30 19:09:03 +00:00
# Get rid of generated pkgconfig
rm -rf %{buildroot}%{_libdir}/pkgconfig
2014-12-05 20:41:18 +00:00
2013-01-14 13:49:28 +00:00
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post openmp -p /sbin/ldconfig
%postun openmp -p /sbin/ldconfig
%post Rblas -p /sbin/ldconfig
%postun Rblas -p /sbin/ldconfig
2013-01-14 13:49:28 +00:00
%post threads -p /sbin/ldconfig
%postun threads -p /sbin/ldconfig
2015-05-04 00:06:37 +00:00
%if %build64
%post openmp64 -p /sbin/ldconfig
%postun openmp64 -p /sbin/ldconfig
2015-12-23 20:09:06 +00:00
%post openmp64_ -p /sbin/ldconfig
%postun openmp64_ -p /sbin/ldconfig
2015-05-04 00:06:37 +00:00
%post serial64 -p /sbin/ldconfig
%postun serial64 -p /sbin/ldconfig
2015-12-23 20:09:06 +00:00
%post serial64_ -p /sbin/ldconfig
%postun serial64_ -p /sbin/ldconfig
2015-05-04 00:06:37 +00:00
%post threads64 -p /sbin/ldconfig
%postun threads64 -p /sbin/ldconfig
2015-12-23 20:09:06 +00:00
%post threads64_ -p /sbin/ldconfig
%postun threads64_ -p /sbin/ldconfig
2015-05-04 00:06:37 +00:00
%endif
2013-01-14 13:49:28 +00:00
%files
%doc serial/Changelog.txt serial/GotoBLAS* serial/LICENSE
%{_libdir}/lib%{name}-*.so
%{_libdir}/lib%{name}.so.*
%files openmp
%{_libdir}/lib%{name}o-*.so
%{_libdir}/lib%{name}o.so.*
%files threads
%{_libdir}/lib%{name}p-*.so
%{_libdir}/lib%{name}p.so.*
%if %build64
%files serial64
%{_libdir}/lib%{name}64-*.so
%{_libdir}/lib%{name}64.so.*
%files openmp64
%{_libdir}/lib%{name}o64-*.so
%{_libdir}/lib%{name}o64.so.*
%files threads64
%{_libdir}/lib%{name}p64-*.so
%{_libdir}/lib%{name}p64.so.*
2015-12-23 20:09:06 +00:00
%files serial64_
%{_libdir}/lib%{name}64_-*.so
%{_libdir}/lib%{name}64_.so.*
%files openmp64_
%{_libdir}/lib%{name}o64_-*.so
%{_libdir}/lib%{name}o64_.so.*
%files threads64_
%{_libdir}/lib%{name}p64_-*.so
%{_libdir}/lib%{name}p64_.so.*
%endif
2013-01-14 13:49:28 +00:00
%files devel
%{_includedir}/%{name}/
2013-01-14 13:49:28 +00:00
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}o.so
%{_libdir}/lib%{name}p.so
%if %build64
%{_libdir}/lib%{name}64.so
%{_libdir}/lib%{name}o64.so
%{_libdir}/lib%{name}p64.so
2015-12-23 22:57:57 +00:00
%{_libdir}/lib%{name}64_.so
%{_libdir}/lib%{name}o64_.so
%{_libdir}/lib%{name}p64_.so
%endif
2013-01-14 13:49:28 +00:00
%files Rblas
2016-12-14 17:39:25 +00:00
%{_libdir}/R/lib/libRblas.so
2013-01-14 13:49:28 +00:00
%files static
%{_libdir}/lib%{name}.a
%{_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
2015-12-23 20:09:06 +00:00
%{_libdir}/lib%{name}64_.a
%{_libdir}/lib%{name}o64_.a
%{_libdir}/lib%{name}p64_.a
%endif
2013-01-14 13:49:28 +00:00
%changelog
* Sun Jun 03 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 0.3.0-1.0.riscv64
- Add support for RISC-V (riscv64)
2018-05-24 02:01:58 +00:00
* Thu May 24 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.3.0-1
- Update to 0.3.0.
2018-03-22 15:29:34 +00:00
* Thu Mar 22 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-10
- Disable CPU affinity unintentionally enabled upstream (BZ #1558091).
2018-03-22 16:13:25 +00:00
* Sun Mar 04 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-9
2018-03-04 21:28:09 +00:00
- Clean up obsolete conditionals for 64 bit builds in spec file.
* Tue Feb 27 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-8
- Use %%__global_ldflags instead of %%build_ldflags that doesn't work on
all distributions.
2018-02-27 11:10:18 +00:00
* Tue Feb 27 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-7
- Honor Fedora linker flags (BZ #1548750).
* Wed Feb 14 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-6
- Drop arch-dependent buildrequires (BZ #1545201); no changes to package
(only affects packages custom built with --with system_lapack).
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2018-01-30 08:42:57 +00:00
* Tue Jan 30 2018 Florian Weimer <fweimer@redhat.com> - 0.2.20-4
- Rebuild for GCC 8
2017-09-14 12:01:02 +00:00
* Thu Sep 14 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-3
- Simplify spec, dropping extra lib arguments.
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2017-07-29 01:53:39 +00:00
* Fri Jul 28 2017 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.20-1
- Update to 0.2.20.
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.19-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-05-29 14:04:28 +00:00
* Mon May 29 2017 Dan Horák <dan[at]danny.cz> - 0.2.19-11
- add generic s390x support (#1442048)
* Mon Mar 20 2017 Orion Poplawski <orion@cora.nwra.com> - 0.2.19-10
- Drop openblas-srpm-macros version requirement
* Mon Mar 20 2017 Orion Poplawski <orion@cora.nwra.com> - 0.2.19-9
- Move openblas-srpm-macros to separate package
* Wed Mar 15 2017 Orion Poplawski <orion@cora.nwra.com> - 0.2.19-8
- Define %%openblas_arches for dependent packages to use
* Mon Feb 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.2.19-7
- Upgrade Patch4 to hopefully fully fix the issues on PPC64LE
2017-02-03 23:15:25 +00:00
* Fri Feb 03 2017 Björn Esser <besser82@fedoraproject.org> - 0.2.19-6
2017-02-03 23:20:54 +00:00
- Add Patch4 to fix register clobbers (BZ #1417385)
2017-02-03 23:15:25 +00:00
2017-01-28 09:35:21 +00:00
* Sat Jan 28 2017 Björn Esser <besser82@fedoraproject.org> - 0.2.19-5
- Rebuilt for GCC-7
* Wed Dec 14 2016 Tom Callaway <spot@fedoraproject.org> - 0.2.19-4
- build a copy of openblas that thinks it is Rblas
There are no code changes, except for libname and soname, it is identical to libopenblas.so.0
Unfortunately, while R itself is fine using a symlink from libopenblas.so.0 to libRblas.so
2017-01-28 09:35:21 +00:00
the larger R ecosystem becomes unhappy in this scenario.
2016-11-03 16:42:35 +00:00
* Thu Nov 03 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.19-3
- Fix linkage of OpenMP libraries (BZ #1391491).
* Thu Oct 20 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.19-2
2016-10-19 02:46:26 +00:00
- Actually use 8-bit integers in 64-bit interfaces (BZ #1382916).
* Tue Oct 18 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.19-1
2016-09-01 20:37:49 +00:00
- Update to 0.2.19.
2016-08-18 03:14:39 +00:00
* Wed Aug 17 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.18-5
2016-08-18 03:13:18 +00:00
- Revert "minor spec cleanups" by Peter Robinson.
* Wed Jul 13 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.2.18-4
- aarch64 has execstack in Fedora
- Minor spec cleanups
2016-07-13 19:36:59 +00:00
* Wed Jul 13 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.18-3
- Enable ppc64 and ppc64p7 architectures
based on Dan Horák's patch (BZ #1356189).
- Supply proper make flags to the tests.
* Tue Jul 12 2016 Jeff Bastian <jbastian@redhat.com> - 0.2.18-2
- update for aarch64
2016-04-13 00:45:04 +00:00
* Tue Apr 12 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.18-1
- Update to 0.2.18.
2016-04-06 17:34:27 +00:00
* Wed Apr 6 2016 Orion Poplawski <orion@cora.nwra.com> - 0.2.17-1
- Update to 0.2.17
2016-03-18 18:27:41 +00:00
* Fri Mar 18 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.16-3
- Include deprecated LAPACK functions.
2016-03-16 20:59:21 +00:00
* Wed Mar 16 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.16-2
- Fix library suffix on ppc64le.
2016-03-16 01:49:41 +00:00
* Tue Mar 15 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.16-1
- Update to 0.2.16.
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.15-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2016-01-13 03:58:05 +00:00
* Tue Jan 12 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-5
- Need to use -frecursive to make LAPACK thread safe.
* Tue Jan 12 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-4
- Add version to bundled lapack provide.
* Mon Jan 11 2016 Orion Poplawski <orion@cora.nwra.com> - 0.2.15-3
- Allow conditional build with or without system lapack, default to without
2015-12-01 17:36:14 +00:00
* Tue Dec 01 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-2
- Enable armv7hl and ppc64le architectures.
- Build versions of the 64-bit libraries with an additional suffix
(BZ #1287541).
2015-12-01 17:36:14 +00:00
2015-10-28 14:47:17 +00:00
* Wed Oct 28 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-1
- Update to 0.2.15.
2015-08-04 16:30:39 +00:00
* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.14-4
- Use new execstack (#1247795)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-04 00:06:37 +00:00
* Sun May 3 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.2.14-2
- Run ldconfig on 64 builds too
2015-03-25 19:12:53 +00:00
* Wed Mar 25 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.14-1
- Update to 0.2.14.
2014-12-19 05:35:09 +00:00
* Fri Dec 19 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.13-2
- Bump spec due to LAPACK rebuild.
2014-12-05 19:39:02 +00:00
* Fri Dec 05 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.13-1
- Update to 0.2.13.
2014-10-13 22:16:50 +00:00
* Mon Oct 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.12-1
- Update to 0.2.12.
2014-08-18 19:10:47 +00:00
* Mon Aug 18 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.11-1
- Update to 0.2.11.
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2014-07-16 15:47:20 +00:00
* Wed Jul 16 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.10-1
- Update to 0.2.10.
* Wed Jun 11 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.9-1
- Increase maximum amount of cores from 32 to 128.
- Add 64-bit interface support. (BZ #1088256)
- Update to 0.2.9. (BZ #1043083)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2013-08-07 11:17:17 +00:00
* Wed Aug 07 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.8-1
- Update to 0.2.8.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-07-23 10:06:13 +00:00
* Tue Jul 23 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.7-1
- Update to 0.2.7.
- Use OpenBLAS versions of LAPACK functions, as they seem to be
working now.
* Mon Jul 08 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-10
- Due to long standing bug, replace all OpenBLAS LAPACK functions with
2013-07-23 10:06:13 +00:00
generic ones, so that package can finally be released in stable.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2013-01-15 17:44:34 +00:00
* Tue Jan 15 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-8
- Added LAPACKE include files.
* Mon Jan 14 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-7
- Fix build on RHEL5 and ppc architecture.
2013-01-14 13:49:28 +00:00
* Mon Dec 24 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-6
- Review fixes.
* Fri Dec 21 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-5
- Disable LAPACKE support on distributions where it is not available due to
a too old version of lapack.
* Mon Dec 17 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-4
- Don't use reference LAPACK functions that have optimized implementation.
* Wed Dec 12 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-3
- Use system version of LAPACK.
* Mon Nov 26 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-2
- Fixed 32-bit build, and build on EPEL 5.
* Mon Nov 26 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-1
- Update to 0.2.5.
* Thu Oct 06 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.1-2.alpha2.4
- Added documentation.
* Sun Sep 18 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.1-1.alpha2.4
- First release.