%global commitdate 20200722 %global commit 047a254eb18e0f7c93a43c8e922be11fae1aebdf %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: smssend Version: %{commitdate}.%{shortcommit} Release: 1%{?dist} Summary: A program to send SMS messages License: GPL-3 BuildArch: noarch URL: https://github.com/dkhabarov/smssend Source: https://github.com/dkhabarov/smssend/archive/%{commit}/toot-%{version}.tar.gz BuildRequires: python-rpm-macros %description A program to send SMS messages from the commandline via service http://sms.ru/ %prep %autosetup -n %{name}-%{commit} find . -name "*.py" -exec sed -i 's|#!%{_bindir}/env python.*|#!%{__python3}|' {} ";" find . -name "*.py" -exec sed -i 's|#!%{_bindir}/python.*|#!%{__python3}|' {} ";" mv smssend.py %{name} %install install -d %{buildroot}%{_bindir} install -m 0755 %{name} %{buildroot}%{_bindir} %files %doc readme.txt %{_bindir}/* %changelog * Thu Jan 28 2021 Yury Martynov 20200722.047a254-1 - Initial packaging.