Orion Poplawski 7a510b
%bcond_with system_lapack
f2466d
# Version of bundled lapack
f2466d
%global lapackver 3.5.0
Orion Poplawski 7a510b
058c89
Name:           openblas
ec8c30
Version:        0.2.15
83523a
Release:        5%{?dist}
058c89
Summary:        An optimized BLAS library based on GotoBLAS2
058c89
Group:          Development/Libraries
058c89
License:        BSD
058c89
URL:            https://github.com/xianyi/OpenBLAS/
058c89
Source0:        https://github.com/xianyi/OpenBLAS/archive/v%{version}.tar.gz
23ef1b
# Use system lapack
453497
Patch0:         openblas-0.2.15-system_lapack.patch
23ef1b
# Drop extra p from threaded library name
058c89
Patch1:         openblas-0.2.5-libname.patch
f2466d
# Don't use constructor priorities
f2466d
Patch2:         openblas-0.2.15-constructor.patch
058c89
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
23ef1b
058c89
BuildRequires:  gcc-gfortran
f2466d
f2466d
# Do we have execstack?
f2466d
%if 0%{?rhel} == 7
f2466d
%ifarch ppc64le
f2466d
%global execstack 0
f2466d
%else
f2466d
%global execstack 1
f2466d
%endif
f2466d
%else
f2466d
%global execstack 1
f2466d
%endif
f2466d
%if %{execstack}
8fa6aa
BuildRequires:  /usr/bin/execstack
f2466d
%endif
f2466d
23ef1b
# LAPACK
Orion Poplawski 7a510b
%if %{with system_lapack}
2aef77
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
058c89
BuildRequires:  lapack-devel%{?_isa}
dc549c
%else
058c89
BuildRequires:  lapack-static%{?_isa}
dc549c
%endif
23ef1b
# Do we have LAPACKE? (Needs at least lapack 3.4.0)
Orion Poplawski 7a510b
%if 0%{?fedora}
23ef1b
%global lapacke 1
23ef1b
%else
23ef1b
%global lapacke 0
23ef1b
%endif
f2466d
Orion Poplawski 7a510b
%else
f2466d
# Use bundled LAPACK
Orion Poplawski 7a510b
%global lapacke 1
f2466d
Provides:       bundled(lapack) = %{lapackver}
Orion Poplawski 7a510b
%endif
23ef1b
058c89
# Build 64-bit interface binaries?
058c89
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
058c89
# RPM too old to know __isa_bits in RHEL 5, and lapack64 doesn't exist in RHEL 6
058c89
%global build64 0
058c89
%else
058c89
%if 0%{?__isa_bits} == 64
058c89
%global build64 1
058c89
%else
058c89
%global build64 0
058c89
%endif
058c89
%endif
058c89
Orion Poplawski 7a510b
%if %{with system_lapack}
058c89
%if %build64
058c89
BuildRequires:  lapack64-static
058c89
%endif
Orion Poplawski 7a510b
%endif
058c89
494941
# Upstream supports the package only on these architectures.
494941
# Runtime processor detection is not available on other archs.
b8078e
ExclusiveArch:  x86_64 %{ix86} armv7hl ppc64le
7c8251
23ef1b
%global base_description \
7c8251
OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
7c8251
version. The project is supported by the Lab of Parallel Software and \
7c8251
Computational Science, ISCAS. http://www.rdcps.ac.cn
23ef1b
23ef1b
23ef1b
%description
23ef1b
%{base_description}
23ef1b
23ef1b
%package openmp
058c89
Summary:        An optimized BLAS library based on GotoBLAS2, OpenMP version
058c89
Group:          Development/Libraries
23ef1b
23ef1b
%description openmp
23ef1b
%{base_description}
23ef1b
23ef1b
This package contains the library compiled with OpenMP support.
23ef1b
23ef1b
%package threads
058c89
Summary:        An optimized BLAS library based on GotoBLAS2, pthreads version
058c89
Group:          Development/Libraries
23ef1b
23ef1b
%description threads
23ef1b
%{base_description}
23ef1b
23ef1b
This package contains the library compiled with threading support.
23ef1b
058c89
%if %build64
058c89
%package serial64
058c89
Summary:        An optimized BLAS library based on GotoBLAS2, serial version
058c89
Group:          Development/Libraries
058c89
058c89
%description serial64
058c89
%{base_description}
058c89
058c89
This package contains the sequential library compiled with a 64-bit
058c89
interface.
058c89
058c89
%package openmp64
058c89
Summary:        An optimized BLAS library based on GotoBLAS2, OpenMP version
058c89
Group:          Development/Libraries
058c89
058c89
%description openmp64
058c89
%{base_description}
058c89
058c89
This package contains the library compiled with OpenMP support and
058c89
64-bit interface.
058c89
058c89
%package threads64
058c89
Summary:        An optimized BLAS library based on GotoBLAS2, pthreads version
058c89
Group:          Development/Libraries
058c89
058c89
%description threads64
058c89
%{base_description}
058c89
058c89
This package contains the library compiled with threading support and
058c89
64-bit interface.
b8078e
b8078e
%package serial64_
b8078e
Summary:        An optimized BLAS library based on GotoBLAS2, serial version
b8078e
Group:          Development/Libraries
b8078e
b8078e
%description serial64_
b8078e
%{base_description}
b8078e
b8078e
This package contains the sequential library compiled with a 64-bit
b8078e
interface and a symbol name suffix.
b8078e
b8078e
%package openmp64_
b8078e
Summary:        An optimized BLAS library based on GotoBLAS2, OpenMP version
b8078e
Group:          Development/Libraries
b8078e
b8078e
%description openmp64_
b8078e
%{base_description}
b8078e
b8078e
This package contains the library compiled with OpenMP support and
b8078e
64-bit interface and a symbol name suffix.
b8078e
b8078e
%package threads64_
b8078e
Summary:        An optimized BLAS library based on GotoBLAS2, pthreads version
b8078e
Group:          Development/Libraries
b8078e
b8078e
%description threads64_
b8078e
%{base_description}
b8078e
b8078e
This package contains the library compiled with threading support and
b8078e
64-bit interface and a symbol name suffix.
058c89
%endif
058c89
058c89
23ef1b
%package devel
058c89
Summary:        Development headers and libraries for OpenBLAS
058c89
Group:          Development/Libraries
058c89
Requires:       %{name}%{?_isa} = %{version}-%{release}
058c89
Requires:       %{name}-openmp%{?_isa} = %{version}-%{release}
058c89
Requires:       %{name}-threads%{?_isa} = %{version}-%{release}
058c89
%if %build64
058c89
Requires:       %{name}-openmp64%{?_isa} = %{version}-%{release}
058c89
Requires:       %{name}-threads64%{?_isa} = %{version}-%{release}
058c89
Requires:       %{name}-serial64%{?_isa} = %{version}-%{release}
b8078e
Requires:       %{name}-openmp64_%{?_isa} = %{version}-%{release}
b8078e
Requires:       %{name}-threads64_%{?_isa} = %{version}-%{release}
b8078e
Requires:       %{name}-serial64_%{?_isa} = %{version}-%{release}
058c89
%endif
23ef1b
23ef1b
%description devel
23ef1b
%{base_description}
23ef1b
23ef1b
This package contains the development headers and libraries.
23ef1b
23ef1b
%package static
058c89
Summary:        Static version of OpenBLAS
058c89
Group:          Development/Libraries
058c89
Requires:       %{name}-devel%{?_isa} = %{version}-%{release}
23ef1b
23ef1b
%description static
23ef1b
%{base_description}
23ef1b
23ef1b
This package contains the static libraries.
23ef1b
23ef1b
%prep
23ef1b
%setup -q -c -T
23ef1b
23ef1b
# Untar source
23ef1b
tar zxf %{SOURCE0}
23ef1b
cd OpenBLAS-%{version}
Orion Poplawski 7a510b
%if %{with system_lapack}
35ceac
%patch0 -p1 -b .system_lapack
058c89
%endif
Orion Poplawski 7a510b
%patch1 -p1 -b .libname
f2466d
%if 0%{?rhel} == 5
f2466d
%patch2 -p1 -b .constructor
f2466d
%endif
35ceac
1a59cb
# Fix source permissions
1a59cb
find -name \*.f -exec chmod 644 {} \;
1a59cb
Orion Poplawski 7a510b
%if %{with system_lapack}
35ceac
# Get rid of bundled LAPACK sources
35ceac
rm -rf lapack-netlib
Orion Poplawski 7a510b
%endif
23ef1b
058c89
# Make serial, threaded and OpenMP versions; as well as 64-bit versions
058c89
cd ..
058c89
cp -ar OpenBLAS-%{version} openmp
058c89
cp -ar OpenBLAS-%{version} threaded
058c89
%if %build64
b8078e
for d in {serial,threaded,openmp}64{,_}; do
b8078e
    cp -ar OpenBLAS-%{version} $d
