File mingw64-minizip-ng.spec of Package mingw64-minizip-ng

#
# spec file for package mingw64-minizip-ng
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#


%define sover 1
%define realname minizip-ng
%define libname mingw64-libminizip-%{sover}
Name:           mingw64-%{realname}
Version:        4.0.10
Release:        0
Summary:        Companion library to zlib-ng for reading and writing ZIP files
License:        Zlib
URL:            https://github.com/zlib-ng/minizip-ng
Source:         https://github.com/zlib-ng/minizip-ng/archive/refs/tags/%version.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkgconf
BuildRequires:  mingw64-zlib-devel
BuildRequires:  mingw64-libbz2-devel
BuildRequires:  mingw64-lzma-devel
BuildRequires:  mingw64-zstd-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
minizip-ng 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


%package -n %{libname}
Summary:        Companion library to zlib-ng for reading and writing ZIP files
Group:          System/Libraries

%description -n %{libname}
minizip-ng 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

%package devel
Summary:        Development files for %{libname}
Group:          Development/Languages/C and C++
Requires:       %{libname} = %{version}
Provides:       mingw64-minizip-devel

%description devel
This package contains the C header and CMake config files.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{realname}-%{version}

%build
%{_mingw64_cmake} -DMZ_FORCE_FETCH_LIBS=OFF
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}

%files -n %{libname}
%license %license LICENSE
%{_mingw64_bindir}/libminizip.dll

%files devel
%{_mingw64_includedir}/minizip
%{_mingw64_libdir}/libminizip.dll.a
%{_mingw64_libdir}/pkgconfig/minizip.pc
%{_mingw64_libdir}/cmake/minizip

%changelog
openSUSE Build Service is sponsored by