]> git.pld-linux.org Git - packages/lapack.git/blobdiff - lapack.spec
- updated to 3.11.0
[packages/lapack.git] / lapack.spec
index dd3935a3319af5bf29cfc5b544e7e53cfb06493e..7b3083dbe1a56987a52fa042918a2e462b29ef71 100644 (file)
@@ -1,25 +1,32 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static libraries
+%bcond_without tests           # unit tests
+%bcond_with    xblas           # use xblas
+
 Summary:       The LAPACK libraries for numerical linear algebra
 Summary(pl.UTF-8):     Biblioteki numeryczne LAPACK do algebry liniowej
 Name:          lapack
-Version:       3.1.1
-Release:       4
-License:       freely distributable
-Group:         Development/Libraries
-Source0:       http://www.netlib.org/lapack/%{name}-%{version}.tgz
-# Source0-md5: 00b21551a899bcfbaa7b8443e1faeef9
-Source1:       http://www.netlib.org/lapack/manpages-%{version}.tgz
-# Source1-md5: e5b46d8915f7cc8a1e50aa3e70c9f86e
-Patch0:                %{name}-automake_support.patch
-URL:           http://www.netlib.org/lapack/
-BuildRequires: autoconf
-BuildRequires: automake
+Version:       3.11.0
+Release:       1
+License:       BSD-like
+Group:         Libraries
+#Source0Download: https://github.com/Reference-LAPACK/lapack/releases
+Source0:       https://github.com/Reference-LAPACK/lapack/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 595b064fd448b161cd711fe346f498a7
+Source1:       https://netlib.org/lapack/manpages.tgz
+# Source1-md5: b13491eb1bcb381918a5b86437c4b029
+Patch0:                blas-nan.patch
+URL:           https://netlib.org/lapack/
+BuildRequires: cmake >= 3.2
 BuildRequires: gcc-fortran
-BuildRequires: libtool >= 2:1.5
+%{?with_xblas:BuildRequires:   xblas-devel}
 Requires:      blas = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# see http://www.netlib.org/lapack/faq.html#1.13
-%define       rpmcflags -O0
+# missing __stack_chk_fail symbol when only Fortran sources used
+%undefine      _fortify_cflags
+%undefine      _ssp_cflags
 
 %description
 LAPACK (Linear Algebra PACKage) is a standard library for numerical
@@ -47,18 +54,18 @@ i zespolonych, dla liczb pojedynczej i podwójnej precyzji. LAPACK jest
 napisany w Fortranie 77.
 
 %package devel
-Summary:       LAPACK header files
-Summary(pl.UTF-8):     Pliki nagłówkowe LAPACK
+Summary:       LAPACK development files
+Summary(pl.UTF-8):     Pliki programistyczne LAPACK
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      blas-devel = %{version}-%{release}
-Obsoletes:     lapack-man
+Obsoletes:     lapack-man < 3.0-3
 
 %description devel
-LAPACK header files.
+LAPACK development files.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe LAPACK.
+Pliki programistyczne LAPACK.
 
 %package static
 Summary:       Static LAPACK libraries
@@ -75,8 +82,9 @@ Biblioteki statyczne LAPACK.
 %package -n blas
 Summary:       The BLAS (Basic Linear Algebra Subprograms) library for Linux
 Summary(pl.UTF-8):     Biblioteka BLAS (Basic Linear Algebra Subprograms) dla Linuksa
-Group:         Development/Libraries
-Obsoletes:     lapack-blas
+Group:         Libraries
+URL:           https://netlib.org/blas/
+Obsoletes:     lapack-blas < 3.1
 
 %description -n blas
 BLAS (Basic Linear Algebra Subprograms) is a standard library for
@@ -98,70 +106,229 @@ Jeżeli to możliwe, należy używać zamiast niej wersji zoptymalizowanej
 pod daną architekturę.
 
 %package -n blas-devel
-Summary:       BLAS header files
-Summary(pl.UTF-8):     Pliki nagłówkowe BLAS
+Summary:       BLAS development files
+Summary(pl.UTF-8):     Pliki programistyczne BLAS
 Group:         Development/Libraries
+URL:           http://www.netlib.org/blas/
 Requires:      blas = %{version}-%{release}
-Obsoletes:     blas-man
+Obsoletes:     blas-man < 3.0-3
 
 %description -n blas-devel
-BLAS header files.
+BLAS development files.
 
 %description -n blas-devel -l pl.UTF-8
-Pliki nagłówkowe BLAS.
+Pliki programistyczne BLAS.
 
 %package -n blas-static
