Blame SPECS/libzdnn.spec

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