b8078e
done
058c89
%endif
058c89
mv OpenBLAS-%{version} serial
058c89
Orion Poplawski 7a510b
%if %{with system_lapack}
058c89
# Setup 32-bit interface LAPACK
23ef1b
mkdir netliblapack
23ef1b
cd netliblapack
23ef1b
ar x %{_libdir}/liblapack_pic.a
35ceac
# Get rid of duplicate functions. See list in Makefile of lapack directory
35ceac
for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do
35ceac
    \rm {c,d,s,z}$f.o
35ceac
done
23ef1b
23ef1b
# LAPACKE
23ef1b
%if %{lapacke}
23ef1b
ar x %{_libdir}/liblapacke.a
23ef1b
%endif
23ef1b
23ef1b
# Create makefile
23ef1b
echo "TOPDIR = .." > Makefile
23ef1b
echo "include ../Makefile.system" >> Makefile
23ef1b
echo "COMMONOBJS = \\" >> Makefile
23ef1b
for i in *.o; do
23ef1b
 echo "$i \\" >> Makefile
23ef1b
done
23ef1b
echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile
23ef1b
23ef1b
%if %{lapacke}
23ef1b
# Copy include files
23ef1b
cp -a %{_includedir}/lapacke .
23ef1b
%endif
23ef1b
cd ..
23ef1b
058c89
# Copy in place
058c89
for d in serial threaded openmp; do
058c89
    cp -pr netliblapack $d
