]> git.pld-linux.org Git - packages/lapack.git/blobdiff - lapack.spec
- updated to 3.11.0
[packages/lapack.git] / lapack.spec
index 0dacbaf7d0a7387fb5dff087c4d0de5cca896fd1..7b3083dbe1a56987a52fa042918a2e462b29ef71 100644 (file)
@@ -1,26 +1,26 @@
-# NOTE: when updating automake_support patch, look both on included
-#  cmake suite and plain Makefiles - one of them is mostly outdated
-#  (as of 3.4.0, cmake misses some files added in 3.4; also it
-#   doesn't care about setting soname, so currently isn't worth using)
+#
+# 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.7.0
-%define        man_ver 3.7.0
-Release:       2
+Version:       3.11.0
+Release:       1
 License:       BSD-like
 Group:         Libraries
-Source0:       http://www.netlib.org/lapack/%{name}-%{version}.tgz
-# Source0-md5: 697bb8d67c7d336a0f339cc9dd0fa72f
-Source1:       http://www.netlib.org/lapack/manpages-%{man_ver}.tgz
-# Source1-md5: 5d538ef8b8240bf7e9895feae45428dc
-Patch0:                %{name}-automake_support.patch
-Patch1:                blas-nan.patch
-URL:           http://www.netlib.org/lapack/
-BuildRequires: autoconf >= 2.50
-BuildRequires: automake
+#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)
 
@@ -59,7 +59,7 @@ 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 development files.
@@ -83,7 +83,8 @@ Biblioteki statyczne LAPACK.
 Summary:       The BLAS (Basic Linear Algebra Subprograms) library for Linux
 Summary(pl.UTF-8):     Biblioteka BLAS (Basic Linear Algebra Subprograms) dla Linuksa
 Group:         Libraries
-Obsoletes:     lapack-blas
+URL:           https://netlib.org/blas/
+Obsoletes:     lapack-blas < 3.1
 
 %description -n blas
 BLAS (Basic Linear Algebra Subprograms) is a standard library for
@@ -108,8 +109,9 @@ pod daną architekturę.
 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 development files.
@@ -121,6 +123,7 @@ Pliki programistyczne 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
@@ -129,10 +132,52 @@ Static BLAS library.
 %description -n blas-static -l pl.UTF-8
 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
@@ -155,6 +200,7 @@ LAPACK, ułatwiając jej użycie programistom C.
 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}
 
@@ -169,6 +215,7 @@ biblioteki LAPACK.
 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
@@ -181,40 +228,68 @@ LAPACK.
 %prep
 %setup -q -a1
 %patch0 -p1
-%patch1 -p1
-# directory INSTALL conflicts with file INSTALL needed by automake
-%{__mv} INSTALL INSTALLSRC
 # copy selected routines; use INT_ETIME versions of second
-cp -f INSTALLSRC/{ilaver,slamch,dlamch,second_INT_ETIME,dsecnd_INT_ETIME}.f SRC
+# FIXME? CMakeLists doesn't handle second
+#cp -f INSTALLSRC/{second_INT_ETIME,dsecnd_INT_ETIME}.f SRC
 
 # bogus
-%{__rm} man/man3/{_Users_julie_Downloads_lapack-*,groups-usr.dox}.3
+%{__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.f}.3
-# directory only pages with no real information and non-man references to others
-%{__rm} man/man3/{GB,GE,GT,HE,OTHERcomputational,OTHEReigen,OTHERsolve,PO,PT,SY,aux_{eig,lin,matgen},{auxiliary,computational}{GB,GE,GT,HE,PO,PT,SY},blas,blastesting,{complex,complex16}{POauxiliary,SYeigen,_blas_testing,_lin,_matgen},{double,real}{{GT,PO,PT}auxiliary,_matgen},{double,single}{_blas_testing,_lin},eig,eigen{GE,HE,SY},lapack,level{1,2,3},lin,matgen,singGE,solve{GB,GE,GT,HE,PO,PT,SY},testing}.3
+%{__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
-
+%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
+
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 # install man pages, distributing them among blas-devel and lapack-devel
@@ -222,18 +297,18 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man3
 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='aux_blas|(complex|complex16|double|single)_blas_level[123]'
-LAPACK_ADDITIONAL='OTHERauxiliary|(aux|complex|complex16|double|real|variants)(GB|GE|GT|HE|OTHER|PO|PT|SY)(auxiliary|computational|eigen|sing|solve)|(complex|complex16|double|single)_eig|variants(GE|OTHER|PO)computational'
+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 '\.[cfh]\.3$' ; then
+       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/.*\.[cfh]\.3$' "$f" ; then
-               ffn=$(sed -e '1s,^\.so man3/\(.*\.[cfh]\)\.3,\1,' $f)
+       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
@@ -261,24 +336,30 @@ rm -rf $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 LICENSE 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)
@@ -288,26 +369,51 @@ rm -rf $RPM_BUILD_ROOT
 %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
-%{_libdir}/liblapacke.la
+%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.098986 seconds and 4 git commands to generate.