%global commitdate 20190109 %global commit 5dc8e00a83bf8884220e459d5b725f17aea1c6f3 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global debug_package %{nil} Name: ch341prog Version: 1.0b_%{commitdate}.%{shortcommit} Release: 1%{?dist} Summary: A simple command line tool(programmer) interfacing with ch341a License: GPL-3 URL: https://github.com/setarcos/ch341prog Source: https://github.com/setarcos/ch341prog/archive/%{commit}/ch341prog-%{version}.tar.gz BuildRequires: make BuildRequires: gcc BuildRequires: libusb-devel %description There are a lot cheap SPI/IIC programmers based on ch341a %prep %setup -n %{name}-%{commit} %build %make_build %install install -d %{buildroot}/%{_bindir} install -d %{buildroot}/%{_sysconfdir}/udev/rules.d/ install -m 0755 ch341prog %{buildroot}/%{_bindir} install -m 0644 99-ch341a-prog.rules %{buildroot}/%{_sysconfdir}/udev/rules.d/ %post udevadm control --reload-rules &>/dev/null || : %files %doc README.md %{_bindir}/ch341prog %{_sysconfdir}/udev/rules.d/99-ch341a-prog.rules %changelog * Fri Nov 20 2020 Yury Martynov 1.0b_20190109.5dc8e00-1 - Initial packaging.