058c89
done
058c89
rm -rf netliblapack
058c89
058c89
058c89
# Setup 64-bit interface LAPACK
058c89
%if %build64
058c89
mkdir netliblapack64
058c89
cd netliblapack64
058c89
ar x %{_libdir}/liblapack64_pic.a
058c89
# Get rid of duplicate functions. See list in Makefile of lapack directory
058c89
for f in laswp getf2 getrf potf2 potrf lauu2 lauum trti2 trtri getrs; do
058c89
    \rm {c,d,s,z}$f.o
058c89
done
058c89
058c89
# LAPACKE, no 64-bit interface
058c89
%if %{lapacke}
058c89
ar x %{_libdir}/liblapacke.a
058c89
%endif
058c89
058c89
# Create makefile
058c89
echo "TOPDIR = .." > Makefile
058c89
echo "include ../Makefile.system" >> Makefile
058c89
echo "COMMONOBJS = \\" >> Makefile
058c89
for i in *.o; do
058c89
    echo "$i \\" >> Makefile
058c89
done
058c89
echo -e "\n\ninclude \$(TOPDIR)/Makefile.tail" >> Makefile
058c89
058c89
%if %{lapacke}
058c89
# Copy include files
058c89
cp -a %{_includedir}/lapacke .
058c89
%endif
23ef1b
cd ..
058c89
058c89
# Copy in place
b8078e
for d in {serial,threaded,openmp}64{,_}; do
058c89
    cp -pr netliblapack64 $d/netliblapack
