commit 3c4fee363510361616713d269d694586c5bab175
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Oct 10 09:01:29 2013 +0300

    pass GITCOMMIT and VERSION, to have docker -v print something useful

 lxc-docker.spec | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/lxc-docker.spec b/lxc-docker.spec
index eb3d99e..2d3abde 100644
--- a/lxc-docker.spec
+++ b/lxc-docker.spec
@@ -5,7 +5,7 @@
 Summary:       Docker: the Linux container engine
 Name:          lxc-docker
 Version:       0.6.3
-Release:       1
+Release:       2
 License:       Apache v2.0
 Group:         Applications/System
 Source0:       
https://github.com/dotcloud/docker/archive/v%{version}/docker-%{version}.tar.gz
@@ -71,7 +71,12 @@ ln -s $(pwd) vendor/src/github.com/dotcloud/docker
 export GOPATH=$(pwd)/vendor
 install -d build
 cd build
-go build -v -a github.com/dotcloud/docker/docker
+VERSION=%{version}
+GITCOMMIT=%{release} # use RPM_PACKAGE_RELEASE for this
+# Use these flags when compiling the tests and final binary
+# without '-d', as that fails now
+LDFLAGS="-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -w"
+go build -v -ldflags "$LDFLAGS" -a github.com/dotcloud/docker/docker
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxc-docker.git/commitdiff/3c4fee363510361616713d269d694586c5bab175

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to