%global date 20230411 %global commit 3b22df2bc7de02d867334af3a7aa8606db4f8cdd %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: qdl Version: 1.0^%{date}git%{shortcommit} Release: %autorelease Summary: Qualcomm Download License: BSD-3-Clause URL: https://github.com/andersson/qdl Source: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildRequires: gcc BuildRequires: make BuildRequires: sed BuildRequires: libxml2-devel BuildRequires: systemd-devel %description This tool communicates with USB devices of id 05c6:9008 to upload a flash loader and use this to flash images. %prep %autosetup -p1 -n %{name}-%{commit} # Don't clobber build flags sed -i Makefile \ -e 's/CFLAGS :=/CFLAGS +=/' \ -e 's/LDFLAGS :=/LDFLAGS +=/' \ %build %make_build prefix="%{_prefix}" %install %make_install prefix="%{_prefix}" %files %license LICENSE %doc README %{_bindir}/ks %{_bindir}/qdl %changelog %autochangelog