File jdslabs-xmos-dfu.spec of Package jdslabs-xmos-dfu

#
# spec file for package jdslabs-xmos-dfu
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           jdslabs-xmos-dfu
Version:        1.3.3
Release:        0
Summary:        CLI DFU utility for XMOS based JDS Labs USB Devices
License:        AS-IS License
URL:            https://github.com/jdslabs/xmos_dfu 
Source0:        https://github.com/jdslabs/xmos_dfu/archive/refs/tags/v%{version}.tar.gz#/xmos_dfu-%{version}.tar.gz
Patch1:         signed-compare.patch
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  pkgconfig(systemd)
%description
This script was originally distributed as a component of the XMOS USB Audio 2.0
Reference Software Version 6.15.2, and has been modified to facilitate firmware
updates via DFU mode for the following XMOS based JDS Labs, Inc. devices:

- Atom DAC(+)
- EL DAC II(+)
- Element II
- Element III

%package -n jdslabs-udev-rules
Summary:        udev rules for jdslabs devices web panel access
BuildArch:      noarch
%description -n jdslabs-udev-rules
This package holds the udev rules required to support the web control panel.


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

%build
g++ xmos_dfu/xmosdfu.cpp -o %{name} %{optflags} $(pkg-config --libs --cflags libusb-1.0)

%install
install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 -t %{buildroot}%{_udevrulesdir} packaging/linux/70-jdslabs.rules

%files
%license LICENSE.txt
%doc README.md
%{_bindir}/%{name}

%files -n jdslabs-udev-rules
%license LICENSE.txt
%{_udevrulesdir}/70-jdslabs.rules

%changelog
openSUSE Build Service is sponsored by