Blob Blame History Raw
%global _hardened_build 1

Name:           lz4
Version:        r117
Release:        2%{?dist}
Summary:        Extremely fast compression algorithm

Group:          Applications/System
License:        GPLv2
URL:            https://code.google.com/p/lz4/
Source0:        https://github.com/Cyan4973/lz4/archive/%{version}/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
LZ4 is an extremely fast loss-less compression algorithm, providing compression
speed at 400 MB/s per core, scalable with multi-core CPU. It also features
an extremely fast decoder, with speed in multiple GB/s per core, typically
reaching RAM speed limits on multi-core systems.

%package        devel
Summary:        Development library for lz4
Group:          Development/Libraries
License:        BSD
Requires:       %{name} = %{version}-%{release}

%description    devel
This package contains the header(.h) and library(.so) files required to build
applications using liblz4 library.

%prep
%setup -q


%build
export CFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags}


%install
make install PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALL="install -p"
chmod -x $RPM_BUILD_ROOT%{_includedir}/*.h
chmod -x $RPM_BUILD_ROOT%{_usr}/lib/liblz4.a


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig


%files
%doc programs/COPYING NEWS
%{_bindir}/lz4
%{_bindir}/lz4c
%{_bindir}/lz4cat
%{_mandir}/man1/lz4*
%{_usr}/lib/liblz4.so*


%files devel
%defattr (-, root, root, -)
%doc LICENSE NEWS
%{_includedir}/*.h
%{_usr}/lib/liblz4.a

%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - r117-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Jun 06 2014 pjp <pjp@fedoraproject.org> - r117-1
- new release
- added lz4c & lz4cat manual pages.

* Sun Apr 13 2014 pjp <pjp@fedoraproject.org> - r116-1
- new release 116
- added lz4cat utility for posix systems

* Sat Mar 15 2014 pjp <pjp@fedoraproject.org> - r114-1
- new release r114
- added RPM_OPT_FLAGS to CFLAGS
- introduced a devel package to build liblz4

* Thu Jan 02 2014 pjp <pjp@fedoraproject.org> - r110-1
- new release r110

* Sun Nov 10 2013 pjp <pjp@fedoraproject.org> - r108-1
- new release r108

* Wed Oct 23 2013 pjp <pjp@fedoraproject.org> - r107-1
- new release r107

* Mon Oct 07 2013 pjp <pjp@fedoraproject.org> - r106-3
- fixed install section to replace /usr/ with a macro.
  -> https://bugzilla.redhat.com/show_bug.cgi?id=1015263#c5

* Sat Oct 05 2013 pjp <pjp@fedoraproject.org> - r106-2
- fixed install section above as suggested in the review.
  -> https://bugzilla.redhat.com/show_bug.cgi?id=1015263#c1

* Sun Sep 22 2013 pjp <pjp@fedoraproject.org> - r106-1
- Initial RPM release of lz4-r106