Blob Blame History Raw
Name:		quazip
Version:	0.3
Release:	2%{?dist}
Summary:	Qt/C++ wrapper for the minizip library
License:	GPLv2+ or LGPLv2+
Group:		System Environment/Libraries
URL:		http://quazip.sourceforge.net/
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRequires:	qt4-devel minizip-devel
BuildRequires:	doxygen graphviz

%description
QuaZIP is a simple C++ wrapper over Gilles Vollant's ZIP/UNZIP package that
can be used to access ZIP archives. It uses Trolltech's Qt toolkit.

QuaZIP allows you to access files inside ZIP archives using QIODevice API,
and - yes! - that means that you can also use QTextStream, QDataStream or
whatever you would like to use on your zipped files.

QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both reading
from and writing to ZIP archives.

%package devel
Summary:		Development files for %{name}
Group:			Development/Libraries
Requires:		%{name}%{?_isa} = %{version}-%{release}
Requires:		minizip-devel%{?_isa}
Requires:		qt4-devel%{?_isa}

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

%prep
%setup -q

#remove bundled minizip library
pushd %{name}
rm -rf crypt.h ioapi* unzip* zip*
popd

# Fixes build and install
sed -i 's\PREFIX/lib\PREFIX/%{_lib}\' %{name}/%{name}.pro
sed -i 's/\*.c //' %{name}/%{name}.pro

%build
export PATH=%{_qt4_bindir}:$PATH
%{_qt4_qmake} PREFIX=%{_prefix} LIBS+=-lminizip INCLUDEPATH+=%{_includedir}/minizip
#do not build in parallel - there are race conditions in 
#qmake-generated makefiles
make

doxygen Doxyfile
for file in doc/html/*; do
	touch -r Doxyfile $file
done

%install
make INSTALL="install -p" INSTALL_ROOT=%{buildroot} install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING* NEWS README
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/html
%{_includedir}/%{name}
%{_libdir}/*.so

%changelog
* Sat Jul 24 2010 Chen Lei <supercyper@163.com> - 0.3-2
- add BR:graphviz for building apidocs

* Sat Jul 24 2010 Chen Lei <supercyper@163.com> - 0.3-1
- update to 0.3

* Wed Feb  3 2010 Chen Lei <supercyper@163.com> - 0.2.3-5
- quazip-devel must Requires minizip-devel

* Sun Jan 31 2010 Chen Lei <supercyper@163.com> - 0.2.3-4
- change license to GPLv2+ or LGPLv2+

* Sun Jan 31 2010 Chen Lei <supercyper@163.com> - 0.2.3-3
- use %%doc for packaging documentations

* Sun Jan 31 2010 Chen Lei <supercyper@163.com> - 0.2.3-2
- use system-wide minizip library

* Sun Jan 31 2010 Chen Lei <supercyper@163.com> - 0.2.3-1
- initial rpm build