File mingw64-libpcap.spec of Package mingw64-libpcap
#
# spec file for package mingw64-libpcap
#
# Copyright (c) 2024-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 realname libpcap
Name: mingw64-libpcap
Version: 1.10.5
Release: 0
Summary: A Library for Network Sniffers
License: BSD-3-Clause
Group: Development/Libraries/C and C++
#Git-Clone: https://github.com/the-tcpdump-group/libpcap.git
URL: https://www.tcpdump.org/
Source: https://www.tcpdump.org/release/%{realname}-%{version}.tar.gz
BuildRequires: flex
BuildRequires: bison
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-gcc-c++
%_mingw64_package_header_debug
BuildArch: noarch
%description
libpcap is a library used by packet sniffer programs. It provides an
interface for them to capture and analyze packets from network devices.
This package is only needed if you plan to compile or write such a
program yourself.
%package devel
Summary: A Library for Network Sniffers
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
libpcap is a library used by packet sniffer programs. It provides an
interface for them to capture and analyze packets from network devices.
This package is only needed if you plan to compile or write such a
program yourself.
%_mingw64_debug_package
%prep
%autosetup -n %{realname}-%{version}
%build
%{_mingw64_cmake} -DENABLE_REMOTE=OFF -DPCAP_TYPE=null
%{_mingw64_cmake_build}
%install
%{_mingw64_cmake_install}
rm %{buildroot}%{_mingw64_libdir}/libpcap.a
%files
%{_mingw64_bindir}/pcap.dll
%files devel
%license LICENSE
%doc CHANGES CREDITS README.md doc/README.linux TODO
%exclude %{_mingw64_bindir}/pcap-config
%{_mingw64_includedir}/pcap
%{_mingw64_includedir}/pcap.h
%{_mingw64_includedir}/pcap-*
%{_mingw64_libdir}/libpcap.dll.a
%{_mingw64_libdir}/pkgconfig/libpcap.pc
%{_mingw64_mandir}/man[1-8]/*
%changelog