2005-01-11 16:54:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2005-12-14 15:23:48 +00:00
|
|
|
#
|
|
|
|
# USAGE:
|
|
|
|
#
|
2005-12-15 19:11:39 +00:00
|
|
|
# -- postgis-cvs.tar.gz
|
2005-12-14 15:23:48 +00:00
|
|
|
# sh make_dist.sh
|
|
|
|
#
|
2005-12-15 19:11:39 +00:00
|
|
|
# -- postgis-1.1.0.tar.gz
|
2005-12-14 15:23:48 +00:00
|
|
|
# sh make_dist.sh 1.1.0
|
|
|
|
#
|
|
|
|
# NOTE: will not work prior to 1.1.0
|
|
|
|
#
|
|
|
|
#
|
2005-01-11 16:54:41 +00:00
|
|
|
|
2006-09-27 08:22:12 +00:00
|
|
|
tag=trunk
|
2005-12-14 15:23:48 +00:00
|
|
|
version=cvs
|
|
|
|
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
version="$1"
|
2006-09-27 08:22:12 +00:00
|
|
|
#version=`echo $version | sed 's/RC/-rc/'`
|
|
|
|
#tag=pgis_`echo "$version" | sed 's/\./_/g'`
|
|
|
|
tag="tags/$version"
|
2005-01-11 18:04:04 +00:00
|
|
|
fi
|
|
|
|
|
2005-01-11 16:54:41 +00:00
|
|
|
outdir="postgis-$version"
|
2005-12-14 15:23:48 +00:00
|
|
|
package="postgis-$version.tar.gz"
|
2005-01-11 16:54:41 +00:00
|
|
|
|
|
|
|
if [ -d "$outdir" ]; then
|
2009-07-08 15:09:43 +00:00
|
|
|
echo "Output directory $outdir already exists."
|
2005-01-11 16:54:41 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Exporting tag $tag"
|
2006-09-27 08:22:12 +00:00
|
|
|
#cvs export -r "$tag" -d "$outdir" postgis
|
2009-04-21 17:45:34 +00:00
|
|
|
svn export "http://svn.osgeo.org/postgis/$tag" "$outdir"
|
2005-01-11 16:54:41 +00:00
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2005-12-16 09:32:53 +00:00
|
|
|
# remove .cvsignore, make_dist.sh and HOWTO_RELEASE
|
2005-12-14 15:23:48 +00:00
|
|
|
echo "Removing .cvsignore and make_dist.sh files"
|
2005-01-11 16:54:41 +00:00
|
|
|
find "$outdir" -name .cvsignore -exec rm {} \;
|
2012-02-01 17:39:13 +00:00
|
|
|
find "$outdir" -name .gitignore -exec rm {} \;
|
2005-12-16 09:32:53 +00:00
|
|
|
rm -f "$outdir"/make_dist.sh "$outdir"/HOWTO_RELEASE
|
2005-01-11 16:54:41 +00:00
|
|
|
|
2012-01-09 15:27:33 +00:00
|
|
|
# generating configure script and configuring
|
2005-12-14 15:23:48 +00:00
|
|
|
echo "Running autogen.sh; ./configure"
|
2005-01-25 08:48:44 +00:00
|
|
|
owd="$PWD"
|
|
|
|
cd "$outdir"
|
2005-12-14 15:23:48 +00:00
|
|
|
./autogen.sh
|
|
|
|
./configure
|
2012-01-09 15:27:33 +00:00
|
|
|
#make
|
2009-07-02 16:31:51 +00:00
|
|
|
cd "$owd"
|
|
|
|
|
2012-01-09 15:27:33 +00:00
|
|
|
# generating comments
|
2005-01-11 16:54:41 +00:00
|
|
|
echo "Generating documentation"
|
|
|
|
owd="$PWD"
|
|
|
|
cd "$outdir"/doc
|
2012-01-09 15:27:33 +00:00
|
|
|
make comments
|
2005-01-11 16:54:41 +00:00
|
|
|
if [ $? -gt 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2012-01-09 15:27:33 +00:00
|
|
|
make clean # won't drop the comment files
|
2005-01-11 16:54:41 +00:00
|
|
|
cd "$owd"
|
|
|
|
|
2005-12-14 15:23:48 +00:00
|
|
|
# Run make distclean
|
|
|
|
echo "Running make distclean"
|
|
|
|
owd="$PWD"
|
|
|
|
cd "$outdir"
|
|
|
|
make distclean
|
|
|
|
cd "$owd"
|
|
|
|
|
|
|
|
echo "Generating $package file"
|
2005-12-15 19:11:39 +00:00
|
|
|
tar czf "$package" "$outdir"
|
2005-01-11 16:54:41 +00:00
|
|
|
|
|
|
|
#echo "Cleaning up"
|
|
|
|
#rm -Rf "$outdir"
|
|
|
|
|