File mingw64-libusb-compat.spec of Package mingw64-libusb-compat

#
# spec file for package mingw64-libusb-compat
#
# Copyright (c) 2023 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 libusb-compat
Name:           mingw64-%{realname}
Version:        0.1.8
Release:        0
Summary:        USB Library compatibility layer
License:        LGPL-2.1-or-later
Group:          System/Libraries
Url:            http://www.libusb.org/
Source:         https://github.com/libusb/libusb-compat-0.1/releases/download/v%{version}/libusb-compat-%{version}.tar.bz2
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-libusb-1_0-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
A compatibility layer allowing applications written for libusb-0.1 to work
with libusb-1.0. libusb-compat-0.1 attempts to look, feel, smell and walk
like libusb-0.1.

%package devel
Summary:        Development files for the libusb-compat library
Group:          Development/Libraries

%description devel
A compatibility layer allowing applications written for libusb-0.1 to work
with libusb-1.0. libusb-compat-0.1 attempts to look, feel, smell and walk
like libusb-0.1.

%_mingw64_debug_package

%prep
%setup -q -n libusb-compat-%{version}

%build
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
%{_mingw64_configure} --enable-shared --disable-static
make %{?_smp_mflags} || make

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%files
%defattr(-,root,root)
%{_mingw64_bindir}/libusb-0-1-4.dll

%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/
%{_mingw64_libdir}/libusb.dll.a
%{_mingw64_libdir}/pkgconfig/libusb.pc
%{_mingw64_bindir}/libusb-config
%changelog

openSUSE Build Service is sponsored by