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