058c89
done
058c89
rm -rf netliblapack64
058c89
%endif
Orion Poplawski 7a510b
%endif
23ef1b
23ef1b
%build
Orion Poplawski 7a510b
%if !%{lapacke}
23ef1b
LAPACKE="NO_LAPACKE=1"
23ef1b
%endif
23ef1b
058c89
# Maximum possible amount of processors
058c89
NMAX="NUM_THREADS=128"
058c89
edce2a
%ifarch %{ix86} x86_64
ff7102
TARGET="TARGET=CORE2 DYNAMIC_ARCH=1"
aa0abf
aa0abf
# Compability for old versions of GCC
aa0abf
%if 0%{?rhel} == 5
aa0abf
export AVX="NO_AVX=1 NO_AVX2=1"
aa0abf
%endif
aa0abf
%if 0%{?rhel} == 6
aa0abf
export AVX="NO_AVX2=1"
aa0abf
%endif
aa0abf
edce2a
%endif
edce2a
%ifarch armv7hl
ff7102
TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0"
ff7102
%endif
ff7102
%ifarch ppc64le
ff7102
TARGET="TARGET=POWER8 DYNAMIC_ARCH=0"
edce2a
%endif
edce2a
1b0177
%if 0%{?rhel} == 5
67bd96
# Gfortran too old to recognize -frecursive
67bd96
FCOMMON=""
67bd96
%else
67bd96
FCOMMON="\"-frecursive\""
67bd96
%endif
67bd96
d8da1e
# Declare some necessary build flags
67bd96
make -C serial     $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblas"      $AVX $LAPACKE INTERFACE64=0
67bd96
make -C threaded   $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp"     $AVX $LAPACKE INTERFACE64=0
23ef1b
# USE_THREAD determines use of SMP, not of pthreads
67bd96
make -C openmp     $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso"     $AVX $LAPACKE INTERFACE64=0
23ef1b
058c89
%if %build64
67bd96
make -C serial64   $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblas64"    $AVX $LAPACKE INTERFACE64=1
67bd96
make -C threaded64 $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64"   $AVX $LAPACKE INTERFACE64=1
67bd96
make -C openmp64   $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64"   $AVX $LAPACKE INTERFACE64=1
b8078e
67bd96
make -C serial64_   $TARGET USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblas64_"  $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
67bd96
make -C threaded64_ $TARGET USE_THREAD=1 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblasp64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
67bd96
make -C openmp64_   $TARGET USE_THREAD=1 USE_OPENMP=1 FC=gfortran CC=gcc COMMON_OPT="%{optflags} -fPIC" FCOMMON_OPT=$FCOMMON $NMAX LIBPREFIX="libopenblaso64_" $AVX $LAPACKE INTERFACE64=1 SYMBOLSUFFIX=64_
058c89
%endif
23ef1b
23ef1b
%install
23ef1b
rm -rf %{buildroot}
23ef1b
# Install serial library and headers
c6c3ec
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
23ef1b
494941
# Copy lapacke include files
Orion Poplawski 7a510b
%if %{with system_lapack} && %{lapacke}
494941
cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name}
494941
%endif
494941
1a59cb
# Fix name of libraries
c68c6e
%ifarch armv7hl
c68c6e
suffix="_armv7"
c68c6e
%endif
98a2f0
%ifarch ppc64le
98a2f0
suffix="_power6"
98a2f0
%endif
c68c6e
slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so`
23ef1b
mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a
1a59cb
if [[ "$suffix" != "" ]]; then
1a59cb
   sname=$(echo $slibname | sed "s|$suffix||g")
1a59cb
   mv %{buildroot}%{_libdir}/${slibname}.so %{buildroot}%{_libdir}/${sname}.so
1a59cb
else
1a59cb
   sname=${slibname}
1a59cb
fi
23ef1b
23ef1b
# Install the OpenMP library
23ef1b
olibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o|g"`
23ef1b
install -D -p -m 644 openmp/${olibname}.a %{buildroot}%{_libdir}/lib%{name}o.a
1a59cb
if [[ "$suffix" != "" ]]; then
1a59cb
   oname=$(echo $olibname | sed "s|$suffix||g")
