summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lowell <glowell@inktank.com>2012-11-08 12:43:24 -0800
committerSage Weil <sage@inktank.com>2012-12-03 21:47:41 -0800
commitb781ac00e16fd802b6e055dd9d453271db6efa39 (patch)
treeed0f9ffc70a0d4e6338ecd9e8256e8821116dc62
parentf60c9b6600a85b840a02e145bac77326d60fd03f (diff)
downloadceph-b781ac00e16fd802b6e055dd9d453271db6efa39.tar.gz
build: Add RPM release string generated from git describe.
Fix for bug 3451. Use the commit count and sha1 from git describe to construct a release string for rpm packages. Conflicts: configure.ac
-rw-r--r--ceph.spec.in2
-rw-r--r--configure.ac6
2 files changed, 7 insertions, 1 deletions
diff --git a/ceph.spec.in b/ceph.spec.in
index 384f1f74558..3a46c2232db 100644
--- a/ceph.spec.in
+++ b/ceph.spec.in
@@ -15,7 +15,7 @@
#################################################################################
Name: ceph
Version: @VERSION@
-Release: 6%{?dist}
+Release: @RPM_RELEASE@%{?dist}
Summary: User space components of the Ceph file system
License: GPL-2.0
Group: System Environment/Base
diff --git a/configure.ac b/configure.ac
index 9f3bfbc7c37..17ed29aa0b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,12 @@ AC_PREREQ(2.59)
# from 'git describe'; see src/ceph_ver.[ch]
AC_INIT([ceph], [0.48.2argonaut], [ceph-devel@vger.kernel.org])
+# Create release string. Used with VERSION for RPMs.
+AC_SUBST(RPM_RELEASE)
+RPM_RELEASE=`if expr index $(git describe --always) '-' > /dev/null ; then git describe --always | cut -d- -f2- | tr '-' '.' ; fi`
+
+AC_CONFIG_MACRO_DIR([m4])
+
AC_CONFIG_SUBDIRS([src/gtest])
AC_CONFIG_SUBDIRS([src/leveldb])