-Summary:       Static BLAS libraries
-Summary(pl.UTF-8):     Biblioteki statyczne BLAS
+Summary:       Static BLAS library
+Summary(pl.UTF-8):     Biblioteka statyczna BLAS
 Group:         Development/Libraries
+URL:           http://www.netlib.org/blas/
 Requires:      blas-devel = %{version}-%{release}
 
 %description -n blas-static
-Static BLAS libraries.
+Static BLAS library.
 
 %description -n blas-static -l pl.UTF-8
-Biblioteki statyczne BLAS.
+Biblioteka statyczna BLAS.
+
+%package -n cblas
+Summary:       C Standard Interface to BLAS Basic Linear Algebra Subprograms
+Summary(pl.UTF-8):     Interfejs C do procedur BLAS (Basic Linear Algebra Subprograms)
+Group:         Libraries
+URL:           http://www.netlib.org/blas/#_cblas
+Requires:      blas = %{version}-%{release}
+
+%description -n cblas
+C Standard Interface to BLAS Basic Linear Algebra Subprograms.
+
+%description -n cblas -l pl.UTF-8
+Interfejs C do procedur BLAS (Basic Linear Algebra Subprograms -
+podstawowych procedur algebry liniowej).
+
+%package -n cblas-devel
+Summary:       Header files of C Standard Interface to BLAS
+Summary(pl.UTF-8):     Pliki nagłówkowe interfejsu C do BLAS
+Group:         Libraries
+URL:           http://www.netlib.org/blas/#_cblas
+Requires:      blas-devel = %{version}-%{release}
+Requires:      cblas = %{version}-%{release}
+
+%description -n cblas-devel
+Header files of C Standard Interface to BLAS.
+
+%description -n cblas-devel -l pl.UTF-8
+Pliki nagłówkowe interfejsu C do BLAS.
+
+%package -n cblas-static
+Summary:       Static CBLAS library
+Summary(pl.UTF-8):     Statyczna biblioteka CBLAS
+Group:         Libraries
+URL:           http://www.netlib.org/blas/#_cblas
+Requires:      cblas-devel = %{version}-%{release}
+
+%description -n cblas-static
+Static CBLAS library.
+
+%description -n cblas-static -l pl.UTF-8
+Statyczna biblioteka CBLAS.
+
+%package -n lapacke
+Summary:       LAPACKE - native C interface to LAPACK library routines
+Summary(pl.UTF-8):     LAPACKE - natywny interfejs C do procedur biblioteki LAPACK
+Group:         Libraries
+URL:           http://www.netlib.org/lapack/lapacke.html
+Requires:      lapack = %{version}-%{release}
+
+%description -n lapacke
+This library is a part of reference implementation for the C interface
+to LAPACK project according to the specifications described at the
+forum for the Intel(R) Math Kernel Library (Intel(R) MKL).
+
+This implementation provides a native C interface to LAPACK routines
+to facilitate usage of LAPACK functionality for C programmers.
+
+%description -n lapacke -l pl.UTF-8
+Ta bilioteka jest częścią implementacji referencyjnej interfejsu C do
+projektu LAPACK, zgodnej ze specyfikacją opisaną na forum biblioteki
+Intel(R) Math Kernel Library.
+
+Ta implementacja udostępnia natywny interfejs C do procedur biblioteki
+LAPACK, ułatwiając jej użycie programistom C.
+
+%package -n lapacke-devel
+Summary:       Header files for LAPACKE - native C interface to LAPACK
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki LAPACKE - natywnego interfejsu C do biblioteki LAPACK
+Group:         Development/Libraries
+URL:           http://www.netlib.org/lapack/lapacke.html
+Requires:      lapack-devel = %{version}-%{release}
+Requires:      lapacke = %{version}-%{release}
+
+%description -n lapacke-devel
+Header files for LAPACKE - native C interface to LAPACK.
+
+%description -n lapacke-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki LAPACKE - natywnego interfejsu C do
+biblioteki LAPACK.
+
+%package -n lapacke-static
+Summary:       Static LAPACKE library - native C interface to LAPACK
+Summary(pl.UTF-8):     Statyczna biblioteka LAPACKE - natywny interfejs C do biblioteki LAPACK
+Group:         Development/Libraries
+URL:           http://www.netlib.org/lapack/lapacke.html
+Requires:      lapacke-devel = %{version}-%{release}
+
+%description -n lapacke-static
+Static LAPACKE library - native C interface to LAPACK.
+
+%description -n lapacke-static -l pl.UTF-8
+Statyczna biblioteka LAPACKE - natywny interfejs C do biblioteki
+LAPACK.
 
 %prep
 %setup -q -a1
 %patch0 -p1
