mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 05:35:29 +08:00
Update makesrcdist (internal use only)
This file is currently identical with the one in branch-1.3 which was used to release 1.3.5rc1. It includes generating the MD5 checksums in a format suitable to be added to the online checksum file.
This commit is contained in:
+44
-22
@@ -47,14 +47,16 @@ fi
|
|||||||
|
|
||||||
# These are the release and snapshot download URL's currently in use:
|
# These are the release and snapshot download URL's currently in use:
|
||||||
|
|
||||||
DOWNLOAD='http://fltk.org/pub/fltk'
|
DOWNLOAD='https://www.fltk.org/pub/fltk'
|
||||||
SNAPSHOT='http://fltk.org/pub/fltk/snapshots'
|
SNAPSHOT='https://www.fltk.org/pub/fltk/snapshots'
|
||||||
|
|
||||||
DATE="`date +'%Y%m%d'`"
|
DATE="`date +'%Y%m%d'`"
|
||||||
|
|
||||||
# VS = short version number ('major.minor'), for instance '1.4'.
|
# VS = short version number ('major.minor'), for instance '1.4'.
|
||||||
# Note: VS is used only for snapshot generation
|
# Note: VS is used only for snapshot generation
|
||||||
|
# fltk_version = full version number w/o 'rcN' (from file VERSION)
|
||||||
|
|
||||||
|
fltk_version="`cat VERSION`"
|
||||||
VS="`cat VERSION | sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`"
|
VS="`cat VERSION | sed -e's/\([0-9]*\.[0-9]*\).*/\1/'`"
|
||||||
|
|
||||||
echo "Getting distribution..."
|
echo "Getting distribution..."
|
||||||
@@ -62,12 +64,9 @@ echo "Getting distribution..."
|
|||||||
if test $# = 0 -o "x$1" = "xsnapshot"; then
|
if test $# = 0 -o "x$1" = "xsnapshot"; then
|
||||||
echo Getting snapshot revision...
|
echo Getting snapshot revision...
|
||||||
rev="`git rev-parse --short=8 HEAD`"
|
rev="`git rev-parse --short=8 HEAD`"
|
||||||
version="${VS}-git"
|
version="${VS}-${rev}"
|
||||||
fileversion="${VS}.x-${DATE}-$rev"
|
fileversion="${VS}.x-${DATE}-$rev"
|
||||||
fileurl="$SNAPSHOT/fltk-$fileversion.tar.gz"
|
fileurl="$SNAPSHOT/fltk-$fileversion.tar.gz"
|
||||||
echo "fileversion = $fileversion"
|
|
||||||
echo "fileurl = $fileurl"
|
|
||||||
url="."
|
|
||||||
else
|
else
|
||||||
if test ! -e "documentation/html/"; then
|
if test ! -e "documentation/html/"; then
|
||||||
echo "ERROR: Please generate the HTML documentation before distributing:"
|
echo "ERROR: Please generate the HTML documentation before distributing:"
|
||||||
@@ -88,15 +87,19 @@ else
|
|||||||
fileversion=$1
|
fileversion=$1
|
||||||
fileurl="$DOWNLOAD/$version/fltk-$fileversion-source.tar.gz"
|
fileurl="$DOWNLOAD/$version/fltk-$fileversion-source.tar.gz"
|
||||||
|
|
||||||
if test "x$2" != "xtag"; then
|
if test "x$2" = "xtag"; then
|
||||||
url="."
|
|
||||||
else
|
|
||||||
echo "Creating Git tag 'release-$version' ..."
|
echo "Creating Git tag 'release-$version' ..."
|
||||||
git tag -a -m "Tag $version" release-$version || exit 1
|
git tag -a -m "Release $version" release-$version || exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Exporting $version to /tmp/fltk-$version/...
|
# Debug:
|
||||||
|
# echo "fltk_version = $fltk_version"
|
||||||
|
# echo "version = $version"
|
||||||
|
# echo "fileversion = $fileversion"
|
||||||
|
# echo "fileurl = $fileurl"
|
||||||
|
|
||||||
|
echo Exporting $fltk_version to /tmp/fltk-$version/...
|
||||||
rm -rf /tmp/fltk-$version
|
rm -rf /tmp/fltk-$version
|
||||||
mkdir /tmp/fltk-$version
|
mkdir /tmp/fltk-$version
|
||||||
git archive --format=tar HEAD | $TAR -C /tmp/fltk-$version -x --
|
git archive --format=tar HEAD | $TAR -C /tmp/fltk-$version -x --
|
||||||
@@ -110,17 +113,16 @@ fi
|
|||||||
echo Applying version number...
|
echo Applying version number...
|
||||||
cd /tmp/fltk-$version
|
cd /tmp/fltk-$version
|
||||||
|
|
||||||
fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
|
|
||||||
sed -e '1,$s/@VERSION@/'$version'/' \
|
sed -e '1,$s/@VERSION@/'$version'/' \
|
||||||
-e '1,$s/@RELEASE@/'$rev'/' \
|
-e '1,$s/@RELEASE@/'$rev'/' \
|
||||||
-e '1,$s/^Source:.*/Source: '$fileurl'/' \
|
-e '1,$s#^Source:.*#Source: '$fileurl'#' \
|
||||||
<fltk.spec.in >fltk.spec
|
<fltk.spec.in >fltk.spec
|
||||||
|
|
||||||
echo Creating configure script...
|
echo Creating configure script...
|
||||||
autoconf -f
|
autoconf -f
|
||||||
|
|
||||||
echo Creating config.guess and config.sub \(ignore any other errors\)...
|
echo Creating config.guess and config.sub \(ignore any other errors\)...
|
||||||
automake --add-missing --copy
|
automake --add-missing --copy 2>/dev/null
|
||||||
|
|
||||||
echo Cleaning developer files...
|
echo Cleaning developer files...
|
||||||
rm -rf OpenGL autom4te* bc5 config forms glut images packages themes
|
rm -rf OpenGL autom4te* bc5 config forms glut images packages themes
|
||||||
@@ -139,26 +141,46 @@ echo "Removing documentation..."
|
|||||||
rm -rf fltk-$version/documentation/html/
|
rm -rf fltk-$version/documentation/html/
|
||||||
rm -f fltk-$version/documentation/fltk.pdf
|
rm -f fltk-$version/documentation/fltk.pdf
|
||||||
|
|
||||||
echo "Making UNIX distribution..."
|
echo "Making UNIX (.tar.gz) distribution..."
|
||||||
$TAR czf fltk-$fileversion-source.tar.gz fltk-$version
|
$TAR czf fltk-$fileversion-source.tar.gz fltk-$version
|
||||||
|
|
||||||
#echo "Making BZ2 distribution..."
|
echo "Making UNIX (.tar.bz2) distribution..."
|
||||||
#$TAR cjf fltk-$fileversion-source.tar.bz2 fltk-$version
|
$TAR cjf fltk-$fileversion-source.tar.bz2 fltk-$version
|
||||||
|
|
||||||
#echo "Making Windows distribution..."
|
# echo "Making Windows (.zip) distribution..."
|
||||||
#rm -f fltk-$fileversion-source.zip
|
# rm -f fltk-$fileversion-source.zip
|
||||||
#zip -r9 fltk-$fileversion-source.zip fltk-$version
|
# zip -r9 fltk-$fileversion-source.zip fltk-$version
|
||||||
|
|
||||||
echo "Removing distribution directory..."
|
echo "Removing distribution directory..."
|
||||||
|
|
||||||
rm -rf fltk-$version
|
rm -rf fltk-$version
|
||||||
|
|
||||||
|
# Create MD5 sums
|
||||||
|
|
||||||
|
out="`pwd`/fltk-$fileversion-md5sums.txt"
|
||||||
|
echo "Creating MD5 sums in $out"
|
||||||
|
rm -f $out
|
||||||
|
touch $out
|
||||||
|
|
||||||
|
# make sure the order is source - html - pdf
|
||||||
|
|
||||||
|
for f in source docs-html docs-pdf; do
|
||||||
|
if [ -f fltk-$fileversion-$f.tar.bz2 ] ; then
|
||||||
|
md5sum fltk-$fileversion-$f.tar.bz2 >> $out
|
||||||
|
fi
|
||||||
|
if [ -f fltk-$fileversion-$f.tar.gz ] ; then
|
||||||
|
md5sum fltk-$fileversion-$f.tar.gz >> $out
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -e"s# # $fltk_version fltk/$fltk_version/#" -i $out
|
||||||
|
|
||||||
if test "x$2" = "xtag"; then
|
if test "x$2" = "xtag"; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Don't forget to push the Git tag"
|
echo "Don't forget to push the Git tag"
|
||||||
echo "(assuming 'origin' as your remote Git repository):"
|
echo "(assuming your remote Git repository is 'origin'):"
|
||||||
echo ""
|
echo ""
|
||||||
echo "\$ git push origin release-$version"
|
echo "Use: \$ git push origin release-$version"
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user