%define _buildshell /bin/bash %global commit fdfb82b53ca44d389cb2666cb557996203ed9093 %global date 20150526 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: stlink Summary: STM32 discovery line Linux programmer Version: 1.2.0 Release: 0.1.%{date}git%{shortcommit}%{?dist} License: BSD URL: https://github.com/texane/stlink Source: https://github.com/texane/stlink/archive/%{commit}/stlink-%{commit}.tar.gz BuildRequires: autoconf automake libusb-devel help2man %description STM32 discovery line Linux programmer. %prep %setup -q -n %{name}-%{commit} %build ./autogen.sh ./configure --prefix=%{_prefix} --libdir=%{_libdir} make %{?_smp_mflags} %install # Note that we don't currently install the udev rules that ship with stlink. # We could do this in the future if there is need/want, but programming the # board does not require them. make install DESTDIR=%{buildroot} mkdir -p %{buildroot}/%{_mandir}/man1 help2man -N --version-string="%{shortcommit}" \ "%{buildroot}/%{_bindir}/st-util" \ > "%{buildroot}/%{_mandir}/man1/st-util.1" %files %doc LICENSE README AUTHORS ACKNOWLEDGMENTS %{_bindir}/st-* %{_mandir}/man1/st-* %changelog * Tue May 26 2015 Ricky Elrod - 1.2.0-0.1.20150526gitfdfb82b - Initial build.