File micronucleus.spec of Package micronucleus
#
# spec file for package micronucleus
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2020 Frank Kunz
#
# 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: micronucleus
Version: 2.6
Release: 0
Summary: AVR ATtiny microcontroller USB bootloader
License: GPL-2.0-only
Group: Productivity/Scientific/Electronics
URL: https://github.com/micronucleus/micronucleus
Source0: https://github.com/micronucleus/micronucleus/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libusb)
%if 0%{?suse_version} > 1500
BuildRequires: libftdi1-devel
%else
BuildRequires: libftdi0-devel
%endif
%description
Micronucleus is a bootloader designed for AVR ATtiny microcontrollers with a minimal usb interface, cross
platform libusb-based program upload tool, and a strong emphasis on bootloader compactness.
The controller firmware can be found here: https://github.com/micronucleus/micronucleus/tree/master/firmware
%prep
%setup -q
# do not build static
sed -i 's|STATIC = -static||g' commandline/Makefile
%build
%make_build -C commandline
%install
install -D -t %{buildroot}%{_bindir} commandline/%{name}
install -D -m 0644 -t %{buildroot}%{_udevrulesdir} commandline/*.rules
%files
%doc commandline/Readme Readme.md
%license License.txt
%{_bindir}/%{name}
%{_udevrulesdir}/*.rules
%changelog