From 54c98cb25004c9f6b9c12dc8fb26c92def71dc4d Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Tue, 2 Jul 2019 11:53:28 +0200 Subject: [PATCH] Implement CI/CD compatible versionning --- mpv.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mpv.spec b/mpv.spec index 77ea93b..9d3faaa 100644 --- a/mpv.spec +++ b/mpv.spec @@ -1,10 +1,15 @@ +%global commit c9e7473d67893d9248bedf63530a1e0325a3036a +%global gitdate 20190616 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global gitrelease .%{gitdate}.git%{shortcommit} + Name: mpv Version: 0.29.1 -Release: 6%{?dist} +Release: 6%{?gitrelease}%{?dist} Summary: Movie player playing most video formats and DVDs License: GPLv2+ and LGPLv2+ -URL: http://%{name}.io/ -Source0: https://github.com/%{name}-player/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +URL: http://mpv.io/ +Source0: https://github.com/mpv-player/mpv/archive/%{commit}/%{name}-%{shortcommit}.tar.gz # set defaults for Fedora Patch0: %{name}-config.patch @@ -101,7 +106,7 @@ Requires: mpv-libs%{?_isa} = %{version}-%{release} Libmpv development header files and libraries. %prep -%autosetup -p1 +%autosetup -p1 -n mpv-%{?commit}%{?!commit:%{version}} %build