f2466d
else
1a59cb
   oname=${olibname}
1a59cb
fi
1a59cb
install -D -p -m 755 openmp/${olibname}.so %{buildroot}%{_libdir}/${oname}.so
23ef1b
23ef1b
# Install the threaded library
23ef1b
plibname=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p|g"`
23ef1b
install -D -p -m 644 threaded/${plibname}.a %{buildroot}%{_libdir}/lib%{name}p.a
1a59cb
if [[ "$suffix" != "" ]]; then
1a59cb
   pname=$(echo $plibname | sed "s|$suffix||g")
1a59cb
else
1a59cb
   pname=${plibname}
1a59cb
fi
917083
install -D -p -m 755 threaded/${plibname}.so %{buildroot}%{_libdir}/${pname}.so
23ef1b
058c89
# Install the 64-bit interface libraries
058c89
%if %build64
058c89
slibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64|g"`
058c89
install -D -p -m 644 serial64/${slibname64}.a %{buildroot}%{_libdir}/lib%{name}64.a
be824e
slibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}64_|g"`
be824e
install -D -p -m 644 serial64_/${slibname64_}.a %{buildroot}%{_libdir}/lib%{name}64_.a
1a59cb
1a59cb
if [[ "$suffix" != "" ]]; then
be824e
   sname64=$(echo ${slibname64} | sed "s|$suffix||g")
be824e
   sname64_=$(echo ${slibname64_} | sed "s|$suffix||g")
1a59cb
else
1a59cb
   sname64=${slibname64}
be824e
   sname64_=${slibname64_}
1a59cb
fi
1a59cb
install -D -p -m 755 serial64/${slibname64}.so %{buildroot}%{_libdir}/${sname64}.so
be824e
install -D -p -m 755 serial64_/${slibname64_}.so %{buildroot}%{_libdir}/${sname64_}.so
058c89
058c89
olibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64|g"`
058c89
install -D -p -m 644 openmp64/${olibname64}.a %{buildroot}%{_libdir}/lib%{name}o64.a
be824e
olibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}o64_|g"`
be824e
install -D -p -m 644 openmp64_/${olibname64_}.a %{buildroot}%{_libdir}/lib%{name}o64_.a
1a59cb
1a59cb
if [[ "$suffix" != "" ]]; then
be824e
   oname64=$(echo ${olibname64} | sed "s|$suffix||g")
1ff7c7
   oname64_=$(echo ${olibname64_} | sed "s|$suffix||g")
1a59cb
else
1a59cb
   oname64=${olibname64}
1ff7c7
   oname64_=${olibname64_}
1a59cb
fi
1a59cb
install -D -p -m 755 openmp64/${olibname64}.so %{buildroot}%{_libdir}/${oname64}.so
1ff7c7
install -D -p -m 755 openmp64_/${olibname64_}.so %{buildroot}%{_libdir}/${oname64_}.so
058c89
058c89
plibname64=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64|g"`
058c89
install -D -p -m 644 threaded64/${plibname64}.a %{buildroot}%{_libdir}/lib%{name}p64.a
be824e
plibname64_=`echo ${slibname} | sed "s|lib%{name}|lib%{name}p64_|g"`
be824e
install -D -p -m 644 threaded64_/${plibname64_}.a %{buildroot}%{_libdir}/lib%{name}p64_.a
1a59cb
1a59cb
if [[ "$suffix" != "" ]]; then
1a59cb
   pname64=$(echo $plibname64 | sed "s|$suffix||g")
