File lrzip.spec of Package lrzip

#
# spec file for package lrzip
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define soname  0
Name:           lrzip
Version:        0.621
Release:        0
Summary:        Very High Ratio and Speed Compression Designed for Large Files
License:        GPL-2.0
Group:          Productivity/Archiving/Compression
Url:            http://ck.kolivas.org/apps/lrzip/
Source:         http://ck.kolivas.org/apps/lrzip/lrzip-%{version}.tar.bz2
BuildRequires:  gcc-c++
BuildRequires:  libbz2-devel
BuildRequires:  lzo-devel
BuildRequires:  doxygen
BuildRequires:  nasm
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
LRZIP is a compression program that can achieve very high compression
ratios and speed when used with large files. It uses the combined compression
algorithms of lzma for maximum compression, lzo for maximum speed, and the long
range redundancy reduction of rzip. It is designed to scale with increases
with RAM size, improving compression further. A choice of either size or
speed optimizations allows for either better compression than even lzma can
provide, or better speed than gzip, but with bzip2 sized compression levels.

%package -n liblrzip%{soname}
Summary:        Very High Ratio and Speed Compression Designed for Large Files
Group:          System/Libraries

%description -n liblrzip%{soname}
LRZIP is a compression program that can achieve very high compression
ratios and speed when used with large files. It uses the combined compression
algorithms of lzma for maximum compression, lzo for maximum speed, and the long
range redundancy reduction of rzip. It is designed to scale with increases
with RAM size, improving compression further. A choice of either size or
speed optimizations allows for either better compression than even lzma can
provide, or better speed than gzip, but with bzip2 sized compression levels.

%package -n liblrzip-devel
Summary:        Very High Ratio and Speed Compression Designed for Large Files
Group:          Development/Libraries/C and C++
Requires:	liblrzip%{soname} = %{version}

%description -n liblrzip-devel
LRZIP is a compression program that can achieve very high compression
ratios and speed when used with large files. It uses the combined compression
algorithms of lzma for maximum compression, lzo for maximum speed, and the long
range redundancy reduction of rzip. It is designed to scale with increases
with RAM size, improving compression further. A choice of either size or
speed optimizations allows for either better compression than even lzma can
provide, or better speed than gzip, but with bzip2 sized compression levels.

%prep
%setup -q

%build
%configure 
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

rm "%{buildroot}%{_libdir}"/*.{a,la}
rm -rf "%{buildroot}%{_datadir}/doc"

rm doc/Makefile*
chmod 0644 README* COPYING doc/README*

%post   -n liblrzip%{soname} -p /sbin/ldconfig

%postun -n liblrzip%{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README* TODO WHATS-NEW
%doc doc/*
%{_bindir}/lrzcat
%{_bindir}/lrzip
%{_bindir}/lrunzip
%{_bindir}/lrztar
%{_bindir}/lrzuntar
%doc %{_mandir}/man1/lrzcat.1%{ext_man}
%doc %{_mandir}/man1/lrzip.1%{ext_man}
%doc %{_mandir}/man1/lrunzip.1%{ext_man}
%doc %{_mandir}/man1/lrztar.1%{ext_man}
%doc %{_mandir}/man1/lrzuntar.1%{ext_man}
%doc %{_mandir}/man5/lrzip.conf.5%{ext_man}

%files -n liblrzip%{soname}
%defattr(-,root,root)
%{_libdir}/liblrzip.so.%{soname}
%{_libdir}/liblrzip.so.%{soname}.*

%files -n liblrzip-devel
%defattr(-,root,root)
%{_includedir}/Lrzip.h
%{_libdir}/liblrzip.so
%{_libdir}/pkgconfig/lrzip.pc

%changelog