Summary:        C library for reading, creating, and modifying zip archives
Name:           libzip
Version:        0.9.3
Release:        1%{?_dist_release}

Group:          System Environment/Libraries
License:        BSD
URL:            http://www.nih.at/libzip/index.html
Source0:        http://www.nih.at/libzip/%{name}-%{version}.tar.bz2

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  zlib-devel >= 1.2.2
BuildRequires:  pkgconfig

%description
libzip is a C library for reading, creating, and modifying zip archives. Files
can be added from data buffers, files, or compressed data copied directly from 
other zip archives. Changes made without closing the archive can be reverted. 
The API is documented by man pages.

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: zlib-devel

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%setup -q

%build
%configure --disable-static
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'

find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS NEWS README THANKS TODO
%{_bindir}/zipcmp
%{_bindir}/zipmerge
%{_bindir}/ziptorrent
%{_libdir}/libzip.so.1*
%{_mandir}/man1/*zip*

%files devel
%defattr(-,root,root,-)
%{_includedir}/zip.h
%{_libdir}/libzip.so
%{_libdir}/pkgconfig/libzip.pc
%{_mandir}/man3/*zip*


%changelog
* Sat Mar  6 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.9.3-1
- new upstream release
- built with new toolchain

* Sun Aug 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.9-5
- fixed %%changelog based on libzip-0.9-1vl5(VinePlus/5.0) package

* Sun Aug 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.9-4
- Initial build for Vine Linux

* Sat Feb 14 2009 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 0.9-1
- initial release

