]> git.pld-linux.org Git - packages/etcd.git/commitdiff
up to 2.0.11; add nogit patch auto/th/etcd-2.0.11-1
authorElan Ruusamäe <glen@delfi.ee>
Sat, 30 May 2015 06:42:14 +0000 (09:42 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 30 May 2015 06:43:54 +0000 (09:43 +0300)
etcd.spec
nogit.patch [new file with mode: 0644]

index c988de6b367140464d784b80f7509af6242f36d3..d7f1ea6cb7b7b76c0f81117ef200fd3acbcfe935 100644 (file)
--- a/etcd.spec
+++ b/etcd.spec
@@ -1,31 +1,40 @@
-# disable debug packages for go packages
-%define debug_package %{nil}
+# git rev-parse --short v2.0.11
+%define                githash 777151f
 Summary:       A highly-available key value store for shared configuration
 Name:          etcd
-Version:       0.3.0
+Version:       2.0.11
 Release:       1
 License:       Apache v2.0
 Group:         Daemons
 Source0:       https://github.com/coreos/etcd/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 123d5b2143ad4b21cb89af3e56fd0852
+# Source0-md5: e928ca4a227930ae17bcef5cdf5478da
+Patch0:                nogit.patch
 URL:           https://github.com/coreos/etcd/
-BuildRequires: golang
+BuildRequires: golang >= 1.2.1-3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# disable debug packages for go packages
+%define                debug_package %{nil}
+
+# this will fool adapter not to touch 'etcd'
+%define                _sysconfdir     __bogus__value
+
 %description
 A highly-available key value store for shared configuration.
 
 %prep
 %setup -q
-sed -i "s/^\(VER=\).*HEAD)/\1%{version}/" scripts/release-version
+%patch0 -p1
 
 %build
-./build
+GIT_SHA=%{githash} \
+sh -xe build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
-install -p %{name} $RPM_BUILD_ROOT%{_bindir}
+install -p bin/etcd $RPM_BUILD_ROOT%{_bindir}
+install -p bin/etcdctl $RPM_BUILD_ROOT%{_bindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -33,4 +42,5 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README.md Documentation/internal-protocol-versioning.md
-%attr(755,root,root) %{_bindir}/%{name}
+%attr(755,root,root) %{_bindir}/etcd
+%attr(755,root,root) %{_bindir}/etcdctl
diff --git a/nogit.patch b/nogit.patch
new file mode 100644 (file)
index 0000000..77c0b2c
--- /dev/null
@@ -0,0 +1,11 @@
+--- etcd-2.0.11/build~ 2015-05-15 23:54:32.000000000 +0300
++++ etcd-2.0.11/build  2015-05-30 09:37:00.739376624 +0300
+@@ -11,7 +11,7 @@
+ eval $(go env)
+-GIT_SHA=`git rev-parse --short HEAD`
++GIT_SHA=${GIT_SHA:-`git rev-parse --short HEAD`}
+ # Static compilation is useful when etcd is run in a container
+ CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/version.GitSHA ${GIT_SHA}" -o bin/etcd ${REPO_PATH}
This page took 0.096452 seconds and 4 git commands to generate.