be824e
   pname64_=$(echo $plibname64_ | sed "s|$suffix||g")
1a59cb
else
1a59cb
   pname64=${plibname64}
be824e
   pname64_=${plibname64_}
1a59cb
fi
1a59cb
install -D -p -m 755 threaded64/${plibname64}.so %{buildroot}%{_libdir}/${pname64}.so
1ff7c7
install -D -p -m 755 threaded64_/${plibname64_}.so %{buildroot}%{_libdir}/${pname64_}.so
058c89
%endif
058c89
23ef1b
# Fix symlinks
23ef1b
pushd %{buildroot}%{_libdir}
23ef1b
# Serial libraries
1a59cb
ln -sf ${sname}.so lib%{name}.so
1a59cb
ln -sf ${sname}.so lib%{name}.so.0
23ef1b
# OpenMP libraries
1a59cb
ln -sf ${oname}.so lib%{name}o.so
1a59cb
ln -sf ${oname}.so lib%{name}o.so.0
23ef1b
# Threaded libraries
1a59cb
ln -sf ${pname}.so lib%{name}p.so
1a59cb
ln -sf ${pname}.so lib%{name}p.so.0
23ef1b
058c89
%if %build64
058c89
# Serial libraries
1a59cb
ln -sf ${sname64}.so lib%{name}64.so
1a59cb
ln -sf ${sname64}.so lib%{name}64.so.0
1ff7c7
ln -sf ${sname64_}.so lib%{name}64_.so
1ff7c7
ln -sf ${sname64_}.so lib%{name}64_.so.0
058c89
# OpenMP libraries
1a59cb
ln -sf ${oname64}.so lib%{name}o64.so
1a59cb
ln -sf ${oname64}.so lib%{name}o64.so.0
1ff7c7
ln -sf ${oname64_}.so lib%{name}o64_.so
1ff7c7
ln -sf ${oname64_}.so lib%{name}o64_.so.0
058c89
# Threaded libraries
f00859
ln -sf ${pname64}.so lib%{name}p64.so
1a59cb
ln -sf ${pname64}.so lib%{name}p64.so.0
f00859
ln -sf ${pname64_}.so lib%{name}p64_.so
1ff7c7
ln -sf ${pname64_}.so lib%{name}p64_.so.0
058c89
%endif
058c89
f2466d
%if %{execstack}
23ef1b
# Get rid of executable stacks
1a59cb
for lib in %{buildroot}%{_libdir}/libopenblas*.so; do
23ef1b
 execstack -c $lib
