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