Add git tag derived version to tarball and spec

Stop hardcoding the version in the spec file, and put the version into
dist tarballs.
This commit is contained in:
Martin Pitt 2018-06-22 13:24:19 +02:00
parent 7260f5c01f
commit 19e12a595e
3 changed files with 11 additions and 5 deletions

View file

@ -0,0 +1,26 @@
Name: cockpit-starter-kit
Version: @VERSION@
Release: 0
Summary: Cockpit Starter Kit Example Module
License: LGPLv2.1+
Source: cockpit-starter-kit-%{version}.tar.gz
BuildArch: noarch
%define debug_package %{nil}
%description
Cockpit Starter Kit Example Module
%prep
%setup -n cockpit-starter-kit
%build
make
%install
make install DESTDIR=%{buildroot}
find %{buildroot} -type f >> files.list
sed -i "s|%{buildroot}||" *.list
%files -f files.list