0b98f9
%global with_tests     0%{!?_without_tests:1}
0b98f9
0b98f9
Name:    libzip
0b98f9
Version: 1.6.1
0b98f9
Release: 1%{?dist}
0b98f9
Summary: C library for reading, creating, and modifying zip archives
0b98f9
0b98f9
License: BSD
0b98f9
URL:     https://libzip.org/
0b98f9
Source0: https://libzip.org/download/libzip-%{version}.tar.xz
0b98f9
0b98f9
BuildRequires:  gcc
0b98f9
BuildRequires:  zlib-devel
0b98f9
BuildRequires:  bzip2-devel
0b98f9
BuildRequires:  openssl-devel
0b98f9
BuildRequires:  xz-devel
0b98f9
BuildRequires:  cmake >= 3.0.2
0b98f9
# Needed to run the test suite
0b98f9
# find regress/ -type f | /usr/lib/rpm/perl.req
0b98f9
# find regress/ -type f | /usr/lib/rpm/perl.prov
0b98f9
BuildRequires:  perl-interpreter
0b98f9
BuildRequires:  perl(Cwd)
0b98f9
BuildRequires:  perl(File::Copy)
0b98f9
BuildRequires:  perl(File::Path)
0b98f9
BuildRequires:  perl(Getopt::Long)
0b98f9
BuildRequires:  perl(IPC::Open3)
0b98f9
BuildRequires:  perl(Storable)
0b98f9
BuildRequires:  perl(Symbol)
0b98f9
BuildRequires:  perl(UNIVERSAL)
0b98f9
BuildRequires:  perl(strict)
0b98f9
BuildRequires:  perl(warnings)
0b98f9
0b98f9
0b98f9
%description
0b98f9
libzip is a C library for reading, creating, and modifying zip archives. Files
0b98f9
can be added from data buffers, files, or compressed data copied directly from 
0b98f9
other zip archives. Changes made without closing the archive can be reverted. 
0b98f9
The API is documented by man pages.
0b98f9
0b98f9
0b98f9
%package devel
0b98f9
Summary:  Development files for %{name}
0b98f9
Requires: %{name}%{?_isa} = %{version}-%{release}
0b98f9
0b98f9
%description devel
0b98f9
The %{name}-devel package contains libraries and header files for
0b98f9
developing applications that use %{name}.
0b98f9
0b98f9
0b98f9
%package tools
0b98f9
Summary:  Command line tools from %{name}
0b98f9
Requires: %{name}%{?_isa} = %{version}-%{release}
0b98f9
0b98f9
%description tools
0b98f9
The %{name}-tools package provides command line tools split off %{name}:
0b98f9
- zipcmp
0b98f9
- zipmerge
0b98f9
- ziptool
0b98f9
0b98f9
0b98f9
%prep
0b98f9
%autosetup -p1
0b98f9
0b98f9
# unwanted in package documentation
0b98f9
rm INSTALL.md
0b98f9
0b98f9
0b98f9
%build
0b98f9
%cmake \
0b98f9
  -DENABLE_COMMONCRYPTO:BOOL=OFF \
0b98f9
  -DENABLE_GNUTLS:BOOL=OFF \
0b98f9
  -DENABLE_MBEDTLS:BOOL=OFF \
0b98f9
  -DENABLE_OPENSSL:BOOL=ON \
0b98f9
  -DENABLE_WINDOWS_CRYPTO:BOOL=OFF \
0b98f9
  -DENABLE_BZIP2:BOOL=ON \
0b98f9
  -DENABLE_LZMA:BOOL=ON \
0b98f9
  -DBUILD_TOOLS:BOOL=ON \
0b98f9
  -DBUILD_REGRESS:BOOL=ON \
0b98f9
  -DBUILD_EXAMPLES:BOOL=OFF \
0b98f9
  -DBUILD_DOC:BOOL=ON \
0b98f9
  .
0b98f9
0b98f9
make %{?_smp_mflags}
0b98f9
0b98f9
0b98f9
%install
0b98f9
make install DESTDIR=%{buildroot} INSTALL='install -p'
0b98f9
0b98f9
0b98f9
%check
0b98f9
%if %{with_tests}
0b98f9
make check
0b98f9
%else
0b98f9
: Test suite disabled
0b98f9
%endif
0b98f9
0b98f9
0b98f9
%ldconfig_scriptlets
0b98f9
0b98f9
0b98f9
%files
0b98f9
%license LICENSE
0b98f9
%{_libdir}/libzip.so.5*
0b98f9
0b98f9
%files tools
0b98f9
%{_bindir}/zipcmp
0b98f9
%{_bindir}/zipmerge
0b98f9
%{_bindir}/ziptool
0b98f9
%{_mandir}/man1/zip*
0b98f9
0b98f9
%files devel
0b98f9
%doc AUTHORS THANKS *.md
0b98f9
%{_includedir}/zip.h
0b98f9
%{_includedir}/zipconf*.h
0b98f9
%{_libdir}/libzip.so
0b98f9
%{_libdir}/pkgconfig/libzip.pc
0b98f9
%{_mandir}/man3/libzip*
0b98f9
%{_mandir}/man3/zip*
0b98f9
%{_mandir}/man3/ZIP*
0b98f9
0b98f9
0b98f9
%changelog
0b98f9
* Thu May 14 2020 Remi Collet <rcollet@redhat.com> - 1.6.1-1
0b98f9
- update to 1.6.1
0b98f9
- enable lzma support
0b98f9
0b98f9
* Tue May  7 2019 Remi Collet <rcollet@redhat.com> - 1.5.2-1
0b98f9
- update to 1.5.2
0b98f9
- add all explicit cmake options to ensure openssl is used
0b98f9
  even in local build with other lilbraries available
