# Copyright (c) 2020 Dave Love, University of Manchester # Licence: MIT, per Fedora default %global amdver 2.2 # soversion %somaj.%somin %global somaj 0 %global somin 0 Name: libflame Version: 5.2.0 Release: 1.amd%amdver%{?dist} Summary: Portable library for dense matrix computation License: BSD URL: https://github.com/amd/libflame Source0: https://github.com/amd/libflame/archive/%amdver/libflame-%amdver.tar.gz BuildRequires: automake gcc-gfortran python2 %if 0 BuildRequires: texlive-latex texlive-bibtex texlive-makeindex BuildRequires: texlive-draftwatermark %_bindir/pdflatex texlive-latex-fonts %endif %description libflame is a portable library for dense matrix computations, providing much of the functionality present in LAPACK. It includes a compatibility layer, lapack2flame, which includes a complete LAPACK implementation. This is the AMD release version. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -n %name-%amdver # These are out-of-date (not detecting POWER targets, for instance). cp %_datadir/automake*/config.{guess,sub} build/ac-utils sed -i 's/env python/python2/' netlib-test/lapack-3.9.0/lapack_testing.py netlib-test/lapack-3.4.2/lapack_testing.py build/flatten-headers.py # Fedora soversion echo "%somaj %somin" >so_version mkdir serial omp # Not obviously necessary, but we might as well be current. autoreconf -fiv -Ibuild/ac-macros # Avoid failure with configure in sub-directory mkdir -p {serial,omp}/src/lapacke for d in serial omp; do ln -s $(pwd)/src/lapacke/LAPACKE $d/src/lapacke; done #sed -i s/draftcopy/draftwatermark/ docs/libflame/libflame.tex for d in serial omp; do ln -s $(pwd)/src/src_cpp $d/src; done %build %global confflags --disable-static-build --enable-verbose-make-output --enable-dynamic-build --enable-max-arg-list-hack --enable-lapack2flame --enable-debug %global _configure ../configure cd serial %configure %confflags %make_build cd ../omp %configure %confflags --enable-multithreading=openmp --enable-supermatrix %make_build LIBFLAME=libflameo cd .. # Too much trouble for now #make -C libflame/docs PDFLATEX=pdflatex BIBTEX=bibtex MAKEINDEX=makeindex %install %make_install -C serial %make_install -C omp mkdir -p %buildroot%_libdir %buildroot%_includedir install -m755 serial/lib/%_arch-*-linux-gnu/libflame.so* %buildroot%_libdir install -m755 omp/lib/%_arch-*-linux-gnu/libflameo.so* %buildroot%_libdir cp -a serial/include/%_arch-*-linux-gnu %buildroot%_includedir/libflame cp -a omp/include/%_arch-*-linux-gnu %buildroot%_includedir/libflameo %ldconfig_scriptlets %files %license LICENSE %{_libdir}/*.so.%{somaj}* %files devel %{_includedir}/* %{_libdir}/*.so %changelog * Tue Sep 1 2020 Dave Love - 5.2.0-1.flame2.2%{?dist} - Initial packaging