lzlib/lzlib.spec

135 lines
4.1 KiB
RPMSpec

# vim: set ts=4 sw=4 et:
#
# spec file for package lzlib
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#
Name: lzlib
Version: 1.5
Release: 0
%define soname 1
Summary: LZMA Compression and Decompression Library
License: GPL-3.0+
Group: Development/Libraries/C and C++
Url: http://www.nongnu.org/lzip/lzlib.html
#Freecode-URL: http://freecode.com/projects/lzlib
Source: http://download-mirror.savannah.gnu.org/releases/lzip/%name-%version.tar.lz
Source2: http://download-mirror.savannah.gnu.org/releases/lzip/%name-%version.tar.lz.sig
Source3: %name.keyring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: lzip
BuildRequires: make
%if 0%{?suse_version} >= 1230
BuildRequires: gpg-offline
%endif
PreReq: %install_info_prereq
%description
The lzlib compression library provides in-memory LZMA compression and
decompression functions, including integrity checking of the
decompressed data. The compressed data format used by the library is
the lzip format.
%package -n liblz%{soname}
Summary: LZMA Compression and Decompression Library
Group: System/Libraries
%description -n liblz%{soname}
The lzlib compression library provides in-memory LZMA compression and
decompression functions, including integrity checking of the
decompressed data. The compressed data format used by the library is
the lzip format.
%package devel
Summary: LZMA Compression and Decompression Library
Group: Development/Libraries/C and C++
Requires: liblz%{soname} = %{version}
Obsoletes: lzlib-devel < %version-%release
Provides: lzlib-devel = %version-%release
%description devel
The lzlib compression library provides in-memory LZMA compression and
decompression functions, including integrity checking of the
decompressed data. The compressed data format used by the library is
the lzip format.
This subpackage contains libraries and header files for developing
applications that want to make use of libcerror.
%prep
%{?gpg_verify: %gpg_verify %{S:2}}
%if 0%{?__lzip:1}
%setup -q
%else
tar --use=lzip -xf "%{S:0}"
%setup -DTq
%endif
%build
# not autoconf!
# don't use the configure macro here, as it will cause the configure script to
# skip parameters as soon as it encounters one that it doesn't understand
./configure \
--prefix="%{_prefix}" \
--bindir="%{_bindir}" \
--datadir="%{_datadir}" \
--includedir="%{_includedir}" \
--infodir="%{_infodir}" \
--libdir="%{_libdir}" \
--mandir="%{_mandir}" \
--sysconfdir="%{_sysconfdir}" \
--enable-shared \
CXX="%__cxx" \
CPPFLAGS="%{optflags}" \
CXXFLAGS="%{optflags}"
%__make %{?_smp_flags}
%install
%__make DESTDIR="%{buildroot}" LDCONFIG=echo install
# configure had no --disable-static
rm -f "%buildroot/%_libdir"/*.a
%check
%__make check
%post -n liblz%{soname} -p /sbin/ldconfig
%postun -n liblz%{soname} -p /sbin/ldconfig
%post devel
%install_info --info-dir="%{_infodir}" "%{_infodir}/%{name}".info%{ext_info}
%postun devel
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}/%{name}".info%{ext_info}
%files -n liblz%{soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/liblz.so.%{soname}
%{_libdir}/liblz.so.%{soname}.*
%files devel
%defattr(-,root,root)
%{_includedir}/lzlib.h
%{_libdir}/liblz.so
%doc %{_infodir}/lzlib.info%{ext_info}
%changelog