From: Sage Weil Date: Tue, 28 Jun 2016 15:40:37 +0000 (-0400) Subject: make-dist: generate ceph.spec X-Git-Tag: ses5-milestone5~587^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9986%2Fhead;p=ceph.git make-dist: generate ceph.spec Fixes: http://tracker.ceph.com/issues/16501 Signed-off-by: Sage Weil --- diff --git a/make-dist b/make-dist index 89781034801f..a70e2ce90ff8 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