[mate-panel] better usage of git snapshots

Wolfgang Ulbrich raveit65 at fedoraproject.org
Sat Dec 21 13:15:57 UTC 2013


commit 3dfb02cc43eb395bb1720aba5d5ee88923e15dfe
Author: raveit65 <chat-to-me at raveit.de>
Date:   Sat Dec 21 14:15:40 2013 +0100

    better usage of git snapshots

 mate-panel.spec |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)
---
diff --git a/mate-panel.spec b/mate-panel.spec
index 407c881..99c7952 100644
--- a/mate-panel.spec
+++ b/mate-panel.spec
@@ -1,19 +1,32 @@
-%global _internal_version     beb21bb
-
-Name:           mate-panel
-Version:        1.7.1
-Release:        0.1.git%{_internal_version}1%{?dist}
+# Conditional for release and snapshot builds. Uncomment for release-builds.
+# %%global rel_build 1
+
+# This is needed, because src-url contains branched part of versioning-scheme.
+%global branch 1.7
+
+# Settings used for build from snapshots.
+%{!?rel_build:%global commit f4c7c8fe62818f8acf3b2514732148a3727a3d2a}
+%{!?rel_build:%global commit_date 20131212}
+%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
+%{!?rel_build:%global git_ver git%{commit_date}-%{shortcommit}}
+%{!?rel_build:%global git_rel .git%{commit_date}.%{shortcommit}}
+%{!?rel_build:%global git_tar %{name}-%{version}-%{git_ver}.tar.xz}
+
+Name:            mate-panel
+Version:        %{branch}.1
+Release:        0.2%{?git_rel}%{?dist}
 Summary:     MATE Desktop panel and applets
 #libs are LGPLv2+ applications GPLv2+
 License:        GPLv2+
 URL:              http://mate-desktop.org
 
-# To generate tarball
-# wget http://git.mate-desktop.org/%%{name}/snapshot/%%{name}-{_internal_version}.tar.xz -O %%{name}-%%{version}.git%%{_internal_version}.tar.xz
-Source0:        http://raveit65.fedorapeople.org/Mate/git-upstream/%{name}-%{version}.git%{_internal_version}.tar.xz
-Source1:        panel-default-layout.dist
+# for downloading the tarball use 'spectool -g -R mate-panel.spec'
+# Source for release-builds.
+%{?rel_build:Source0:     http://pub.mate-desktop.org/releases/%{branch}/%%{name}-%%{version}.tar.xz}
+# Source for snapshot-builds.
+%{!?rel_build:Source0:    http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
 
-#Source0:        http://pub.mate-desktop.org/releases/1.7/%{name}-%{version}.tar.gz
+Source1:        panel-default-layout.dist
 
 Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
 # needed as nothing else requires it
@@ -59,7 +72,7 @@ Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
 Development files for mate-panel
 
 %prep
-%setup -q -n %{name}-%{_internal_version}
+%setup -q%{!?rel_build:n %{name}-%{commit}}
 NOCONFIGURE=1 ./autogen.sh
 
 %build
@@ -146,6 +159,9 @@ update-desktop-database &> /dev/null || :
 
 
 %changelog
+* Sat Dec 21 2013 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.7.1-0.2.git20131212.f4c7c8f
+- make Maintainers life easier and use better git snapshot usage, Thanks to Björn Esser
+
 * Thu Dec 12 2013 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.7.1-0.1.gitbeb21bb
 - update to latest git snapshot
 - fix refer to cairo-gobject, noticed by M.Schwendt


More information about the scm-commits mailing list