-# directory INSTALL conflicts with file INSTALL needed by automake
-mv -f INSTALL install
-# or maybe it should fail while trying to overwrite a file?
-cp -f install/*.f SRC/
+# copy selected routines; use INT_ETIME versions of second
+# FIXME? CMakeLists doesn't handle second
+#cp -f INSTALLSRC/{second_INT_ETIME,dsecnd_INT_ETIME}.f SRC
+
+# bogus
+%{__rm} man/man3/_Users_julielangou_Documents_GitHub_lapack_*.3
+%{__rm} man/man3/groups-usr.dox.3
+# duplicated...
+%{__rm} man/man3/{SRC_xerbla,SRC_xerbla_array}.f.3
+# ...in BLAS and LAPACK sources; keep versions from BLAS
+%{__mv} man/man3/BLAS_SRC_xerbla.f.3 man/man3/xerbla.f.3
+%{__mv} man/man3/BLAS_SRC_xerbla_array.f.3 man/man3/xerbla_array.f.3
+%{__sed} -i -e 's/BLAS_SRC_//' man/man3/{xerbla,xerbla_array}.3
+# in base and variants; adjust .so links to use base
+%{__sed} -i -e 's/VARIANTS_qr_LL_//' man/man3/zgeqrf.3
+%{__sed} -i -e 's/VARIANTS_lu_CR_//' man/man3/zgetrf.3
+%{__sed} -i -e 's/VARIANTS_cholesky_RL_//' man/man3/zpotrf.3
+# not used variants of some procedures
+%{__rm} man/man3/{VARIANTS_*,sceil,sceil.f}.3
+# documentation for examples
+%{__rm} man/man3/{LDA,LDB,N,NRHS,example_*,lapacke_example_aux.*,main,print_*}.3
+# too common names
+%{__mv} man/man3/{testing,lapacktesting}.3
+%{__mv} man/man3/{level1,blaslevel1}.3
+%{__mv} man/man3/{level2,blaslevel2}.3
+%{__mv} man/man3/{level3,blaslevel3}.3
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoheader}
-%{__autoconf}
-%{__automake}
-%configure
-
-%{__make} \
-       LTTAG="--tag=F77"
+%if %{with static_libs}
+install -d build-static
+cd build-static
+%cmake .. \
+       -DBUILD_DEPRECATED=ON \
+       -DBUILD_SHARED_LIBS=OFF \
+       -DCBLAS=ON \
+       -DLAPACKE_WITH_TMG=ON \
+       %{?with_xblas:-DUSE_XBLAS=ON}
+%{__make}
+cd ..
+%endif
+
+install -d build
+cd build
+%cmake .. \
+       -DBUILD_DEPRECATED=ON \
+       %{?with_tests:-DBUILD_TESTING=ON} \
+       -DCBLAS=ON \
+       -DLAPACKE_WITH_TMG=ON \
+       %{?with_xblas:-DUSE_XBLAS=ON}
+%{__make}
+
+%{?with_tests:ctest}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C build-static install \
        DESTDIR=$RPM_BUILD_ROOT
+%endif
 
-# present both in blas and lapack
-rm -f man/manl/{lsame,xerbla}.l
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
+# install man pages, distributing them among blas-devel and lapack-devel
 install -d $RPM_BUILD_ROOT%{_mandir}/man3
-for d in manpages/man/manl/*.l manpages/blas/man/manl/*.l ; do
-       install $d $RPM_BUILD_ROOT%{_mandir}/man3/`basename $d .l`.3
+echo "%defattr(644,root,root,755)" > blasmans.list
+echo "%defattr(644,root,root,755)" > mans.list
+echo "%defattr(644,root,root,755)" > lapackemans.list
+BLAS_ADDITIONAL='blas|blaslevel[123]|blastesting|aux_blas|(complex|complex16|double|single)_blas_(level[123]|testing)'
+LAPACK_ADDITIONAL='lapack|lapacktesting|OTHERauxiliary|(aux|auxiliary|complex|complex16|computational|double|eigen|real|sing|solve|variants)?(GB|GE|GT|HE|OTHER|PO|PT|SY)(auxiliary|computational|eigen|sing|solve)?|((aux|complex|complex16|double|real|single)_)?(eig|lin|matgen)|variants(GE|OTHER|PO)computational'
+MANS_ADDITIONAL="$BLAS_ADDITIONAL|$LAPACK_ADDITIONAL"
+for f in man/man3/*.3 ; do
+       cp -p "$f" $RPM_BUILD_ROOT%{_mandir}/man3
+       bn=$(basename $f)
+       if echo "$bn" | grep '\.[Fcfh]\.3$' ; then
+               ffn="${bn%.3}"
+       elif echo "$bn" | grep -E "^($MANS_ADDITIONAL)\.3\$" ; then
+               ffn="${bn%.3}"
+       elif grep '^\.so man3/.*\.[Fcfh]\.3$' "$f" ; then
+               ffn=$(sed -e '1s,^\.so man3/\(.*\.[Fcfh]\)\.3,\1,' $f)
+       elif grep -E "^\.so man3/($MANS_ADDITIONAL)\.3" "$f"; then
+               ffn=$(sed -e '1s,^\.so man3/\([^.]*\)\.3,\1,' $f)
+       else
+               echo "Unknown manpage: $f"
+               exit 1
+       fi
+       if [ -f "BLAS/SRC/$ffn" ] || echo "$ffn" | grep -E "^($BLAS_ADDITIONAL)\$" ; then
+               echo "%{_mandir}/man3/${bn}*" >> blasmans.list
+       elif [ -f "SRC/$ffn" -o -f "INSTALLSRC/$ffn" ] || echo "$ffn" | grep -E "^($LAPACK_ADDITIONAL)\$"; then
+               echo "%{_mandir}/man3/${bn}*" >> mans.list
+       elif [ -f "LAPACKE/include/$ffn" -o -f "LAPACKE/src/$ffn" -o -f "LAPACKE/utils/$ffn" ]; then
+               echo "%{_mandir}/man3/${bn}*" >> lapackemans.list
+       else
+               echo "Unknown manpage: $f (source file: $ffn)"
+               exit 1
+       fi
 done
 
-echo "%defattr(644, root, root, 755)" > blasmans.list
-find manpages/blas/man/manl -name "*.l" -printf "%{_mandir}/man3/%%f\n" | sed 's/\.l/.3*/' >> blasmans.list
-echo "%defattr(644, root, root, 755)" > mans.list
-find manpages/man/manl -name "*.l" -printf "%{_mandir}/man3/%%f\n" | sed 's/\.l/.3*/' >> mans.list
-
 %clean
