source: spec/trunk/SPECS/lzo.spec@ 1567

Last change on this file since 1567 was 851, checked in by Silvan Scherrer, 9 years ago

spec: lzo: use memalign() instead of malloc() in lzotest

File size: 3.7 KB
Line 
1Name: lzo
2Version: 2.09
3Release: 3%{?dist}
4Summary: Data compression library with very fast (de)compression
5Group: System Environment/Libraries
6License: GPLv2+
7URL: http://www.oberhumer.com/opensource/lzo/
8Vendor: 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
15Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
16
17BuildRequires: zlib-devel
18
19%description
20LZO is a portable lossless data compression library written in ANSI C.
21It offers pretty fast compression and very fast decompression.
22Decompression requires no memory. In addition there are slower
23compression levels achieving a quite competitive compression ratio
24while still decompressing at this very high speed.
25
26
27%package minilzo
28Summary: Mini version of lzo for apps which don't need the full version
29Group: System Environment/Libraries
30
31%description minilzo
32A small (mini) version of lzo for embedding into applications which don't need
33full blown lzo compression support.
34
35
36%package devel
37Summary: Development files for the lzo library
38Group: Development/Libraries
39Requires: %{name} = %{version}-%{release}
40Requires: %{name}-minilzo = %{version}-%{release}
41Requires: zlib-devel
42
43%description devel
44LZO is a portable lossless data compression library written in ANSI C.
45It offers pretty fast compression and very fast decompression.
46This 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
57svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
58rm -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
63autoreconf -f -i
64
65
66%build
67export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
68%configure --disable-static --enable-shared
69
70make %{?_smp_mflags}
71# build minilzo too (bz 439979)
72gcc -g -O2 -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
73echo "LIBRARY %{minilzo} INITINSTANCE TERMINSTANCE" > %{minilzo}.def
74echo "DATA MULTIPLE" >> %{minilzo}.def
75echo "EXPORTS" >> %{minilzo}.def
76emxexp minilzo/minilzo.o >> %{minilzo}.def
77gcc -g -Zhigh-mem -Zomf -Zdll %{minilzo}.def -o %{minilzo}.dll minilzo/minilzo.o
78emximp -o %{minilzo}.a %{minilzo}.def
79
80
81%install
82rm -rf $RPM_BUILD_ROOT
83make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
84find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
85install -m 755 %{minilzo}.dll $RPM_BUILD_ROOT%{_libdir}
86install -p -m 644 minilzo/minilzo.h $RPM_BUILD_ROOT%{_includedir}/lzo
87
88#Remove doc
89rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/lzo
90
91
92%check
93export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
94make check test
95
96
97%clean
98rm -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
Note: See TracBrowser for help on using the repository browser.