Skip to content

Commit

Permalink
make-dist: generate ceph.spec
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/16501
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jun 28, 2016
1 parent 396b58c commit b1ca522
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions make-dist
Expand Up @@ -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
Expand Down

0 comments on commit b1ca522

Please sign in to comment.