[packages/youtube-dl] make rpm version build automatic
glen
glen at pld-linux.org
Wed Apr 22 14:44:26 CEST 2015
commit ffca9320c1721bd7b17f5cba59a14eca3deeaff0
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Apr 22 15:42:03 2015 +0300
make rpm version build automatic
youtube-dl.spec | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/youtube-dl.spec b/youtube-dl.spec
index 98a302c..fd2ca04 100644
--- a/youtube-dl.spec
+++ b/youtube-dl.spec
@@ -1,7 +1,12 @@
-# keep date only for rpm versioning, extra numbers go into release
-%define ver 20150228
# full version number as seen on youtube-dl website
%define verlong 2015.02.28
+
+# transform version so we don't have to bump epoch after four digit upgrades:
+# 2013.01.17.1 becomes 20130117_1
+# 2013.01.28 becomes 20130128
+# $ rpmvercmp 20130117_1 20130128
+# 20130117_1 < 20130128
+%define ver %(echo %{verlong} | awk -F. 'NF == 3 {printf("%d%d%d", $1, $2, $3)} NF == 4 {printf("%d%d%d_%d", $1, $2, $3, $4)}')
Summary: Video extraction utility for YouTube
Summary(pl.UTF-8): Narzędzie do wydobywania filmów z YouTube
Name: youtube-dl
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/youtube-dl.git/commitdiff/ffca9320c1721bd7b17f5cba59a14eca3deeaff0
More information about the pld-cvs-commit
mailing list