File quazip.spec of Package quazip
#
# spec file for package quazip
#
# Copyright (c) 2019 SUSE LINUX 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 https://bugs.opensuse.org/
#
%define so_ver 1
Name: quazip
Version: 0.7.6
Release: 0
Summary: C++ wrapper for ZIP/UNZIP
License: GPL-2.0-or-later OR LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Url: https://github.com/stachenov/quazip
Source: https://github.com/stachenov/quazip/archive/%{version}.tar.gz#/quazip-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: graphviz
BuildRequires: graphviz-gnome
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRequires: pkgconfig(QtCore)
%description
A C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package, using Qt4 toolkit.
Useful to access ZIP archives from the Qt programs.
%package -n libquazip%{so_ver}
Summary: C++ wrapper for ZIP/UNZIP
Group: Development/Libraries/C and C++
%description -n libquazip%{so_ver}
A C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package, using Qt4 toolkit.
Useful to access ZIP archives from the Qt programs.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: libquazip%{so_ver} = %{version}-%{release}
Requires: pkgconfig(QtCore)
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: C++ wrapper for ZIP/UNZIP
Group: Development/Libraries/C and C++
%description doc
A C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package, using Qt4 toolkit.
Useful to access ZIP archives from the Qt programs.
%prep
%setup -q
%build
pushd quazip
qmake PREFIX=%{_prefix} QMAKE_CFLAGS="%{optflags}" QMAKE_CXXFLAGS="%{optflags} -fvisibility-inlines-hidden"
make %{?_smp_mflags}
popd
sed -i 's/HTML_TIMESTAMP\s*= YES/HTML_TIMESTAMP=NO/' Doxyfile
doxygen -u
doxygen
%install
pushd quazip
make install INSTALL_ROOT=%{buildroot}
if [ "%{_lib}" != "lib" ]; then
mv %{buildroot}%{_prefix}/lib %{buildroot}%{_libdir}
fi
popd
pushd doc/html
%fdupes -s .
popd
%post -n libquazip%{so_ver} -p /sbin/ldconfig
%postun -n libquazip%{so_ver} -p /sbin/ldconfig
%files -n libquazip%{so_ver}
%license COPYING*
%doc NEWS.txt README*
%{_libdir}/libquazip.so.%{so_ver}*
%files devel
%license COPYING*
%{_includedir}/quazip
%{_libdir}/libquazip.so
%{_libdir}/pkgconfig/quazip.pc
%files doc
%doc doc/html
%changelog