]> git.pld-linux.org Git - packages/docker.git/commitdiff
pass GITCOMMIT and VERSION, to have docker -v print something useful auto/th/lxc-docker-0.6.3-2
authorElan Ruusamäe <glen@delfi.ee>
Thu, 10 Oct 2013 06:01:29 +0000 (09:01 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 10 Oct 2013 06:01:29 +0000 (09:01 +0300)
lxc-docker.spec

index eb3d99e32e89aa737c1693054d8a76cda66e5aed..2d3abded9e6a0b1e51cfb7d9acb958b99f34cb4b 100644 (file)
@@ -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
This page took 0.030274 seconds and 4 git commands to generate.