Skip to content

Commit

Permalink
Merge pull request ceph#9986 from liewegas/wip-make-dist
Browse files Browse the repository at this point in the history
make-dist: generate ceph.spec

Reviewed-by: Dan Mick <[email protected]>
  • Loading branch information
dmick authored Jun 28, 2016
2 parents af03b8d + b1ca522 commit d136f7b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions make-dist
Original file line number Diff line number Diff line change
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 d136f7b

Please sign in to comment.