File zziplib.spec of Package zziplib
#
# spec file for package zziplib
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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:           zziplib
%define lname	libzzip-0-13
Summary:        Free Zip Compression Library with an Easy-to-Use API
License:        LGPL-2.1+
Group:          System/Libraries
Version:        0.13.62
Release:        0
Url:            http://zziplib.sourceforge.net
Source0:        http://prdownloads.sourceforge.net/zziplib/%{name}-%{version}.tar.bz2
Source2:        baselibs.conf
Patch:          zziplib-0.13.62.patch
Patch1:         zziplib-0.13.62-wronglinking.patch
Patch2:         zziplib-largefile.patch
BuildRequires:  dos2unix
BuildRequires:  fdupes
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  python
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%description
ZZipLib is a library for dealing with zip and zip-like archives by
using free algorithms of zlib.
%package -n %lname
Summary:        Free zip compression library with easy to use API
Group:          System/Libraries
Obsoletes:      zziplib < %version-%release
Provides:       zziplib = %version-%release
%description -n %lname
ZZipLib is a library for dealing with zip and zip-like archives by
using free algorithms of zlib.
%package devel
Summary:        Free zip compression library with easy to use API
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
Requires:       zlib-devel
%description devel
That are the header files needed for developing applications using
ZZipLib.
%prep
%setup -q
%patch
%patch1
%patch2
# Fix wrong encoding
dos2unix docs/README.MSVC6
dos2unix docs/sdocbook.css
%build
autoreconf -fiv
%configure --with-largefile --enable-frame-pointer --disable-static --with-pic
make %{?_smp_mflags} all;
make doc;
%install
%makeinstall
%{__rm} -f docs/Make* docs/zziplib-manpages.ar
find "%buildroot" -name "*.la" -type f -delete
%fdupes %buildroot
%check 
%{__make} check || exit 0
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%{_libdir}/libzzip*.so.*
%files devel
%defattr(-,root,root)
%doc docs/README* docs/* ChangeLog README TODO 
%{_bindir}/unzzip*
%{_bindir}/zz*
%{_bindir}/unzip-mem
%{_libdir}/libzzip*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*
%{_datadir}/aclocal/*.m4
%changelog