%global commit 0d799f07b46cb4d24959488fafeffcf862d1707a %global short_commit %(c=%{commit}; echo ${c:0:7}) %global commit_date 20171015 Name: generate_updateinfo Version: 0 Release: 0.5.%{commit_date}git%{short_commit}%{?dist} Summary: Tool to generate updateinfo.xml from the CEFS project Group: Applications/System License: GPLv3+ URL: https://github.com/melmorabity/generate_updateinfo/ Source0: https://github.com/melmorabity/%{name}/archive/%{short_commit}/%{name}-%{short_commit}.tar.gz Requires: yum BuildArch: noarch %description This utility eats an errata.latest.xml from the CEFS project (http://cefs.steve-meier.de) and converts it in to a usable updateinfo.xml that you can inject in to your CentOS repositories. %prep %autosetup -n %{name}-%{commit} # Fix interpreter sed "1s|#!%{_bindir}/env python2|#!%{_bindir}/python2|" %{name}.py >%{name}.py.new && \ touch -r %{name}.py %{name}.py.new && \ mv %{name}.py.new %{name}.py %build %install install -Dpm 0755 %{name}.py $RPM_BUILD_ROOT%{_bindir}/%{name} %files %doc README.md %license LICENSE.txt %{_bindir}/%{name} %changelog * Sun Oct 15 2017 Mohamed El Morabity - 0-0.5.20171015git0d799f0 - Update to latest snapshot * Sat Oct 14 2017 Mohamed El Morabity - 0-0.4.20171014git42007ee - Update to latest snapshot * Tue May 30 2017 Mohamed El Morabity - 0-0.3.20170530gitadbf97b - Update to latest snapshot * Mon Jan 09 2017 Mohamed El Morabity - 0-0.2.20170109git799ea3e - Update to latest snapshot * Fri Oct 07 2016 Mohamed El Morabity - 0-0.1.20161007git9cb8a1d - Initial RPM release