| 1 | Name: lzo
|
|---|
| 2 | Version: 2.09
|
|---|
| 3 | Release: 3%{?dist}
|
|---|
| 4 | Summary: Data compression library with very fast (de)compression
|
|---|
| 5 | Group: System Environment/Libraries
|
|---|
| 6 | License: GPLv2+
|
|---|
| 7 | URL: http://www.oberhumer.com/opensource/lzo/
|
|---|
| 8 | Vendor: bww bitwise works GmbH
|
|---|
| 9 |
|
|---|
| 10 | %define minilzo mlzo22
|
|---|
| 11 | #define svn_url e:/trees/liblzo/trunk
|
|---|
| 12 | %define svn_url http://svn.netlabs.org/repos/ports/lzo/trunk
|
|---|
| 13 | %define svn_rev 1708
|
|---|
| 14 |
|
|---|
| 15 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: zlib-devel
|
|---|
| 18 |
|
|---|
| 19 | %description
|
|---|
| 20 | LZO is a portable lossless data compression library written in ANSI C.
|
|---|
| 21 | It offers pretty fast compression and very fast decompression.
|
|---|
| 22 | Decompression requires no memory. In addition there are slower
|
|---|
| 23 | compression levels achieving a quite competitive compression ratio
|
|---|
| 24 | while still decompressing at this very high speed.
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | %package minilzo
|
|---|
| 28 | Summary: Mini version of lzo for apps which don't need the full version
|
|---|
| 29 | Group: System Environment/Libraries
|
|---|
| 30 |
|
|---|
| 31 | %description minilzo
|
|---|
| 32 | A small (mini) version of lzo for embedding into applications which don't need
|
|---|
| 33 | full blown lzo compression support.
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | %package devel
|
|---|
| 37 | Summary: Development files for the lzo library
|
|---|
| 38 | Group: Development/Libraries
|
|---|
| 39 | Requires: %{name} = %{version}-%{release}
|
|---|
| 40 | Requires: %{name}-minilzo = %{version}-%{release}
|
|---|
| 41 | Requires: zlib-devel
|
|---|
| 42 |
|
|---|
| 43 | %description devel
|
|---|
| 44 | LZO is a portable lossless data compression library written in ANSI C.
|
|---|
| 45 | It offers pretty fast compression and very fast decompression.
|
|---|
| 46 | This package contains development files needed for lzo.
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | %debug_package
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | %prep
|
|---|
| 53 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{?!svn_rev):0}
|
|---|
| 54 | %setup -q
|
|---|
| 55 | %else
|
|---|
| 56 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 57 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 58 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 59 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 60 | %endif
|
|---|
| 61 |
|
|---|
| 62 | # hammer to nuke rpaths, recheck on new releases
|
|---|
| 63 | autoreconf -f -i
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | %build
|
|---|
| 67 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 68 | %configure --disable-static --enable-shared
|
|---|
| 69 |
|
|---|
| 70 | make %{?_smp_mflags}
|
|---|
| 71 | # build minilzo too (bz 439979)
|
|---|
| 72 | gcc -g -O2 -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
|
|---|
| 73 | echo "LIBRARY %{minilzo} INITINSTANCE TERMINSTANCE" > %{minilzo}.def
|
|---|
| 74 | echo "DATA MULTIPLE" >> %{minilzo}.def
|
|---|
| 75 | echo "EXPORTS" >> %{minilzo}.def
|
|---|
| 76 | emxexp minilzo/minilzo.o >> %{minilzo}.def
|
|---|
| 77 | gcc -g -Zhigh-mem -Zomf -Zdll %{minilzo}.def -o %{minilzo}.dll minilzo/minilzo.o
|
|---|
| 78 | emximp -o %{minilzo}.a %{minilzo}.def
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | %install
|
|---|
| 82 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 83 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|---|
| 84 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|---|
| 85 | install -m 755 %{minilzo}.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 86 | install -p -m 644 minilzo/minilzo.h $RPM_BUILD_ROOT%{_includedir}/lzo
|
|---|
| 87 |
|
|---|
| 88 | #Remove doc
|
|---|
| 89 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/lzo
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | %check
|
|---|
| 93 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
|
|---|
| 94 | make check test
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 | %clean
|
|---|
| 98 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | %files
|
|---|
| 102 | %defattr(-,root,root,-)
|
|---|
| 103 | %{!?_licensedir:%global license %%doc}
|
|---|
| 104 | %license COPYING
|
|---|
| 105 | %doc AUTHORS THANKS NEWS
|
|---|
| 106 | %{_libdir}/lzo2*.dll
|
|---|
| 107 |
|
|---|
| 108 | %files minilzo
|
|---|
| 109 | %defattr(-,root,root,-)
|
|---|
| 110 | %{!?_licensedir:%global license %%doc}
|
|---|
| 111 | %license COPYING
|
|---|
| 112 | %doc minilzo/README.LZO
|
|---|
| 113 | %{_libdir}/%{minilzo}.dll
|
|---|
| 114 |
|
|---|
| 115 | %files devel
|
|---|
| 116 | %defattr(-,root,root,-)
|
|---|
| 117 | %doc doc/LZOAPI.TXT doc/LZO.FAQ doc/LZO.TXT
|
|---|
| 118 | %{_includedir}/lzo
|
|---|
| 119 | %{_libdir}/*lzo*.a
|
|---|
| 120 |
|
|---|
| 121 | %changelog
|
|---|
| 122 | * Thu Sep 22 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.09-3
|
|---|
| 123 | - fix a alignment bug in lzotest
|
|---|
| 124 |
|
|---|
| 125 | * Tue Jun 14 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.09-2
|
|---|
| 126 | - changed debug package to new scheme
|
|---|
| 127 |
|
|---|
| 128 | * Fri Feb 27 2015 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.09-1
|
|---|
| 129 | - Initial version
|
|---|