File mingw64-libiio.spec of Package mingw64-libiio

#
# spec file for package mingw64-libiio
#
# Copyright (c) 2018-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 lname libiio0
%define realname libiio
Name:           mingw64-%{realname}
Version:        0.26
Release:        0
Summary:        Industrial I/O tools
License:        LGPL-2.1-or-later
Group:          System/Libraries
Url:            https://wiki.analog.com/resources/tools-software/linux-software/libiio
Source:         https://github.com/analogdevicesinc/libiio/archive/v%{version}.tar.gz#/libiio-%{version}.tar.gz
Patch0:         mingw64-lowercase-includes-patches.patch
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-libxml2-devel
BuildRequires:  mingw64-libusb-1_0-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Library for industrial I/O.

%package -n  mingw64-%{lname}
Summary:        Industrial I/O library
Group:          System/Libraries

%description -n mingw64-%{lname}
Library for industrial I/O.

%package -n mingw64-%{realname}-devel
Summary:        Industrial I/O library -- development files
Group:          Development/Libraries/C and C++
Requires:       mingw64-%{lname} = %{version}

%description -n mingw64-%{realname}-devel
Library for industrial I/O.

This sub-package contains the development files.

%_mingw64_debug_package

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

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}
# FIXME: Don't package python bindings for now
rm -rf %{buildroot}/%{_mingw64_libdir}/python*

%files -n mingw64-%{realname}
%license COPYING.txt
%doc README.md
%{_mingw64_bindir}/iio_attr.exe
%{_mingw64_bindir}/iio_genxml.exe
%{_mingw64_bindir}/iio_info.exe
%{_mingw64_bindir}/iio_readdev.exe
%{_mingw64_bindir}/iio_reg.exe
%{_mingw64_bindir}/iio_writedev.exe

%files -n mingw64-%{lname}
%{_mingw64_bindir}/libiio.dll

%files -n mingw64-%{realname}-devel
%{_mingw64_includedir}/iio.h
%{_mingw64_libdir}/libiio.dll.a
%{_mingw64_libdir}/pkgconfig/libiio.pc

%changelog
openSUSE Build Service is sponsored by