Update makesrcdist to reflect packaging (CPack) and more
- remove conversion of fltk.spec.in to fltk.spec - improve code related to working directory (variables) - remove old (disabled) debug code - create a standard MD5SUM file for verification of packages - improve comments and output of instructions
This commit is contained in:
parent
0bc621bc00
commit
1a6322f8e1
71
makesrcdist
71
makesrcdist
@ -151,9 +151,9 @@ DOC_TEMPDIR="share/doc/fltk"
|
|||||||
### echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
### echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
||||||
|
|
||||||
echo Exporting $fltk_version to $TEMP_DIR/...
|
echo Exporting $fltk_version to $TEMP_DIR/...
|
||||||
rm -rf /tmp/fltk-$version
|
rm -rf $TEMP_DIR
|
||||||
mkdir /tmp/fltk-$version
|
mkdir $TEMP_DIR
|
||||||
git archive --format=tar HEAD | $TAR -C /tmp/fltk-$version -x --
|
git archive --format=tar HEAD | $TAR -C $TEMP_DIR -x --
|
||||||
|
|
||||||
if test $# != 0 -a "x$1" != "xsnapshot"; then
|
if test $# != 0 -a "x$1" != "xsnapshot"; then
|
||||||
|
|
||||||
@ -168,19 +168,9 @@ if test $# != 0 -a "x$1" != "xsnapshot"; then
|
|||||||
cp $DOC_DIR/fluid/documentation/fluid.pdf $TEMP_DIR/$DOC_TEMPDIR/
|
cp $DOC_DIR/fluid/documentation/fluid.pdf $TEMP_DIR/$DOC_TEMPDIR/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Applying version number...
|
# Change directory to working directory
|
||||||
cd /tmp/fltk-$version
|
|
||||||
|
|
||||||
sed -e '1,$s/@FLTK_VERSION@/'$version'/' \
|
cd $TEMP_DIR
|
||||||
-e '1,$s#^Source:.*#Source: '$fileurl'#' \
|
|
||||||
<fltk.spec.in >fltk.spec
|
|
||||||
|
|
||||||
# Debug:
|
|
||||||
### echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
|
|
||||||
### echo "$ egrep --color -1 'Source:|$version|$git_rev' fltk.spec"
|
|
||||||
### echo "··································································"
|
|
||||||
### egrep --color -1 "Source:|$version|$git_rev" fltk.spec
|
|
||||||
### echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
|
||||||
|
|
||||||
# Write git revision file with full git revision
|
# Write git revision file with full git revision
|
||||||
# which will be stored in the distribution tarball
|
# which will be stored in the distribution tarball
|
||||||
@ -222,19 +212,20 @@ echo "Removing distribution directory..."
|
|||||||
|
|
||||||
rm -rf fltk-$version
|
rm -rf fltk-$version
|
||||||
|
|
||||||
# Create releases.txt and sha256sums.txt
|
# Create releases.txt, md5sums.txt, and sha256sums.txt
|
||||||
|
|
||||||
OUT="`pwd`/fltk-$fileversion-releases.txt"
|
OUTF="`pwd`/fltk-$fileversion-releases.txt"
|
||||||
SHA="`pwd`/fltk-$fileversion-sha256sums.txt"
|
MD5F="`pwd`/fltk-$fileversion-md5sums.txt"
|
||||||
|
SHAF="`pwd`/fltk-$fileversion-sha256sums.txt"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Creating Release Info in $OUT and $SHA"
|
echo "Creating Release Info in $OUTF and $SHAF"
|
||||||
|
|
||||||
echo "" > $OUT
|
echo "" > $OUTF
|
||||||
echo "github $fltk_version $fileversion" >> $OUT
|
echo "github $fltk_version $fileversion" >> $OUTF
|
||||||
echo "" >> $OUT
|
echo "" >> $OUTF
|
||||||
rm -f $SHA
|
rm -f $SHAF
|
||||||
touch $SHA
|
touch $SHAF
|
||||||
|
|
||||||
# make sure the order is source, html, pdf, fluid-html, fluid-pdf and gz, bz2
|
# make sure the order is source, html, pdf, fluid-html, fluid-pdf and gz, bz2
|
||||||
|
|
||||||
@ -246,10 +237,13 @@ for f in source docs-html docs-pdf fluid-docs-html fluid-docs-pdf; do
|
|||||||
# (a) releases file:
|
# (a) releases file:
|
||||||
MD5=`md5sum $FILE | cut -f1 -d' '`
|
MD5=`md5sum $FILE | cut -f1 -d' '`
|
||||||
SIZ=`wc -c $FILE | cut -f1 -d' '`
|
SIZ=`wc -c $FILE | cut -f1 -d' '`
|
||||||
echo "$MD5 $FILE $SIZ" >> $OUT
|
echo "$MD5 $FILE $SIZ" >> $OUTF
|
||||||
|
|
||||||
# (b) sha256sum file
|
# (b) md5sum file
|
||||||
sha256sum $FILE >> $SHA
|
md5sum $FILE >> $MD5F
|
||||||
|
|
||||||
|
# (c) sha256sum file
|
||||||
|
sha256sum $FILE >> $SHAF
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@ -259,31 +253,36 @@ done
|
|||||||
FILE="fltk-$fileversion-sha256sums.txt"
|
FILE="fltk-$fileversion-sha256sums.txt"
|
||||||
MD5=`md5sum $FILE | cut -f1 -d' '`
|
MD5=`md5sum $FILE | cut -f1 -d' '`
|
||||||
SIZ=`wc -c $FILE | cut -f1 -d' '`
|
SIZ=`wc -c $FILE | cut -f1 -d' '`
|
||||||
echo "$MD5 $FILE $SIZ" >> $OUT
|
echo "$MD5 $FILE $SIZ" >> $OUTF
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
echo
|
echo
|
||||||
echo "================================================================================"
|
echo "================================================================================"
|
||||||
echo
|
echo
|
||||||
echo "$OUT:"
|
echo "$OUTF:"
|
||||||
echo
|
echo
|
||||||
echo "--- copy the contents of this file to the top of data/releases.dat:"
|
echo "--- snip --- copy the contents of this file to the top of data/releases.dat:"
|
||||||
cat $OUT
|
cat $OUTF
|
||||||
echo "--- end of file ---"
|
echo "--- snip --- end of file ---"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "$SHA:"
|
echo "MD5 sums: $MD5F:"
|
||||||
echo
|
echo
|
||||||
cat $SHA
|
cat $MD5F
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "SHA256 sums: $SHAF:"
|
||||||
|
echo
|
||||||
|
cat $SHAF
|
||||||
|
|
||||||
if test "x$3" = "xtag"; then
|
if test "x$3" = "xtag"; then
|
||||||
echo
|
echo
|
||||||
echo "================================================================================"
|
echo "================================================================================"
|
||||||
echo "Don't forget to push the Git tag if the result is OK"
|
echo "Don't forget to push the Git tag if the result is OK"
|
||||||
echo "(assuming your remote Git repository is 'origin'):"
|
echo "(assuming your remote Git repository is 'upstream'):"
|
||||||
echo
|
echo
|
||||||
echo "Use: \$ git push origin release-$version"
|
echo "Use: \$ git push upstream release-$version"
|
||||||
echo
|
echo
|
||||||
echo "If test results are not OK you can delete the tag before pushing:"
|
echo "If test results are not OK you can delete the tag before pushing:"
|
||||||
echo
|
echo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user