File mingw64-dlfcn-win32.spec of Package mingw64-dlfcn-win32

#
# spec file for package mingw64-dlfcn-win32
#
# Copyright (c) 2015-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 dlfcn-win32
Name:           mingw64-%{realname}
Version:        1.4.2
Release:        0
Summary:        Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror dladdr)
License:        MIT
Group:          System/Libraries
URL:            https://github.com/dlfcn-win32/dlfcn-win32
Source:         https://github.com/%{realname}/%{realname}/archive/v%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc
BuildArch:      noarch
%_mingw64_package_header_debug
%_mingw64_debug_package

%description
This library implements a wrapper for dlfcn, as specified in POSIX and SUS,
around the dynamic link library functions found in the Windows API.

%package devel
Summary:        Implements a wrapper for dlfcn (dlopen dlclose dlsym dlerror)
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}-%{release}

%description devel
This library implements a wrapper for dlfcn, as specified in POSIX and SUS,
around the dynamic link library functions found in the Windows API.
This subpackage contains libraries and header files for developing
applications that want to make use of dlfn32.

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

%build
%_mingw64_cmake
%_mingw64_cmake_build

%install
%_mingw64_cmake_install

%files
%{_mingw64_bindir}/libdl.dll

%files devel
%{_mingw64_libdir}/libdl.dll.a
%{_mingw64_includedir}/dlfcn.h
%dir %{_mingw64_datadir}/dlfcn-win32
%{_mingw64_datadir}/dlfcn-win32/dlfcn-win32-*.cmake

%changelog
openSUSE Build Service is sponsored by