File mingw64-libarchive.spec of Package mingw64-libarchive

#
# spec file for package mingw64-libarchive
#
# 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/
#

%global __requires_exclude xmllite\.dll

%define realname libarchive
Name:           mingw64-%{realname}
Version:        3.8.1
Release:        0
Summary:        Utility and C library to create and read several streaming archive formats
License:        BSD-2-Clause
Group:          Productivity/Archiving/Compression
URL:            https://www.libarchive.org/
Source0:        https://github.com/libarchive/libarchive/releases/download/v%{version}/%{realname}-%{version}.tar.xz
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-libb2-devel
BuildRequires:  mingw64-libbz2-devel
BuildRequires:  mingw64-libopenssl-devel
BuildRequires:  mingw64-lz4-devel
BuildRequires:  mingw64-lzma-devel
BuildRequires:  mingw64-pcre2-devel
BuildRequires:  mingw64-zlib-devel
BuildRequires:  mingw64-zstd-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and
read ISO-9660 CDROM images. The bsdtar program is an implementation of
tar(1) that is built on top of libarchive. It started as a test
harness, but has grown and is now the standard system tar for FreeBSD 5
and 6.

%package -n mingw64-%{realname}-devel
Summary:        Development package for %{name}
Group:          Development/Languages/C and C++
Requires:       mingw64-%{realname} = %{version}

%description -n mingw64-%{realname}-devel
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and
read ISO-9660 CDROM images. The bsdtar program is an implementation of
tar(1) that is built on top of libarchive. It started as a test
harness, but has grown and is now the standard system tar for FreeBSD 5
and 6.

This package includes the header files for %{name}.

%package -n mingw64-bsdtar
Summary:        Utility to read several different streaming archive formats
Group:          Productivity/Archiving/Compression
Requires:       mingw64-%{realname} >= %{version}

%description -n mingw64-bsdtar
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
variants and several cpio formats. It can also write shar archives and
read ISO-9660 CDROM images. The bsdtar program is an implementation of
tar(1) that is built on top of libarchive. It started as a test
harness, but has grown and is now the standard system tar for FreeBSD 5
and 6.

This package contains the bsdtar cmdline utility.

%_mingw64_debug_package

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

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}
rm -Rf %{buildroot}%{_mingw64_mandir}/pdf

%files
%license COPYING
%doc README.md
%{_mingw64_bindir}/libarchive.dll

%files -n mingw64-%{realname}-devel
%{_mingw64_includedir}/archive.h
%{_mingw64_includedir}/archive_entry.h
%{_mingw64_mandir}/man3/*
%{_mingw64_libdir}/libarchive.dll.a
%{_mingw64_libdir}/libarchive_static.a
%{_mingw64_libdir}/pkgconfig/libarchive.pc

%files -n mingw64-bsdtar
%license COPYING
%{_mingw64_bindir}/bsdcat.exe
%{_mingw64_bindir}/bsdcpio.exe
%{_mingw64_bindir}/bsdtar.exe
%{_mingw64_mandir}/man1/*
%{_mingw64_mandir}/man5/*

%changelog
openSUSE Build Service is sponsored by