2023-09-02 13:51:19 +00:00
|
|
|
#
|
|
|
|
# spec file for package minizip-ng
|
|
|
|
#
|
2024-01-18 11:15:43 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2023-09-02 13:51:19 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2024-10-23 13:54:22 +00:00
|
|
|
|
2024-01-18 11:15:43 +00:00
|
|
|
%define build_flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%define pkg_name minizip-ng
|
|
|
|
|
2024-01-19 12:48:48 +00:00
|
|
|
# TODO
|
2024-10-23 13:54:22 +00:00
|
|
|
%if "%{build_flavor}" == "compat"
|
2024-01-18 11:15:43 +00:00
|
|
|
Name: minizip
|
2024-01-18 12:15:00 +00:00
|
|
|
%global soname libminizip1
|
2024-01-18 11:15:43 +00:00
|
|
|
%global compat_mode ON
|
|
|
|
%else
|
2023-09-02 13:51:19 +00:00
|
|
|
Name: minizip-ng
|
2024-01-18 12:15:00 +00:00
|
|
|
%global soname libminizip-ng4
|
2024-01-18 11:15:43 +00:00
|
|
|
%global compat_mode OFF
|
|
|
|
%endif
|
|
|
|
|
2024-10-23 13:54:22 +00:00
|
|
|
Version: 4.0.5
|
2023-09-02 13:51:19 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Companion library to zlib-ng for reading and writing ZIP files
|
|
|
|
License: Zlib
|
|
|
|
URL: https://github.com/zlib-ng/minizip-ng
|
2023-09-12 16:19:55 +00:00
|
|
|
Source: https://github.com/zlib-ng/minizip-ng/archive/refs/tags/%version.tar.gz
|
2023-09-02 13:51:19 +00:00
|
|
|
BuildRequires: cmake >= 3.11.0
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gtest
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(bzip2)
|
|
|
|
BuildRequires: pkgconfig(liblzma)
|
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2024-01-18 11:15:43 +00:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(zlib-ng)
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%description
|
2023-09-12 16:19:55 +00:00
|
|
|
%{name} is a ZIP file manipulation library.
|
|
|
|
|
|
|
|
It has support for:
|
|
|
|
* Basic read-write operation on zip archives (adding files and removing
|
|
|
|
files) on a high-level and also raw zip entry data
|
|
|
|
* ZIP64 extension for large files
|
|
|
|
* Zlib, BZIP2, LZMA, XZ, and ZSTD compression methods
|
|
|
|
* PKWARE- and Winzip-AES styles password protection
|
|
|
|
* NTFS timestamp support for UTC last modified, last accessed, and creation dates
|
|
|
|
* zip archive splitting
|
|
|
|
* Follow/store symbolic links
|
|
|
|
* UTF-8, cp437, cp932, cp936 and cp950 filename character set support
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2024-01-18 11:15:43 +00:00
|
|
|
Requires: %{soname} = %{version}
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the C header and CMake config files.
|
|
|
|
|
2024-01-18 11:15:43 +00:00
|
|
|
%package -n %{soname}
|
2023-09-12 16:19:55 +00:00
|
|
|
Summary: Companion library to zlib-ng for reading and writing ZIP files
|
2023-09-02 13:51:19 +00:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2024-01-18 11:15:43 +00:00
|
|
|
%description -n %{soname}
|
2023-09-12 16:19:55 +00:00
|
|
|
%{name} is a ZIP file manipulation library.
|
|
|
|
|
|
|
|
It has support for:
|
|
|
|
* Basic read-write operation on zip archives (adding files and removing
|
|
|
|
files) on a high-level and also raw zip entry data
|
|
|
|
* ZIP64 extension for large files
|
|
|
|
* Zlib, BZIP2, LZMA, XZ, and ZSTD compression methods
|
|
|
|
* PKWARE- and Winzip-AES styles password protection
|
|
|
|
* NTFS timestamp support for UTC last modified, last accessed, and creation dates
|
|
|
|
* zip archive splitting
|
|
|
|
* Follow/store symbolic links
|
|
|
|
* UTF-8, cp437, cp932, cp936 and cp950 filename character set support
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%prep
|
2024-01-18 11:15:43 +00:00
|
|
|
%autosetup -p1 -n %{pkg_name}-%{version}
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake \
|
2024-01-18 11:15:43 +00:00
|
|
|
-DMZ_COMPAT:BOOL=%{compat_mode} \
|
2023-09-02 13:51:19 +00:00
|
|
|
-DSKIP_INSTALL_BINARIES:BOOL=ON \
|
2024-01-18 11:15:43 +00:00
|
|
|
-DMZ_SIGNING:BOOL=ON \
|
2023-09-02 13:51:19 +00:00
|
|
|
-DMZ_FORCE_FETCH_LIBS:BOOL=OFF \
|
|
|
|
-DMZ_BUILD_TESTS:BOOL=ON \
|
|
|
|
-DMZ_BUILD_UNIT_TESTS:BOOL=ON
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
%check
|
|
|
|
cd build && ctest --output-on-failure %{version}
|
|
|
|
|
2024-01-18 11:15:43 +00:00
|
|
|
%files devel
|
2023-09-02 13:51:19 +00:00
|
|
|
%license LICENSE
|
2024-01-18 11:15:43 +00:00
|
|
|
%{_includedir}/minizip*/
|
|
|
|
%{_libdir}/cmake/minizip*/
|
|
|
|
%{_libdir}/libminizip*.so
|
|
|
|
%{_libdir}/pkgconfig/minizip*.pc
|
|
|
|
%doc *.md
|
|
|
|
%doc doc/
|
2023-09-02 13:51:19 +00:00
|
|
|
|
2024-01-18 11:15:43 +00:00
|
|
|
%ldconfig_scriptlets -n %{soname}
|
|
|
|
|
|
|
|
%files -n %{soname}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libminizip*.so.*
|
2023-09-02 13:51:19 +00:00
|
|
|
|
|
|
|
%changelog
|