[GRASS-SVN] r45481 - grass/branches/develbranch_6/mswindows/osgeo4w

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 27 15:44:05 EST 2011


Author: martinl
Date: 2011-02-27 12:44:05 -0800 (Sun, 27 Feb 2011)
New Revision: 45481

Modified:
   grass/branches/develbranch_6/mswindows/osgeo4w/package.sh
Log:
conditionalize winGRASS packaging

Modified: grass/branches/develbranch_6/mswindows/osgeo4w/package.sh
===================================================================
--- grass/branches/develbranch_6/mswindows/osgeo4w/package.sh	2011-02-27 17:33:36 UTC (rev 45480)
+++ grass/branches/develbranch_6/mswindows/osgeo4w/package.sh	2011-02-27 20:44:05 UTC (rev 45481)
@@ -75,7 +75,7 @@
     mv mswindows/osgeo4w/package.log mswindows/osgeo4w/package.log.$i 
 fi 
 
-exec 3>&1 >>mswindows/osgeo4w/package.log 2>&1 
+exec 3>&1 >> mswindows/osgeo4w/package.log 2>&1 
 
 [ -d mswindows/osgeo4w/lib ] || mkdir mswindows/osgeo4w/lib 
 cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/libsqlite3.a 
@@ -133,16 +133,20 @@
 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
-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 
- 
-cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
-cp /c/mingw/bin/libiconv-2.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
-cp /c/mingw/bin/libintl-8.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
+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
 
+if [ -f /c/mingw/bin/libgnurx-0.dll ]; then
+    cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
+    cp /c/mingw/bin/libiconv-2.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin 
+    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"
 
@@ -155,30 +159,33 @@
     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 
 
-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 
+if [ -n "$1" ] && [ -n "$2" ] ; 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 
+    
+    # log BUILDING GDAL GRASS plugins 
+    # $COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION" 
+    
+    log CREATING PACKAGES 
+    mkdir -p package/grass$POSTFIX 
+    
+    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 
+    
+    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 
+fi
 
-# log BUILDING GDAL GRASS plugins 
-# $COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION" 
-
-log CREATING PACKAGES 
-mkdir -p package/grass$POSTFIX 
-
-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 
- 
-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 
 log 
 
-exit 0
\ No newline at end of file
+exit 0



More information about the grass-commit mailing list