0b98f9
0b98f9
* Wed Apr 11 2018 Remi Collet <remi@remirepo.net> - 1.5.1-1
0b98f9
- update to 1.5.1
0b98f9
- drop dependency on zlib-devel and bzip2-devel no more
0b98f9
  referenced in libzip.pc
0b98f9
- drop rpath patch merged upstream
0b98f9
0b98f9
* Thu Mar 15 2018 Remi Collet <remi@remirepo.net> - 1.5.0-2
0b98f9
- add dependency on zlib-devel and bzip2-devel #1556068
0b98f9
0b98f9
* Mon Mar 12 2018 Remi Collet <remi@remirepo.net> - 1.5.0-1
0b98f9
- update to 1.5.0
0b98f9
- use openssl for cryptography instead of bundled custom AES implementation
0b98f9
0b98f9
* Tue Feb 20 2018 Remi Collet <remi@remirepo.net> - 1.4.0-5
0b98f9
- missing BR on C compiler
0b98f9
- use ldconfig_scriptlets
0b98f9
0b98f9
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0b98f9
0b98f9
* Fri Jan  5 2018 Remi Collet <remi@remirepo.net> - 1.4.0-3
0b98f9
- add upstream patch and drop multilib hack
0b98f9
0b98f9
* Tue Jan  2 2018 Remi Collet <remi@remirepo.net> - 1.4.0-2
0b98f9
- re-add multilib hack #1529886
0b98f9
0b98f9
* Sat Dec 30 2017 Remi Collet <remi@remirepo.net> - 1.4.0-1
0b98f9
- update to 1.4.0
0b98f9
- switch to cmake
0b98f9
- add upstream patch for lib64
0b98f9
0b98f9
* Mon Nov 20 2017 Remi Collet <remi@remirepo.net> - 1.3.2-1
0b98f9
- update to 1.3.2
0b98f9
- drop multilib header hack
0b98f9
- change URL to https://libzip.org/
0b98f9
- test suite now ok on all arch
0b98f9
0b98f9
* Wed Sep 06 2017 Pavel Raiskup <praiskup@redhat.com> - 1.3.0-2
0b98f9
- use multilib-rpm-config for multilib hacks
0b98f9
0b98f9
* Mon Sep  4 2017 Remi Collet <remi@fedoraproject.org> - 1.3.0-1
0b98f9
- update to 1.3.0
0b98f9
- add dependency on bzip2 library
0b98f9
- ignore 3 tests failing on 32-bit
0b98f9
0b98f9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
0b98f9
0b98f9
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0b98f9
0b98f9
* Tue Feb 28 2017 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
0b98f9
- update to 1.2.0
0b98f9
- soname bump to 5
0b98f9
0b98f9
* Tue Feb 28 2017 Remi Collet <remi@fedoraproject.org> - 1.2.0-0
0b98f9
- update to 1.2.0
0b98f9
- soname bump to 5
0b98f9
- temporarily keep libzip.so.4
0b98f9
0b98f9
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0b98f9
0b98f9
* Sat May 28 2016 Remi Collet <remi@fedoraproject.org> - 1.1.3-1
0b98f9
- update to 1.1.3
0b98f9
0b98f9
* Sat Feb 20 2016 Remi Collet <remi@fedoraproject.org> - 1.1.2-1
0b98f9
- update to 1.1.2
0b98f9
- add BR on perl(Getopt::Long)
0b98f9
0b98f9
* Sat Feb 13 2016 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
0b98f9
- update to 1.1.1
0b98f9
0b98f9
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0b98f9
0b98f9
* Thu Jan 28 2016 Remi Collet <remi@fedoraproject.org> - 1.1-1
0b98f9
- update to 1.1
0b98f9
- new ziptool command
0b98f9
- add fix for undefined optopt in ziptool.c (upstream)
0b98f9
0b98f9
* Fri Dec  4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.1-3
0b98f9
- fix libzip-tools summary #1288424
0b98f9
0b98f9
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0b98f9
0b98f9
* Tue May  5 2015 Remi Collet <remi@fedoraproject.org> - 1.0.1-1
0b98f9
- update to 1.0.1
0b98f9
- soname bump from .2 to .4
0b98f9
- drop ziptorrent
0b98f9
- create "tools" sub package
0b98f9
0b98f9
* Mon Mar 23 2015 Rex Dieter <rdieter@fedoraproject.org> 0.11.2-5
0b98f9
- actually apply patch (using %%autosetup)
0b98f9
0b98f9
* Mon Mar 23 2015 Rex Dieter <rdieter@fedoraproject.org> 0.11.2-4
0b98f9
- CVE-2015-2331: integer overflow when processing ZIP archives (#1204676,#1204677)
0b98f9
0b98f9
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-3
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
0b98f9
0b98f9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.2-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0b98f9
0b98f9
* Thu Dec 19 2013 Remi Collet <remi@fedoraproject.org> - 0.11.2-1
0b98f9
- update to 0.11.2
0b98f9
- run test during build
0b98f9
0b98f9
* Thu Oct 24 2013 Remi Collet <remi@fedoraproject.org> - 0.11.1-3
0b98f9
- replace php patch with upstream one
0b98f9
0b98f9
* Fri Aug 23 2013 Remi Collet <remi@fedoraproject.org> - 0.11.1-2
0b98f9
- include API-CHANGES and LICENSE in package doc
0b98f9
0b98f9
* Wed Aug 21 2013 Remi Collet <remi@fedoraproject.org> - 0.11.1-1
0b98f9
- update to 0.11.1
0b98f9
0b98f9
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-7
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0b98f9
0b98f9
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-6
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0b98f9
0b98f9
* Mon Oct 15 2012 Remi Collet <remi@fedoraproject.org> - 0.10.1-5
0b98f9
- fix typo in multiarch (#866171)
0b98f9
0b98f9
* Wed Sep 05 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.1-4
0b98f9
- Warning about conflicting contexts for /usr/lib64/libzip/include/zipconf.h versus /usr/include/zipconf-64.h (#853954)
0b98f9
0b98f9
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-3
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0b98f9
0b98f9
* Tue Jul 10 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.1-2
0b98f9
- spec cleanup, better multilib fix
0b98f9
0b98f9
* Wed Mar 21 2012 Remi Collet <remi@fedoraproject.org> - 0.10.1-1
0b98f9
- update to 0.10.1 (security fix only)
0b98f9
- fixes for CVE-2012-1162 and CVE-2012-1163
0b98f9
0b98f9
* Sun Mar 04 2012 Remi Collet <remi@fedoraproject.org> - 0.10-2
0b98f9
- try to fix ARM issue (#799684)
0b98f9
0b98f9
* Sat Feb 04 2012 Remi Collet <remi@fedoraproject.org> - 0.10-1
0b98f9
- update to 0.10
0b98f9
- apply patch with changes from php bundled lib (thanks spot)
0b98f9
- handle multiarch headers (ex from MySQL)
0b98f9
0b98f9
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-4
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0b98f9
0b98f9
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-3
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0b98f9
0b98f9
* Thu Feb 04 2010 Kalev Lember <kalev@smartlink.ee> - 0.9.3-2
0b98f9
- Cleaned up pkgconfig deps which are now automatically handled by RPM.
0b98f9
0b98f9
* Thu Feb 04 2010 Kalev Lember <kalev@smartlink.ee> - 0.9.3-1
0b98f9
- Updated to libzip 0.9.3
0b98f9
0b98f9
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 0.9-4
0b98f9
- Use bzipped upstream tarball.
0b98f9
0b98f9
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0b98f9
0b98f9
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
0b98f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
0b98f9
0b98f9
* Fri Dec 12 2008 Rex Dieter <rdieter@fedoraproject.org> 0.9-1
0b98f9
- libzip-0.9
0b98f9
0b98f9
* Sat Feb 09 2008 Sebastian Vahl <fedora@deadbabylon.de> 0.8-5
0b98f9
- rebuild for new gcc-4.3
0b98f9
0b98f9
* Fri Jan 11 2008 Rex Dieter <rdieter[AT]fedoraproject.org> 0.8-4
0b98f9
- use better workaround for removing rpaths
0b98f9
0b98f9
* Tue Nov 20 2007 Sebastian Vahl <fedora@deadbabylon.de> 0.8-3
0b98f9
- require pkgconfig in devel subpkg
0b98f9
- move api description to devel subpkg
0b98f9
- keep timestamps in %%install
0b98f9
- avoid lib64 rpaths 
0b98f9
0b98f9
* Thu Nov 15 2007 Sebastian Vahl <fedora@deadbabylon.de> 0.8-2
0b98f9
- Change License to BSD
0b98f9
0b98f9
* Thu Nov 15 2007 Sebastian Vahl <fedora@deadbabylon.de> 0.8-1
0b98f9
- Initial version for Fedora