|
|
f8e54cd |
# spec file for fastlz
|
|
|
f8e54cd |
#
|
|
|
32b0bbd |
# Copyright (c) 2014-2018 Remi Collet
|
|
|
f8e54cd |
# License: CC-BY-SA
|
|
|
f8e54cd |
# http://creativecommons.org/licenses/by-sa/3.0/
|
|
|
f8e54cd |
#
|
|
|
f8e54cd |
# Please, preserve the changelog entries
|
|
|
f8e54cd |
#
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%global date 20070619
|
|
|
f8e54cd |
%global svnrev 12
|
|
|
f8e54cd |
%global abi 0
|
|
|
f8e54cd |
|
|
|
f8e54cd |
Name: fastlz
|
|
|
f8e54cd |
Summary: Portable real-time compression library
|
|
|
f8e54cd |
Version: 0.1.0
|
|
|
736c43c |
Release: 0.9.%{date}svnrev%{svnrev}%{?dist}
|
|
|
f8e54cd |
License: MIT
|
|
|
f8e54cd |
URL: http://fastlz.org/
|
|
|
f8e54cd |
|
|
|
f8e54cd |
# svn export -r 12 http://fastlz.googlecode.com/svn/trunk/ fastlz-12
|
|
|
f8e54cd |
# tar cjf fastlz-12.tar.bz2 fastlz-12
|
|
|
f8e54cd |
Source0: %{name}-%{svnrev}.tar.bz2
|
|
|
f8e54cd |
|
|
|
736c43c |
BuildRequires: gcc
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%description
|
|
|
f8e54cd |
FastLZ is a lossless data compression library designed for real-time
|
|
|
f8e54cd |
compression and decompression. It favors speed over compression ratio.
|
|
|
f8e54cd |
Decompression requires no memory. Decompression algorithm is very simple,
|
|
|
f8e54cd |
and thus extremely fast.
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%package devel
|
|
|
f8e54cd |
Summary: Header files and development libraries for %{name}
|
|
|
f8e54cd |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%description devel
|
|
|
f8e54cd |
This package contains the header files and development libraries
|
|
|
f8e54cd |
for %{name}.
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%prep
|
|
|
f8e54cd |
%setup -q -n %{name}-%{svnrev}
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%build
|
|
|
f8e54cd |
# Build the shared library
|
|
|
f8e54cd |
gcc %optflags -fPIC -c fastlz.c -o fastlz.o
|
|
|
f8e54cd |
gcc %optflags -fPIC -shared \
|
|
|
f8e54cd |
-Wl,-soname -Wl,lib%{name}.so.%{abi} \
|
|
|
f8e54cd |
-o lib%{name}.so.%{abi} fastlz.o
|
|
|
f8e54cd |
ln -s lib%{name}.so.%{abi} lib%{name}.so
|
|
|
f8e54cd |
|
|
|
f8e54cd |
# Build the commands for test
|
|
|
f8e54cd |
gcc %optflags -fPIC 6pack.c -L. -l%{name} -o 6pack
|
|
|
f8e54cd |
gcc %optflags -fPIC 6unpack.c -L. -l%{name} -o 6unpack
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%install
|
|
|
f8e54cd |
install -D -m 0755 lib%{name}.so.%{abi} %{buildroot}%{_libdir}/lib%{name}.so.%{abi}
|
|
|
f8e54cd |
ln -s lib%{name}.so.%{abi} %{buildroot}%{_libdir}/lib%{name}.so
|
|
|
f8e54cd |
install -D -pm 0644 %{name}.h %{buildroot}%{_includedir}/%{name}.h
|
|
|
f8e54cd |
|
|
|
f8e54cd |
# Don't install the commands, as we obviously don't need more compression tools
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%check
|
|
|
f8e54cd |
export LD_LIBRARY_PATH=$PWD
|
|
|
f8e54cd |
cp %{name}.c tmpin
|
|
|
f8e54cd |
./6pack -v
|
|
|
f8e54cd |
./6unpack -v
|
|
|
f8e54cd |
|
|
|
f8e54cd |
: Compress
|
|
|
f8e54cd |
./6pack -1 tmpin tmpout1
|
|
|
f8e54cd |
./6pack -2 tmpin tmpout2
|
|
|
f8e54cd |
|
|
|
f8e54cd |
: Uncompress 1
|
|
|
f8e54cd |
rm tmpin
|
|
|
f8e54cd |
./6unpack tmpout1
|
|
|
f8e54cd |
diff %{name}.c tmpin
|
|
|
f8e54cd |
|
|
|
f8e54cd |
: Uncompress 2
|
|
|
f8e54cd |
rm tmpin
|
|
|
f8e54cd |
./6unpack tmpout2
|
|
|
f8e54cd |
diff %{name}.c tmpin
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%files
|
|
|
f8e54cd |
%license LICENSE
|
|
|
f8e54cd |
%{_libdir}/lib%{name}.so.%{abi}
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%files devel
|
|
|
f8e54cd |
%{_libdir}/lib%{name}.so
|
|
|
f8e54cd |
%{_includedir}/%{name}.h
|
|
|
f8e54cd |
|
|
|
f8e54cd |
|
|
|
f8e54cd |
%changelog
|
|
|
736c43c |
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 0.1.0-0.9.20070619svnrev12
|
|
|
736c43c |
- missing BR on gcc
|
|
|
736c43c |
|
|
|
32b0bbd |
* Thu Feb 15 2018 Remi Collet <remi@remirepo.net> - 0.1.0-0.8.20070619svnrev12
|
|
|
32b0bbd |
- drop ldconfig scriptlets
|
|
|
32b0bbd |
|
|
|
8215caf |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.7.20070619svnrev12
|
|
|
8215caf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
8215caf |
|
|
|
bb0c49b |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.6.20070619svnrev12
|
|
|
bb0c49b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
bb0c49b |
|
|
|
4766b37 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.5.20070619svnrev12
|
|
|
4766b37 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
4766b37 |
|
|
|
d41a5c9 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.4.20070619svnrev12
|
|
|
d41a5c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
d41a5c9 |
|
|
|
575884c |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-0.3.20070619svnrev12
|
|
|
575884c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
575884c |
|
|
|
7d40e82 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-0.2.20070619svnrev12
|
|
|
7d40e82 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
7d40e82 |
|
|
|
f8e54cd |
* Fri Sep 5 2014 Remi Collet <remi@fedoraproject.org> - 0.1-0.1.20070619svnrev12
|
|
|
32b0bbd |
- Initial RPM
|