%global _user ssorj %global _commit 8c7fbb87a4727594d193ce25c08a45f5801b77aa %global _short_commit %(c=%{_commit}; echo ${c:0:8}) %global _timestamp %(date +"%Y%m%d") Name: qtools Version: 0 Release: 0.1.%{_timestamp}.%{_short_commit}%{?dist} Summary: Command-line tools for AMQP License: ASL 2.0 URL: https://github.com/%{_user}/%{name} Source: %{name}-SNAPSHOT.tar.gz BuildArch: noarch Requires: python Requires: python-qpid-proton BuildRequires: make BuildRequires: python %description Simple command-line tools for sending and receiving AMQP messages %prep %setup -qn %{name}-%{_commit} %build make build %install make install DESTDIR=%{buildroot} PREFIX=%{_prefix} %files %doc README.md LICENSE.txt /usr/share/qtools /usr/bin/* %changelog