diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh')
-rwxr-xr-x | src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh b/src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh new file mode 100755 index 000000000..c92fd76b5 --- /dev/null +++ b/src/jaegertracing/thrift/lib/perl/build-cpan-dist.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# This script is intended to be used after tagging the repository and updating +# the version files for a release. It will create a CPAN archive. Run this +# from inside a docker image like ubuntu-xenial. +# + +set -e + +rm -f MANIFEST +rm -rf Thrift-* + +# setup cpan without a prompt +echo | cpan +cpan install HTTP::Date Log::Log4perl +cpan install CPAN +cpan install CPAN::Meta ExtUtils::MakeMaker JSON::PP +# cpan install Module::Signature + +perl Makefile.PL +rm MYMETA.yml +make manifest +make dist + +# +# We unpack the archive so we can add version metadata for CPAN +# so that it properly indexes Thrift and remove unnecessary files. +# + +echo '-----------------------------------------------------------' +set -x + +DISTFILE=$(ls Thrift*.gz) +NEWFILE=${DISTFILE/t-v/t-} +if [[ "$DISTFILE" != "$NEWFILE" ]]; then + mv $DISTFILE $NEWFILE + DISTFILE="$NEWFILE" +fi +tar xzf $DISTFILE +rm $DISTFILE +DISTDIR=$(ls -d Thrift*) +# cpan doesn't like "Thrift-v0.nn.0 as a directory name +# needs to be Thrift-0.nn.0 +NEWDIR=${DISTDIR/t-v/t-} +if [[ "$DISTDIR" != "$NEWDIR" ]]; then + mv $DISTDIR $NEWDIR + DISTDIR="$NEWDIR" +fi +cd $DISTDIR +cp -p ../Makefile.PL . +cp -pr ../gen-perl . +cp -pr ../gen-perl2 . +perl ../tools/FixupDist.pl +cd .. +tar cvzf --hard-dereference $DISTFILE $DISTDIR +rm -r $DISTDIR |