Blame SPECS/libzdnn.spec

f134ec
Name:          libzdnn
f134ec
Version:       0.4.0
6746ff
Release:       2%{?dist}
f134ec
Summary:       Driver library for the IBM Z Neural Network Processing Assist Facility
f134ec
f134ec
License:       ASL 2.0
f134ec
Url:           https://github.com/IBM/zDNN
f134ec
Source0:       %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
f134ec
f134ec
ExclusiveArch: s390x
f134ec
BuildRequires: gcc
f134ec
BuildRequires: g++
f134ec
BuildRequires: make
f134ec
BuildRequires: gawk
f134ec
BuildRequires: automake
f134ec
BuildRequires: autoconf
f134ec
f134ec
# Be explicit about the soversion in order to avoid unintentional changes.
f134ec
%global soversion 0
f134ec
f134ec
%description
f134ec
The zDNN library provide a user space API for exploitation of the
f134ec
Neural Network Processing Assist Facility.  All application which
f134ec
intend to use that facility on IBM Z are supposed to do this via this
f134ec
library.
f134ec
f134ec
f134ec
%package       devel
f134ec
Summary:       Development files for %{name}
f134ec
Requires:      %{name}%{?_isa} = %{version}-%{release}
f134ec
f134ec
%description   devel
f134ec
The %{name}-devel package contains libraries and header files for
f134ec
developing applications that use %{name}.
f134ec
f134ec
f134ec
%package       static
f134ec
Summary:       Static library version %{name}
f134ec
Requires:      %{name}-devel%{?_isa} = %{version}-%{release}
f134ec
f134ec
%description    static
f134ec
The %{name}-static package contains the static library of %{name}.
f134ec
f134ec
f134ec
%prep
f134ec
%autosetup -p1 -n zDNN-%{version}
f134ec
autoreconf -i
f134ec
f134ec
%build
f134ec
# libzdnn needs to be built with z14 support so override the distro wide options to append -march=z14.
f134ec
# cflags for the init routines in e.g. zdnn_init.c should just use the distro options.
f134ec
# export CFLAGS_INIT explicitely since it is not handled by configure
f134ec
CFLAGS_INIT="%{build_cflags}"; export CFLAGS_INIT; CFLAGS="%{build_cflags} -march=z14 -mtune=z14" CXXFLAGS="%{build_cxxflags} -march=z14 -mtune=z14" %configure
f134ec
%make_build build
f134ec
f134ec
%install
f134ec
%make_install
f134ec
mv $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{soversion} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version}
f134ec
ln -s -r $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{soversion}
f134ec
f134ec
rm -f $RPM_BUILD_ROOT%{_libdir}/libzdnn.so
f134ec
ln -s -r $RPM_BUILD_ROOT%{_libdir}/libzdnn.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libzdnn.so
f134ec
f134ec
f134ec
%files
f134ec
%{_libdir}/libzdnn.so.%{version}
f134ec
%{_libdir}/libzdnn.so.%{soversion}
f134ec
%doc README.md
f134ec
%license LICENSE
f134ec
f134ec
%files devel
f134ec
%{_includedir}/zdnn.h
f134ec
%{_libdir}/*.so
f134ec
f134ec
%files static
f134ec
%{_libdir}/libzdnn.a
f134ec
f134ec
%changelog
6746ff
* Tue Jan 24 2022 Jakub Čajka <jcajka@redhat.com> - 0.4.0-2
6746ff
- Release bump
6746ff
- Resolves: RHBZ#2093292
6746ff
f134ec
* Fri Mar 25 2022 Jakub <jcajka@redhat.com> - 0.4.0-1
f134ec
- Initial package import
f134ec
- Resolves: RHBZ#2070957