%global service set_version Name: obs-service-%{service} Version: 0.5.10 Release: 1%{?dist} Summary: An OBS source service: Update spec file version License: GPLv2+ Group: Development/Tools URL: https://github.com/openSUSE/obs-service-%{service} Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: sed BuildRequires: python3-devel BuildRequires: python3dist(ddt) BuildRequires: python3dist(packaging) Recommends: python3dist(packaging) Requires: python3 BuildArch: noarch %description This is a source service for openSUSE Build Service. Very simply script to update the version in .spec or .dsc files according to a given version or to the existing files. %prep %autosetup %build sed -i -e "1 s,#!/usr/bin/python$,#!%{__python3}," set_version %install mkdir -p %{buildroot}%{_prefix}/lib/obs/service install -m 0755 set_version %{buildroot}%{_prefix}/lib/obs/service install -m 0644 set_version.service %{buildroot}%{_prefix}/lib/obs/service %check %{__python3} -m unittest discover tests/ %files %dir %{_prefix}/lib/obs %{_prefix}/lib/obs/service %changelog * Tue Oct 02 2018 Neal Gompa - 0.5.10-1 - Update to 0.5.10 - Run unit tests - Set sed properly as a build dependency * Sat Mar 24 2018 Neal Gompa - 0.5.8-1 - Initial packaging