From b1ca522c6eee6fa72996da606b6a7d5642678262 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 28 Jun 2016 11:40:37 -0400 Subject: [PATCH] make-dist: generate ceph.spec Fixes: http://tracker.ceph.com/issues/16501 Signed-off-by: Sage Weil --- make-dist | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/make-dist b/make-dist index 89781034801ff..a70e2ce90ff82 100755 --- a/make-dist +++ b/make-dist @@ -31,10 +31,18 @@ bin/git-archive-all.sh --prefix ceph-$version/ \ --ignore corpus \ $outfile.tar -echo "including src/.git_version and src/ceph_ver.h..." +# populate files with version strings +echo "including src/.git_version, src/ceph_ver.h, ceph.spec" src/make_version -g src/.git_version -c src/ceph_ver.h + +rpm_version=`echo $version | cut -d - -f 1-1` +rpm_release=`echo $version | cut -d - -f 2- | sed 's/-/./'` +cat ceph.spec.in | \ + sed "s/@VERSION@/$rpm_version/g" | \ + sed "s/@RPM_RELEASE@/$rpm_release/g" > ceph.spec + ln -s . $outfile -tar cvf $outfile.version.tar $outfile/src/.git_version $outfile/src/ceph_ver.h +tar cvf $outfile.version.tar $outfile/src/.git_version $outfile/src/ceph_ver.h $outfile/ceph.spec tar --concatenate -f $outfile.both.tar $outfile.version.tar tar --concatenate -f $outfile.both.tar $outfile.tar mv $outfile.both.tar $outfile.tar -- 2.39.5