4 echo "no .git present. run this from the base dir of the git checkout."
9 [ -z "$version" ] && version=`git describe --match 'v*' | sed 's/^v//'`
10 outfile="ceph-$version"
12 echo "version $version"
15 echo "updating submodules..."
16 force=$(if git submodule usage 2>&1 | grep --quiet 'update.*--force'; then echo --force ; fi)
17 if ! git submodule sync || ! git submodule update $force --init --recursive; then
18 echo "Error: could not initialize submodule projects"
19 echo " Network connectivity might be required."
28 boost_version_underscore=$(echo $boost_version | sed 's/\./_/g')
29 boost_fname=boost_${boost_version_underscore}.tar.bz2
34 if [ -z $url_base ]; then
35 echo "Error: failed to download boost."
38 url=$url_base/$boost_fname
39 wget -c --no-verbose -O $boost_fname $url
40 if [ $? != 0 -o ! -e $boost_fname ]; then
41 echo "Download of $url failed"
42 elif [ $(md5sum $boost_fname | awk '{print $1}') != $boost_md5 ]; then
43 echo "Error: failed to download boost: MD5 mismatch."
49 tar xjf $boost_fname -C src \
50 --exclude="$boost_version_underscore/libs/*/doc" \
51 --exclude="$boost_version_underscore/libs/*/example" \
52 --exclude="$boost_version_underscore/libs/*/examples" \
53 --exclude="$boost_version_underscore/libs/*/meta" \
54 --exclude="$boost_version_underscore/libs/*/test" \
55 --exclude="$boost_version_underscore/tools/boostbook" \
56 --exclude="$boost_version_underscore/tools/quickbook" \
57 --exclude="$boost_version_underscore/tools/auto_index" \
58 --exclude='doc' --exclude='more' --exclude='status'
59 mv src/boost_${boost_version_underscore} src/boost
60 tar cf ${outfile}.boost.tar ${outfile}/src/boost
64 # clean out old cruft...
69 echo "building tarball..."
70 bin/git-archive-all.sh --prefix ceph-$version/ \
75 # populate files with version strings
76 echo "including src/.git_version, ceph.spec"
78 (git rev-parse HEAD ; git describe) 2> /dev/null > src/.git_version
80 # if the version has '-' in it, it has a 'release' part,
81 # like vX.Y.Z-N-g<shortsha1>. If it doesn't, it's just
82 # vX.Y.Z. Handle both, and translate - to . for rpm
83 # naming rules (the - separates version and release).
85 if expr index $version '-' > /dev/null; then
86 rpm_version=`echo $version | cut -d - -f 1-1`
87 rpm_release=`echo $version | cut -d - -f 2- | sed 's/-/./'`
93 for spec in ceph.spec.in alpine/APKBUILD.in; do
95 sed "s/@VERSION@/$rpm_version/g" |
96 sed "s/@RPM_RELEASE@/$rpm_release/g" |
97 sed "s/@TARBALL_BASENAME@/ceph-$version/g" > `echo $spec | sed 's/.in$//'`
100 tar cvf $outfile.version.tar $outfile/src/.git_version $outfile/ceph.spec $outfile/alpine/APKBUILD
101 # NOTE: If you change this version number make sure the package is available
102 # at the three URLs referenced below (may involve uploading to download.ceph.com)
104 download_boost $boost_version 1c837ecd990bb022d07e7aab32b09847 \
105 https://dl.bintray.com/boostorg/release/$boost_version/source \
106 https://downloads.sourceforge.net/project/boost/boost/$boost_version \
107 https://download.ceph.com/qa
108 tar --concatenate -f $outfile.all.tar $outfile.version.tar
109 tar --concatenate -f $outfile.all.tar $outfile.boost.tar
110 tar --concatenate -f $outfile.all.tar $outfile.tar
111 mv $outfile.all.tar $outfile.tar
113 rm -f $outfile.version.tar
114 rm -f $outfile.boost.tar
116 echo "compressing..."
117 bzip2 -9 $outfile.tar