]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
build: Add RPM release string generated from git describe.
authorGary Lowell <glowell@inktank.com>
Thu, 8 Nov 2012 20:43:24 +0000 (12:43 -0800)
committerSage Weil <sage@inktank.com>
Tue, 4 Dec 2012 05:47:41 +0000 (21:47 -0800)
Fix for bug 3451.  Use the commit count and sha1 from git describe to
construct a release string for rpm packages.

Conflicts:

configure.ac

ceph.spec.in
configure.ac

index 384f1f745585fe012bf79c7c9d0a48b2b8871b85..3a46c2232db1fef67efcf45826a827a179d763a9 100644 (file)
@@ -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
index 9f3bfbc7c37d627eda0e53919936551551e91be4..17ed29aa0b6604891f0221ecab3a8c839ad9e146 100644 (file)
@@ -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])