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