2001-08-19 03:42:36 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2004-05-12 14:13:38 +04:00
|
|
|
# makesrcdist - make a distribution of FLTK.
|
2001-08-19 03:42:36 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
echo "Getting distribution..."
|
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
if test $# = 0 -o "x$1" = xsnapshot; then
|
|
|
|
echo Updating for snapshot...
|
|
|
|
svn up
|
|
|
|
rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
|
2008-04-24 00:08:39 +04:00
|
|
|
version="1.3svn"
|
|
|
|
fileversion="1.3svn-r$rev"
|
2006-01-15 21:02:44 +03:00
|
|
|
fileurl="ftp://ftp.easysw.com/pub/fltk/snapshots/fltk-$fileversion-source.tar.bz2"
|
|
|
|
url="."
|
2001-08-19 03:42:36 +04:00
|
|
|
else
|
2006-01-15 21:02:44 +03:00
|
|
|
echo Creating tag for release...
|
|
|
|
rev="1"
|
2001-08-19 04:09:06 +04:00
|
|
|
version=$1
|
2006-01-15 21:02:44 +03:00
|
|
|
fileversion=$1
|
|
|
|
fileurl="ftp://ftp.easysw.com/pub/fltk/$version/fltk-$fileversion-source.tar.bz2"
|
|
|
|
url="https://svn.easysw.com/public/fltk/fltk/tags/release-$version"
|
2001-08-19 03:42:36 +04:00
|
|
|
|
2008-04-24 00:08:39 +04:00
|
|
|
svn copy https://svn.easysw.com/public/fltk/fltk/branches/branch-1.3 "$url" \
|
2006-01-15 21:02:44 +03:00
|
|
|
-m "Tag $version" || exit 1
|
2001-08-19 04:09:06 +04:00
|
|
|
fi
|
2001-08-19 03:42:36 +04:00
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
echo Exporting $version...
|
|
|
|
rm -rf /tmp/fltk-$version
|
|
|
|
svn export $url /tmp/fltk-$version
|
2001-08-19 03:42:36 +04:00
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
echo Applying version number...
|
|
|
|
cd /tmp/fltk-$version
|
2001-08-19 03:42:36 +04:00
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
|
|
|
|
sed -e '1,$s/@VERSION@/'$version'/' \
|
|
|
|
-e '1,$s/@RELEASE@/'$rev'/' \
|
|
|
|
-e '1,$s/^Source:.*/Source: '$fileurl'/' \
|
|
|
|
<fltk.spec.in >fltk.spec
|
2001-08-19 03:42:36 +04:00
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
echo Creating configure script...
|
|
|
|
autoconf -f
|
2002-08-25 15:20:46 +04:00
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
echo Cleaning developer files...
|
2002-07-26 18:22:02 +04:00
|
|
|
rm -rf OpenGL autom4te* bc5 config forms gl glut images packages themes
|
2003-05-26 20:12:39 +04:00
|
|
|
rm -f makesrcdist
|
2001-08-19 03:42:36 +04:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Making UNIX distribution..."
|
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
gtar czf fltk-$fileversion-source.tar.gz fltk-$version
|
2001-08-19 03:42:36 +04:00
|
|
|
|
|
|
|
echo "Making BZ2 distribution..."
|
2006-01-15 21:02:44 +03:00
|
|
|
gtar cjf fltk-$fileversion-source.tar.bz2 fltk-$version
|
2001-08-19 03:42:36 +04:00
|
|
|
|
|
|
|
echo "Making Windows distribution..."
|
|
|
|
|
2006-01-15 21:02:44 +03:00
|
|
|
rm -f fltk-$fileversion-source.zip
|
|
|
|
zip -r9 fltk-$fileversion-source.zip fltk-$version
|
2001-08-19 03:42:36 +04:00
|
|
|
|
|
|
|
echo "Removing distribution directory..."
|
|
|
|
|
|
|
|
rm -rf fltk-$version
|
|
|
|
|
2003-05-26 20:23:08 +04:00
|
|
|
echo "Done!"
|