3 %bcond_without static_libs # don't build static libraries
5 Summary: Fast compression library
9 License: GPL v1, GPL v2, GPL v3
11 Source0: http://www.quicklz.com/%{name}.c
12 # Source0-md5: 76c8722e413ee99aff2ded50ced8b666
13 Source1: http://www.quicklz.com/%{name}.h
14 # Source1-md5: bee8a040eb4dd5de77ab180b017c3582
15 URL: http://www.quicklz.com/
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 QuickLZ is the world's fastest compression library, reaching 308
25 Summary: Header files for %{name} library
26 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
27 Group: Development/Libraries
28 Requires: %{name} = %{version}-%{release}
31 Header files for %{name} library.
33 %description devel -l pl.UTF-8
34 Pliki nagłówkowe biblioteki %{name}.
37 Summary: Static %{name} library
38 Summary(pl.UTF-8): Statyczna biblioteka %{name}
39 Group: Development/Libraries
40 Requires: %{name}-devel = %{version}-%{release}
43 Static %{name} library.
45 %description static -l pl.UTF-8
46 Statyczna biblioteka %{name}.
53 %{__cc} %{rpmcflags} -fPIC -c quicklz.c -o quicklz.o
55 # Build the shared library
56 %{__cc} %{rpmcflags} -fPIC %{rpmldflags} -shared -Wl,-soname -Wl,lib%{name}.so.%{abi} -o lib%{name}.so.%{abi} quicklz.o
58 # Build the static library
59 %if %{with static_libs}
60 ar rcs lib%{name}.a quicklz.o
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
67 install -p lib%{name}.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.%{abi}.0.0
68 ln -s lib%{name}.so.%{abi} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
69 /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
70 cp -p %{name}.h $RPM_BUILD_ROOT%{_includedir}
72 %if %{with static_libs}
73 cp -p lib%{name}.a $RPM_BUILD_ROOT%{_libdir}
77 rm -rf $RPM_BUILD_ROOT
79 %post -p /sbin/ldconfig
80 %postun -p /sbin/ldconfig
83 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_libdir}/libquicklz.so.*.*.*
85 %attr(755,root,root) %ghost %{_libdir}/libquicklz.so.0
88 %defattr(644,root,root,755)
89 %{_includedir}/quicklz.h
90 %{_libdir}/libquicklz.so
92 %if %{with static_libs}
94 %defattr(644,root,root,755)
95 %{_libdir}/libquicklz.a