[GRASS-SVN] r45530 - grass/trunk/mswindows/osgeo4w
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 3 08:27:17 EST 2011
Author: martinl
Date: 2011-03-03 05:27:17 -0800 (Thu, 03 Mar 2011)
New Revision: 45530
Added:
grass/trunk/mswindows/osgeo4w/env.bat.tmpl
Modified:
grass/trunk/mswindows/osgeo4w/package.sh
Log:
winGRASS: sync package.sh with grass6
Copied: grass/trunk/mswindows/osgeo4w/env.bat.tmpl (from rev 45527, grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl)
===================================================================
--- grass/trunk/mswindows/osgeo4w/env.bat.tmpl (rev 0)
+++ grass/trunk/mswindows/osgeo4w/env.bat.tmpl 2011-03-03 13:27:17 UTC (rev 45530)
@@ -0,0 +1,8 @@
+set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
+set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
+set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
+set GRASS_WISH=%OSGEO4W_ROOT%\bin\wish.exe
+set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
+set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
+set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe
+set PATH=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@\bin;%PATH%
Modified: grass/trunk/mswindows/osgeo4w/package.sh
===================================================================
--- grass/trunk/mswindows/osgeo4w/package.sh 2011-03-03 13:20:26 UTC (rev 45529)
+++ grass/trunk/mswindows/osgeo4w/package.sh 2011-03-03 13:27:17 UTC (rev 45530)
@@ -18,8 +18,8 @@
fi
export PACKAGE=${1:-1}
-export POSTFIX=$2
-export OSGEO4W_ROOT_MSYS=/c/OSGeo4W
+export OSGEO4W_ROOT_MSYS="/c/OSGeo4W"
+export OSGEO4W_ROOT="C:\\\OSGeo4W"
export PATH=.:/c/mingw/bin:/usr/local/bin:/bin:$OSGEO4W_ROOT_MSYS/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Subversion:$PWD/mswindows/osgeo4w
T0=$(date +%s)
@@ -96,9 +96,9 @@
./configure \
--with-libs="$OSGEO4W_ROOT_MSYS/lib $PWD/mswindows/osgeo4w/lib" \
--with-includes=$OSGEO4W_ROOT_MSYS/include \
- --exec-prefix=$OSGEO4W_ROOT_MSYS/bin \
--libexecdir=$OSGEO4W_ROOT_MSYS/bin \
--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
+ --bindir=$OSGEO4W_ROOT_MSYS/bin \
--includedir=$OSGEO4W_ROOT_MSYS/include \
--disable-x --without-x \
--with-cxx \
@@ -124,23 +124,24 @@
fi
log make
-make -k || make || ( cat error.log >&3 && false )
+#make -k || ( cat error.log >&3 && false )
log make install
make install
log cleanup
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
+mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h \
+ $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h
cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
-if [ -n "$POSTFIX" ] ; then
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.bat.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/ini.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX-env.bat.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$POSTFIX.bat
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$POSTFIX.bat
-fi
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT@#$OSGEO4W_ROOT#g" \
+ mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT_MSYS@#$OSGEO4W_ROOT#g" \
+ mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/env.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+ mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$MAJOR$MINOR.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+ mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$MAJOR$MINOR.bat
if [ -f /c/mingw/bin/libgnurx-0.dll ]; then
cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
@@ -148,19 +149,13 @@
cp /c/mingw/bin/libintl-8.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
fi
-P="$(pwd -W)"
-P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"
+# P="$(pwd -W)"
+# P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"
-sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
-rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"
-if [ -f $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR ]; then
- sed -e "s#$P#@osgeo4w_msys@#g" $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
- rm $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR
-elif [ -f dist.i686-pc-mingw32/grass$MAJOR$MINOR ]; then
- sed -e "s#$P#@osgeo4w_msys@/apps/grass/grass-$VERSION#g" dist.i686-pc-mingw32/grass$MAJOR$MINOR.tmp >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
-fi
+# sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
+# rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"
-if [ -n "$1" ] && [ -n "$2" ] ; then
+if [ -n "$1" ]; then
log building vc libraries
sh mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin/*.$VERSION.dll
mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
@@ -169,22 +164,21 @@
# $COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION"
log CREATING PACKAGES
- mkdir -p package/grass$POSTFIX
+ mkdir -p package/grass$MAJOR$MINOR
- PDIR=$PWD/package
+ PDIR=$PWD/package
cd $OSGEO4W_ROOT_MSYS
- tar -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE.tar.bz2 \
- apps/grass/grass-$VERSION \
- bin/grass$POSTFIX.bat.tmpl \
- bin/grass$POSTFIX.tmpl \
- bin/grass$POSTFIX-env.bat.tmpl \
- etc/postinstall/grass$POSTFIX.bat \
- etc/preremove/grass$POSTFIX.bat
+ tar -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE.tar.bz2 \
+ apps/grass/grass-$VERSION \
+ bin/grass$MAJOR$MINOR.bat \
+ bin/grass$MAJOR$MINOR \
+ etc/postinstall/grass$MAJOR$MINOR.bat \
+ etc/preremove/grass$MAJOR$MINOR.bat
cd $PDIR/..
- svn diff >/tmp/grass$POSTFIX-$VERSION.diff
- tar -C /tmp -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE-src.tar.bz2 grass$POSTFIX-$VERSION.diff
+ svn diff >/tmp/grass-$VERSION.diff
+ tar -C /tmp -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE-src.tar.bz2 grass-$VERSION.diff
fi
log
More information about the grass-commit
mailing list