2 %if "%{run_tests}" == "1"
9 License: GPL-2.0-or-later
10 Summary: Data compression library with very fast (de)compression
11 Url: http://www.oberhumer.com/opensource/lzo/
12 Group: System/Libraries
13 Source0: http://www.oberhumer.com/opensource/lzo/download/%{name}-%{version}.tar.gz
14 Source1001: lzo.manifest
15 BuildRequires: zlib-devel
16 Requires(post): /sbin/ldconfig
17 Requires(postun): /sbin/ldconfig
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.
27 Summary: Mini version of lzo for apps which don't need the full version
28 Group: System/Libraries
29 Requires: %{name} = %{version}
30 Requires(post): /sbin/ldconfig
31 Requires(postun): /sbin/ldconfig
34 A small (mini) version of lzo for embedding into applications which don't need
35 full blown lzo compression support.
38 Summary: Development files for the lzo library
39 Group: Development/Libraries
40 Requires: %{name} = %{version}
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.
55 %configure --disable-static \
56 --disable-dependency-tracking \
58 CFLAGS="`echo $CFLAGS | sed 's/-O2//g'`"
60 %__make %{?_smp_mflags}
62 # build minilzo too (bz 439979)
63 gcc %{optflags} -O2 -g -fpic -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
64 gcc -g -shared -o libminilzo.so.0 -Wl,-soname,libminilzo.so.0 minilzo/minilzo.o
68 install -m 755 libminilzo.so.0 %{buildroot}%{_libdir}
69 ln -sf libminilzo.so.0 %{buildroot}%{_libdir}/libminilzo.so
70 install -p -m 644 minilzo/minilzo.h %{buildroot}%{_includedir}/lzo
71 rm -f %{buildroot}%{_datadir}/doc/%{name}/COPYING
74 %post -p /sbin/ldconfig
76 %postun -p /sbin/ldconfig
79 %post minilzo -p /sbin/ldconfig
81 %postun minilzo -p /sbin/ldconfig
84 rm -f /tmp/%{name}_test
85 %__make test | tee -i /tmp/%{name}_log
86 cat /tmp/%{name}_log | grep "^LZO1" | sed -e 's/^LZO1.*| /TEST: PASS: /g' > /tmp/%{name}_test
87 chmod +x ./run_test.sh
88 ./run_test.sh %{name} %{version}
89 rm -f /tmp/%{name}_log
92 %manifest %{name}.manifest
93 %defattr(-,root,root,-)
95 %{_libdir}/liblzo2.so.*
98 %manifest %{name}.manifest
99 %defattr(-,root,root,-)
100 %doc minilzo/README.LZO
101 %{_libdir}/libminilzo.so.0
104 %manifest %{name}.manifest
105 %defattr(-,root,root,-)
106 %doc %{_datadir}/doc/%{name}/AUTHORS
107 %doc %{_datadir}/doc/%{name}/LZO*
108 %doc %{_datadir}/doc/%{name}/NEWS
109 %doc %{_datadir}/doc/%{name}/THANKS
111 %{_libdir}/lib*lzo*.so
112 %{_libdir}/pkgconfig/lzo2.pc