Blame SPECS/libnxz.spec

66a37d
# Keep the *.la file around
66a37d
# See https://fedoraproject.org/wiki/Changes/RemoveLaFiles
66a37d
%global __brp_remove_la_files %nil
66a37d
66a37d
Name:		libnxz
66a37d
Version:	0.63
66a37d
Release:	2%{?dist}
66a37d
Summary:	Zlib implementation for POWER processors
66a37d
License:	ASL 2.0 or GPLv2+
66a37d
Url:		https://github.com/libnxz/power-gzip
66a37d
BuildRequires:	zlib-devel
66a37d
Source0:	%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
66a37d
66a37d
# https://github.com/libnxz/power-gzip/pull/150
66a37d
Patch0: pr150.patch
66a37d
# https://github.com/libnxz/power-gzip/pull/155
66a37d
Patch1: pr155.patch
66a37d
# https://github.com/libnxz/power-gzip/pull/174
66a37d
Patch2: pr174.patch
66a37d
66a37d
# Be explicit about the soname in order to avoid unintentional changes.
66a37d
%global soname libnxz.so.0
66a37d
66a37d
ExclusiveArch:	ppc64le
66a37d
BuildRequires:	gcc
66a37d
BuildRequires:	make
66a37d
BuildRequires:	systemd-rpm-macros
66a37d
66a37d
%description
66a37d
libnxz is a zlib-compatible library that uses the NX GZIP Engine available on
66a37d
POWER9 or newer processors in order to provide a faster zlib/gzip compression
66a37d
without using the general-purpose cores.
66a37d
66a37d
%package	devel
66a37d
Summary:	Development files for %{name}
66a37d
Requires:	%{name}%{?_isa} = %{version}-%{release}
66a37d
66a37d
%description	devel
66a37d
The %{name}-devel package contains header files for developing application that
66a37d
use %{name}.
66a37d
66a37d
%package	static
66a37d
Summary:	Static library for %{name} development
66a37d
Requires:	%{name}-devel%{?_isa} = %{version}-%{release}
66a37d
66a37d
%description	static
66a37d
The %{name}-static package contains static libraries for developing
66a37d
application that use %{name}.
66a37d
66a37d
%prep
66a37d
%autosetup -p1 -n power-gzip-%{version}
66a37d
66a37d
%build
66a37d
%configure --enable-zlib-api
66a37d
%make_build
66a37d
66a37d
%check
66a37d
# libnxz tests only work on P9 servers or newer, with Linux >= 5.8.
66a37d
# This combination is not guaranteed to have at build time.  Check if
66a37d
# NX GZIP engine device is available before deciding to run the tests.
66a37d
if [[ -w "/dev/crypto/nx-gzip" ]]; then
66a37d
	make check
66a37d
fi
66a37d
66a37d
%install
66a37d
%make_install
66a37d
66a37d
%pre
66a37d
%{_sbindir}/groupadd -r -f nx-gzip
66a37d
66a37d
%files
66a37d
%{_libdir}/%{soname}
66a37d
%{_libdir}/libnxz.so.0.%{version}
66a37d
%license %{_docdir}/%{name}/APACHE-2.0.txt
66a37d
%license %{_docdir}/%{name}/gpl-2.0.txt
66a37d
%doc README.md
66a37d
66a37d
%files devel
66a37d
%{_includedir}/libnxz.h
66a37d
%{_libdir}/libnxz.so
66a37d
66a37d
%files static
66a37d
%{_libdir}/libnxz.a
66a37d
%{_libdir}/libnxz.la
66a37d
66a37d
%changelog
66a37d
* Mon Aug 29 2022 Jakub Čajka <jcajka@redhat.com> - 0.63-2
66a37d
- bump for gating
66a37d
- Related: RHBZ#2101334
66a37d
66a37d
* Fri Jul 29 2022 Jakub Čajka <jcajka@redhat.com> - 0.63-1
66a37d
- initial package import
66a37d
- Resolves: RHBZ#2101334