23ef1b
done
f2466d
%endif
23ef1b
5bd185
# Get rid of generated CMake config
9760f0
rm -rf %{buildroot}%{_libdir}/cmake
5bd185
23ef1b
%post -p /sbin/ldconfig
23ef1b
%postun -p /sbin/ldconfig
23ef1b
23ef1b
%post openmp -p /sbin/ldconfig
23ef1b
%postun openmp -p /sbin/ldconfig
23ef1b
23ef1b
%post threads -p /sbin/ldconfig
23ef1b
%postun threads -p /sbin/ldconfig
23ef1b
e6bd9c
%if %build64
e6bd9c
%post openmp64 -p /sbin/ldconfig
e6bd9c
%postun openmp64 -p /sbin/ldconfig
1a59cb
%post openmp64_ -p /sbin/ldconfig
1a59cb
%postun openmp64_ -p /sbin/ldconfig
e6bd9c
e6bd9c
%post serial64 -p /sbin/ldconfig
e6bd9c
%postun serial64 -p /sbin/ldconfig
1a59cb
%post serial64_ -p /sbin/ldconfig
1a59cb
%postun serial64_ -p /sbin/ldconfig
e6bd9c
e6bd9c
%post threads64 -p /sbin/ldconfig
e6bd9c
%postun threads64 -p /sbin/ldconfig
1a59cb
%post threads64_ -p /sbin/ldconfig
1a59cb
%postun threads64_ -p /sbin/ldconfig
e6bd9c
%endif
e6bd9c
23ef1b
%clean
23ef1b
rm -rf %{buildroot}
23ef1b
23ef1b
%files
f2466d
%defattr(-,root,root,-)
23ef1b
%doc serial/Changelog.txt serial/GotoBLAS* serial/LICENSE
23ef1b
%{_libdir}/lib%{name}-*.so
23ef1b
%{_libdir}/lib%{name}.so.*
23ef1b
23ef1b
%files openmp
f2466d
%defattr(-,root,root,-)
23ef1b
%{_libdir}/lib%{name}o-*.so
23ef1b
%{_libdir}/lib%{name}o.so.*
23ef1b
23ef1b
%files threads
f2466d
%defattr(-,root,root,-)
23ef1b
%{_libdir}/lib%{name}p-*.so
23ef1b
%{_libdir}/lib%{name}p.so.*
23ef1b
058c89
%if %build64
058c89
%files serial64
f2466d
%defattr(-,root,root,-)
058c89
%{_libdir}/lib%{name}64-*.so
058c89
%{_libdir}/lib%{name}64.so.*
058c89
058c89
%files openmp64
f2466d
%defattr(-,root,root,-)
058c89
%{_libdir}/lib%{name}o64-*.so
058c89
%{_libdir}/lib%{name}o64.so.*
058c89
058c89
%files threads64
f2466d
%defattr(-,root,root,-)
058c89
%{_libdir}/lib%{name}p64-*.so
058c89
%{_libdir}/lib%{name}p64.so.*
1a59cb
1a59cb
%files serial64_
f2466d
%defattr(-,root,root,-)
1a59cb
%{_libdir}/lib%{name}64_-*.so
1a59cb
%{_libdir}/lib%{name}64_.so.*
1a59cb
1a59cb
%files openmp64_
f2466d
%defattr(-,root,root,-)
1a59cb
%{_libdir}/lib%{name}o64_-*.so
1a59cb
%{_libdir}/lib%{name}o64_.so.*
1a59cb
1a59cb
%files threads64_
f2466d
%defattr(-,root,root,-)
1a59cb
%{_libdir}/lib%{name}p64_-*.so
1a59cb
%{_libdir}/lib%{name}p64_.so.*
058c89
%endif
058c89
23ef1b
%files devel
f2466d
%defattr(-,root,root,-)
058c89
%{_includedir}/%{name}/
23ef1b
%{_libdir}/lib%{name}.so
23ef1b
%{_libdir}/lib%{name}o.so
23ef1b
%{_libdir}/lib%{name}p.so
058c89
%if %build64
058c89
%{_libdir}/lib%{name}64.so
058c89
%{_libdir}/lib%{name}o64.so
058c89
%{_libdir}/lib%{name}p64.so
88af20
%{_libdir}/lib%{name}64_.so
88af20
%{_libdir}/lib%{name}o64_.so
88af20
%{_libdir}/lib%{name}p64_.so
058c89
%endif
23ef1b
23ef1b
%files static
f2466d
%defattr(-,root,root,-)
23ef1b
%{_libdir}/lib%{name}.a
23ef1b
%{_libdir}/lib%{name}o.a
23ef1b
%{_libdir}/lib%{name}p.a
058c89
%if %build64
058c89
%{_libdir}/lib%{name}64.a
058c89
%{_libdir}/lib%{name}o64.a
058c89
%{_libdir}/lib%{name}p64.a
1a59cb
%{_libdir}/lib%{name}64_.a
1a59cb
%{_libdir}/lib%{name}o64_.a
1a59cb
%{_libdir}/lib%{name}p64_.a
058c89
%endif
23ef1b
23ef1b
%changelog
d8da1e
* Tue Jan 12 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-5
d8da1e
- Need to use -frecursive to make LAPACK thread safe.
d8da1e
f2466d
* Tue Jan 12 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-4
f2466d
- Add version to bundled lapack provide.
f2466d
Orion Poplawski 7a510b
* Mon Jan 11 2016 Orion Poplawski <orion@cora.nwra.com> - 0.2.15-3
Orion Poplawski 7a510b
- Allow conditional build with or without system lapack, default to without
Orion Poplawski 7a510b
585569
* Tue Dec 01 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-2
b8078e
- Enable armv7hl and ppc64le architectures.
b8078e
- Build versions of the 64-bit libraries with an additional suffix
b8078e
  (BZ #1287541).
585569
ec8c30
* Wed Oct 28 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.15-1
ec8c30
- Update to 0.2.15.
ec8c30
8fa6aa
* Tue Aug 04 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.2.14-4
8fa6aa
- Use new execstack (#1247795)
8fa6aa
582f63
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.14-3
582f63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
582f63
e6bd9c
* Sun May  3 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.2.14-2
e6bd9c
- Run ldconfig on 64 builds too
e6bd9c
5b33b6
* Wed Mar 25 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.14-1
5b33b6
- Update to 0.2.14.
5b33b6
524b8e
* Fri Dec 19 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.13-2
524b8e
- Bump spec due to LAPACK rebuild.
524b8e
a71b89
* Fri Dec 05 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.13-1
a71b89
- Update to 0.2.13.
a71b89
024804
* Mon Oct 13 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.12-1
024804
- Update to 0.2.12.
024804
2fe866
* Mon Aug 18 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.11-1
2fe866
- Update to 0.2.11.
2fe866
7b620d
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.10-2
7b620d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7b620d
96eb17
* Wed Jul 16 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.10-1
96eb17
- Update to 0.2.10.
96eb17
058c89
* Wed Jun 11 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.9-1
058c89
- Increase maximum amount of cores from 32 to 128.
058c89
- Add 64-bit interface support. (BZ #1088256)
058c89
- Update to 0.2.9. (BZ #1043083)
058c89
b6733e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.8-2
b6733e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b6733e
ad96ee
* Wed Aug 07 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.8-1
ad96ee
- Update to 0.2.8.
ad96ee
0bd21f
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
0bd21f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0bd21f
35ceac
* Tue Jul 23 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.7-1
35ceac
- Update to 0.2.7.
35ceac
- Use OpenBLAS versions of LAPACK functions, as they seem to be
35ceac
  working now.
35ceac
3e16f6
* Mon Jul 08 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-10
3e16f6
- Due to long standing bug, replace all OpenBLAS LAPACK functions with
35ceac
  generic ones, so that package can finally be released in stable.
3e16f6
eb85a1
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-9
eb85a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
eb85a1
494941
* Tue Jan 15 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-8
494941
- Added LAPACKE include files.
494941
dc549c
* Mon Jan 14 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-7
dc549c
- Fix build on RHEL5 and ppc architecture.
dc549c
23ef1b
* Mon Dec 24 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-6
23ef1b
- Review fixes.
23ef1b
23ef1b
* Fri Dec 21 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-5
23ef1b
- Disable LAPACKE support on distributions where it is not available due to
23ef1b
  a too old version of lapack.
23ef1b
23ef1b
* Mon Dec 17 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-4
23ef1b
- Don't use reference LAPACK functions that have optimized implementation.
23ef1b
23ef1b
* Wed Dec 12 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-3
23ef1b
- Use system version of LAPACK.
23ef1b
23ef1b
* Mon Nov 26 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-2
23ef1b
- Fixed 32-bit build, and build on EPEL 5.
23ef1b
23ef1b
* Mon Nov 26 2012 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.2.5-1
23ef1b
- Update to 0.2.5.
23ef1b
23ef1b
* Thu Oct 06 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.1-2.alpha2.4
23ef1b
- Added documentation.
23ef1b
23ef1b
* Sun Sep 18 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.1-1.alpha2.4
23ef1b
- First release.