-rm -fr $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
 
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
@@ -169,29 +336,84 @@ rm -fr $RPM_BUILD_ROOT
 %post   -n blas -p /sbin/ldconfig
 %postun -n blas -p /sbin/ldconfig
 
+%post   -n cblas -p /sbin/ldconfig
+%postun -n cblas -p /sbin/ldconfig
+
+%post   -n lapacke -p /sbin/ldconfig
+%postun -n lapacke -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
-%doc README
+%doc LICENSE README.md
 %attr(755,root,root) %{_libdir}/liblapack.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblapack.so.3
 
 %files devel -f mans.list
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/liblapack.so
-%{_libdir}/liblapack.la
+%{_includedir}/lapack.h
+%{_pkgconfigdir}/lapack.pc
+%{_libdir}/cmake/lapack-%{version}
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/liblapack.a
+%endif
 
 %files -n blas
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libblas.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libblas.so.3
 
 %files -n blas-devel -f blasmans.list
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libblas.so
-%{_libdir}/libblas.la
+%{_pkgconfigdir}/blas.pc
 
+%if %{with static_libs}
 %files -n blas-static
 %defattr(644,root,root,755)
 %{_libdir}/libblas.a
+%endif
+
+%files -n cblas
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcblas.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcblas.so.3
+
+%files -n cblas-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcblas.so
+%{_includedir}/cblas*.h
+%{_pkgconfigdir}/cblas.pc
+%{_libdir}/cmake/cblas-%{version}
+
+%if %{with static_libs}
+%files -n cblas-static
+%defattr(644,root,root,755)
+%{_libdir}/libcblas.a
+%endif
+
+%files -n lapacke -f lapackemans.list
+%defattr(644,root,root,755)
+%doc LAPACKE/{LICENSE,README}
+%attr(755,root,root) %{_libdir}/liblapacke.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblapacke.so.3
+%attr(755,root,root) %{_libdir}/libtmglib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtmglib.so.3
+
+%files -n lapacke-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblapacke.so
+%attr(755,root,root) %{_libdir}/libtmglib.so
+%{_includedir}/lapacke*.h
+%{_pkgconfigdir}/lapacke.pc
+%{_libdir}/cmake/lapacke-%{version}
+
+%if %{with static_libs}
+%files -n lapacke-static
+%defattr(644,root,root,755)
+%{_libdir}/liblapacke.a
+%{_libdir}/libtmglib.a
+%endif
This page took 0.105959 seconds and 4 git commands to generate.