[openconnect] Make it easier to build git snapshot packages (for testing)

David Woodhouse dwmw2 at fedoraproject.org
Mon Mar 2 16:14:08 UTC 2015


commit adf4428dce716736e47b26d8c4a9070f288a5089
Author: David Woodhouse <David.Woodhouse at intel.com>
Date:   Mon Mar 2 16:10:30 2015 +0000

    Make it easier to build git snapshot packages (for testing)

 openconnect.spec | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/openconnect.spec b/openconnect.spec
index 3a835aa..330c44e 100644
--- a/openconnect.spec
+++ b/openconnect.spec
@@ -1,3 +1,11 @@
+#% define gitcount 211
+#% define gitrev 584c84f
+
+%if 0%{?gitcount} > 0
+%define gitsuffix -%{gitcount}-g%{gitrev}
+%define relsuffix .git%{gitcount}_%{gitrev}
+%endif
+
 # RHEL6 still has ancient GnuTLS
 %define use_gnutls 0%{?fedora} || 0%{?rhel} >= 7
 
@@ -13,13 +21,13 @@
 
 Name:		openconnect
 Version:	7.04
-Release:	1%{?dist}
+Release:	1%{?relsuffix}%{?dist}
 Summary:	Open client for Cisco AnyConnect VPN
 
 Group:		Applications/Internet
 License:	LGPLv2+
 URL:		http://www.infradead.org/openconnect.html
-Source0:	ftp://ftp.infradead.org/pub/openconnect/openconnect-%{version}.tar.gz
+Source0:	ftp://ftp.infradead.org/pub/openconnect/openconnect-7.04%{?gitsuffix}.tar.gz
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	pkgconfig(openssl) pkgconfig(libxml-2.0)
@@ -60,7 +68,7 @@ the OpenConnect VPN client, to be used by GUI authentication dialogs
 for NetworkManager etc.
 
 %prep
-%setup -q
+%setup -q -n openconnect-7.04%{?gitsuffix}
 
 %build
 %configure	--with-vpnc-script=/etc/vpnc/vpnc-script \


More information about the scm-commits mailing list