Skip to content

Commit

Permalink
package.sh updated
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@45041 15284696-431f-4ddb-bdfa-cd5b030d7da7
  • Loading branch information
landam committed Jan 14, 2011
1 parent 63a48bf commit 7912214
Showing 1 changed file with 26 additions and 69 deletions.
95 changes: 26 additions & 69 deletions mswindows/osgeo4w/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,27 @@ VERSION=$(version)
PACKAGE=3
export VERSION PACKAGE

(
echo
echo
echo
GRASS_PYTHON=/c/OSGeo4W/apps/Python25
PYTHONHOME=/c/OSGeo4W/apps/Python25
export GRASS_PYTHON PYTHONHOME

LOG=mswindows/osgeo4w/package.log

report() {
echo $(date): STARTING $1
echo $(date): STARTING $1 >>$LOG
}

echo $(date): START > $LOG

if ! [ -f mswindows/osgeo4w/configure-stamp ]; then

if [ -e include/Make/Grass.make ] ; then
echo $(date): STARTING make distclean
make distclean
report "distclean"
make distclean >>$LOG 2>&1
fi

echo $(date): STARTING configure
report "configure"
./configure \
--with-libs="$OSGEO4W_ROOT_MSYS/apps/gdal-16/lib $OSGEO4W_ROOT_MSYS/lib" \
--with-includes="$OSGEO4W_ROOT_MSYS/apps/gdal-16/include $OSGEO4W_ROOT_MSYS/include" \
Expand All @@ -62,21 +70,18 @@ if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
--with-odbc \
--without-cairo \
--enable-largefile
--with-odbc >>$LOG 2>&1

touch mswindows/osgeo4w/configure-stamp
fi

GRASS_PYTHON=/c/OSGeo4W/apps/Python25
export GRASS_PYTHON
PYTHONHOME=/c/OSGeo4W/apps/Python25
export PYTHONHOME
report "make"
make >>$LOG 2>&1

echo $(date): STARTING make
make
report "make install"
make install >>$LOG 2>&1

echo $(date): STARTING make install
make install

echo $(date): STARTING cleanup
report "cleanup"
mv "$OSGEO4W_ROOT_MSYS"/apps/grass/grass-$VERSION/lib/*.$VERSION.dll \
"$OSGEO4W_ROOT_MSYS/bin"

Expand All @@ -94,7 +99,7 @@ cp mswindows/osgeo4w/preremove.bat \
"$OSGEO4W_ROOT_MSYS/etc/preremove/grass.bat"

P="$(pwd -W)"
#portable? how about dist.amd64-pc-mingw32?
# portable? how about dist.amd64-pc-mingw32?
P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"

sed -e "s#$P#@osgeo4w@#" "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap" \
Expand All @@ -103,54 +108,6 @@ sed -e "s#$P#@osgeo4w_msys@#" "$OSGEO4W_ROOT_MSYS/apps/grass/bin/grass70" \
> $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass70.tmpl
rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"

#echo $(date): STARTING building vc libraries
#sh mswindows/osgeo4w/mklibs.sh "$OSGEO4W_ROOT_MSYS"/bin/*.$VERSION.dll
#mv mswindows/osgeo4w/vc/grass*.lib \
# "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib"
#
#set -x
#echo $(date): BUILDING GDAL GRASS plugins
#cmd /c 'mswindows\\osgeo4w\\gdalplugins.cmd $VERSION'
#
#echo $(date): CREATING packages in $(PDIR)
#mkdir -p package/grass-devel \
# package/grass-devel-mingw \
# package/grass-devel-vc \
# package/grass
#
#PDIR="$PWD/package"
#cd "$OSGEO4W_ROOT_MSYS"
#tar -cjf "$PDIR/grass-devel/grass-devel-$VERSION-$PACKAGE.tar.bz2" \
# "apps/grass/grass-$VERSION/include"
#
#tar -cjf "$PDIR/grass-devel-mingw/grass-devel-mingw-$VERSION-$PACKAGE.tar.bz2" \
# "apps/grass/grass-$VERSION/lib/"libgrass*.a
#
#tar -cjf "$PDIR/grass-devel-vc/grass-devel-vc-$VERSION-$PACKAGE.tar.bz2" \
# "apps/grass/grass-$VERSION/"lib/*.lib
#
#tar -cjf "$PDIR/grass/grass-$VERSION-$PACKAGE.tar.bz2" \
# apps/grass/bin/grass70.tmpl \
# apps/grass/grass-$VERSION/authors \
# apps/grass/grass-$VERSION/bin/ \
# apps/grass/grass-$VERSION/bwidget/ \
# apps/grass/grass-$VERSION/changes \
# apps/grass/grass-$VERSION/copying \
# apps/grass/grass-$VERSION/docs \
# apps/grass/grass-$VERSION/driver \
# apps/grass/grass-$VERSION/etc \
# apps/grass/grass-$VERSION/gpl.txt \
# apps/grass/grass-$VERSION/requirements.html \
# apps/grass/grass-$VERSION/scripts \
# bin/libgnurx-0.dll \
# bin/libiconv-2.dll \
# bin/libintl-8.dll \
# bin/grass70.bat.tmpl \
# bin/libgrass_*.$VERSION.dll \
# etc/ini/grass.bat \
# etc/postinstall/grass.bat \
# etc/preremove/grass.bat

echo $(date): END

) | tee -a mswindows/osgeo4w/package.log
echo $(date): END >> $LOG

exit 0

0 comments on commit 7912214

Please sign in to comment.