f9f5b8
Name:           lzo
f9f5b8
Version:        2.06
62fc53
Release:        8%{?dist}
f9f5b8
Summary:        Data compression library with very fast (de)compression
f9f5b8
Group:          System Environment/Libraries
f9f5b8
License:        GPLv2+
f9f5b8
URL:            http://www.oberhumer.com/opensource/lzo/
f9f5b8
Source0:        http://www.oberhumer.com/opensource/lzo/download/%{name}-%{version}.tar.gz
f9f5b8
Patch0:         lzo-2.06-configure.patch
24e0bd
Patch1:         lzo-2.06-CVE-2014-4607.patch
f9f5b8
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f9f5b8
BuildRequires:  zlib-devel
f9f5b8
f9f5b8
%description
f9f5b8
LZO is a portable lossless data compression library written in ANSI C.
f9f5b8
It offers pretty fast compression and very fast decompression.
f9f5b8
Decompression requires no memory. In addition there are slower
f9f5b8
compression levels achieving a quite competitive compression ratio
f9f5b8
while still decompressing at this very high speed.
f9f5b8
f9f5b8
f9f5b8
%package minilzo
f9f5b8
Summary:        Mini version of lzo for apps which don't need the full version
f9f5b8
Group:          System Environment/Libraries
f9f5b8
f9f5b8
%description minilzo
f9f5b8
A small (mini) version of lzo for embedding into applications which don't need
f9f5b8
full blown lzo compression support.
f9f5b8
f9f5b8
f9f5b8
%package devel
f9f5b8
Summary:        Development files for the lzo library
f9f5b8
Group:          Development/Libraries
f9f5b8
Requires:       %{name} = %{version}-%{release}
f9f5b8
Requires:       %{name}-minilzo = %{version}-%{release}
f9f5b8
Requires:       zlib-devel
f9f5b8
f9f5b8
%description devel
f9f5b8
LZO is a portable lossless data compression library written in ANSI C.
f9f5b8
It offers pretty fast compression and very fast decompression.
f9f5b8
This package contains development files needed for lzo.
f9f5b8
f9f5b8
f9f5b8
%prep
f9f5b8
%setup -q
f9f5b8
%patch0 -p1 -z .configure
24e0bd
%patch1 -p1 -b .CVE-2014-4607
f9f5b8
# mark asm files as NOT needing execstack
f9f5b8
for i in asm/i386/src_gas/*.S; do
f9f5b8
  echo '.section .note.GNU-stack,"",@progbits' >> $i
f9f5b8
done
f9f5b8
f9f5b8
f9f5b8
%build
f9f5b8
%configure --disable-dependency-tracking --disable-static --enable-shared
24e0bd
make %{?_smp_mflags} CFLAGS="%{optflags} -fno-strict-aliasing"
f9f5b8
# build minilzo too (bz 439979)
24e0bd
gcc %{optflags} -fno-strict-aliasing -fpic -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
f9f5b8
gcc -g -shared -o libminilzo.so.0 -Wl,-soname,libminilzo.so.0 minilzo/minilzo.o
f9f5b8
f9f5b8
f9f5b8
%install
f9f5b8
rm -rf $RPM_BUILD_ROOT
f9f5b8
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
f9f5b8
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
f9f5b8
install -m 755 libminilzo.so.0 $RPM_BUILD_ROOT%{_libdir}
f9f5b8
ln -s libminilzo.so.0 $RPM_BUILD_ROOT%{_libdir}/libminilzo.so
f9f5b8
install -p -m 644 minilzo/minilzo.h $RPM_BUILD_ROOT%{_includedir}/lzo
f9f5b8
f9f5b8
#Remove doc
f9f5b8
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/lzo
f9f5b8
f9f5b8
%check
f9f5b8
make check test
f9f5b8
f9f5b8
f9f5b8
%clean
f9f5b8
rm -rf $RPM_BUILD_ROOT
f9f5b8
f9f5b8
f9f5b8
%post -p /sbin/ldconfig
f9f5b8
f9f5b8
%postun -p /sbin/ldconfig
f9f5b8
f9f5b8
%post minilzo -p /sbin/ldconfig
f9f5b8
f9f5b8
%postun minilzo -p /sbin/ldconfig
f9f5b8
f9f5b8
f9f5b8
%files
f9f5b8
%defattr(-,root,root,-)
f9f5b8
%doc AUTHORS COPYING THANKS NEWS
f9f5b8
%{_libdir}/liblzo2.so.*
f9f5b8
f9f5b8
%files minilzo
f9f5b8
%defattr(-,root,root,-)
f9f5b8
%doc minilzo/README.LZO
f9f5b8
%{_libdir}/libminilzo.so.0
f9f5b8
f9f5b8
%files devel
f9f5b8
%defattr(-,root,root,-)
f9f5b8
%doc doc/LZOAPI.TXT doc/LZO.FAQ doc/LZO.TXT
f9f5b8
%{_includedir}/lzo
f9f5b8
%{_libdir}/lib*lzo*.so
f9f5b8
f9f5b8
f9f5b8
%changelog
62fc53
* Wed Jul  2 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.06-8
24e0bd
- Built with -fno-strict-aliasing (rpmdiff)
24e0bd
  Related: CVE-2014-4607
24e0bd
62fc53
* Mon Jun 30 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.06-7
24e0bd
- Fixed integer overflow in decompressor
24e0bd
  Resolves: CVE-2014-4607
24e0bd
059b3e
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.06-6
059b3e
- Mass rebuild 2014-01-24
059b3e
059b3e
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.06-5
059b3e
- Mass rebuild 2013-12-27
059b3e
059b3e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.06-4
059b3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
f9f5b8
f9f5b8
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.06-3
f9f5b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f9f5b8
f9f5b8
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.06-2
f9f5b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f9f5b8
f9f5b8
* Wed Sep 14 2011 Huzaifa Sidhpurwala <huzaifas@redhat.com> - 2.06-1
f9f5b8
- Upgrade to latest upstream
f9f5b8
- Apply patch from Nicolas Chauvet
f9f5b8
f9f5b8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.03-4
f9f5b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f9f5b8
f9f5b8
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.03-3
f9f5b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f9f5b8
f9f5b8
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.03-2
f9f5b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f9f5b8
f9f5b8
* Thu May  1 2008 Lubomir Rintel <lkundrak@v3.sk> 2.03-1
f9f5b8
- New upstream release
f9f5b8
- Changed the license to GPLv2+
f9f5b8
f9f5b8
* Wed Apr  2 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 2.02-5
f9f5b8
- Fix configure failure with -Werror-implicit-function-declaration in CFLAGS
f9f5b8
- Add a minilzo subpackage which contains a shared version of minilzo, to be
f9f5b8
  used by all applications which ship with their own copy of it (bz 439979)
f9f5b8
f9f5b8
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.02-4
f9f5b8
- Autorebuild for GCC 4.3
f9f5b8
f9f5b8
* Wed Aug 15 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.02-3
f9f5b8
- Update License tag for new Licensing Guidelines compliance
f9f5b8
f9f5b8
* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.02-2
f9f5b8
- FE6 Rebuild
f9f5b8
f9f5b8
* Wed Jul 26 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.02-1
f9f5b8
- New upstream release 2.02, soname change!
f9f5b8
f9f5b8
* Mon Jul 24 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.08-7
f9f5b8
- Taking over as maintainer since Anvil has other priorities
f9f5b8
- Add a patch to fix asm detection on i386 (bug 145882, 145893). Thanks to
f9f5b8
  Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe> for the initial patch.
f9f5b8
- Removed unused build dependency on nasm
f9f5b8
- Remove static lib
f9f5b8
- Cleanup %%doc a bit
f9f5b8
f9f5b8
* Thu Mar 16 2006 Dams <anvil[AT]livna.org> - 1.08-6.fc5
f9f5b8
- Rebuild for new gcc
f9f5b8
f9f5b8
* Tue Jan 17 2006 Dams <anvil[AT]livna.org> - 1.08-5.fc5
f9f5b8
- Bumped release for gcc 4.1 rebuild
f9f5b8
f9f5b8
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.08-4
f9f5b8
- rebuild on all arches
f9f5b8
f9f5b8
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
f9f5b8
- rebuilt
f9f5b8
f9f5b8
* Sun Apr 27 2003 Dams <anvil[AT]livna.org> 0:1.08-0.fdr.2
f9f5b8
- Typo un devel description
f9f5b8
- Added post and postun scriptlets
f9f5b8
- Added URL in Source0
f9f5b8
f9f5b8
* Fri Apr 25 2003 Dams <anvil[AT]livna.org>
f9f5b8
- Initial build.