[GRASS-SVN] r41862 - in grass/trunk: . include/Make lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 14 12:36:25 EDT 2010
Author: martinl
Date: 2010-04-14 12:36:24 -0400 (Wed, 14 Apr 2010)
New Revision: 41862
Modified:
grass/trunk/binaryInstall.src
grass/trunk/include/Make/Install.make
grass/trunk/lib/init/Makefile
grass/trunk/lib/init/grass.py
Log:
bugfix #1034
Modified: grass/trunk/binaryInstall.src
===================================================================
--- grass/trunk/binaryInstall.src 2010-04-14 14:33:27 UTC (rev 41861)
+++ grass/trunk/binaryInstall.src 2010-04-14 16:36:24 UTC (rev 41862)
@@ -9,7 +9,7 @@
# GRASS binary package installation tool
# platform independent
#
-# 1999-2000 by Markus Neteler
+# 1999-2000, 2010 by Markus Neteler, and the GRASS development team
#
##########################################################################
@@ -161,8 +161,8 @@
echo "Using $UNPACK decompressor..."
-echo "The package $PACKAGE_NAME seems to be o.k."
-echo " Proceeding..."
+echo "The package $PACKAGE_NAME seems to be OK"
+echo "Proceeding..."
echo ""
# Check if the paths for the binary and the destination are the same
@@ -285,9 +285,8 @@
echo "Creating start script:"
echo "$BINDIR/$GRASSPRG -> $BINDIR/grass-$NAME_VER"
-STRING="s|^GISBASE.*|GISBASE\=\'$DESTDIR\'|g"
-
-sed -e $STRING $DESTDIR/$GRASSPRG.tmp > $BINDIR/grass-$NAME_VER
+sed -e "s#@GISBASE@#$DESTDIR#g" \
+ $DESTDIR/$GRASSPRG.tmp > $BINDIR/grass-$NAME_VER
if [ $? -eq 1 ] ; then
echo "An error occured trying to create the grass start script! Exiting."
echo "You probably do not have permission to install into $BINDIR."
Modified: grass/trunk/include/Make/Install.make
===================================================================
--- grass/trunk/include/Make/Install.make 2010-04-14 14:33:27 UTC (rev 41861)
+++ grass/trunk/include/Make/Install.make 2010-04-14 16:36:24 UTC (rev 41862)
@@ -2,7 +2,7 @@
# This should be "include"d from the top-level Makefile, and nowhere else
BIN_DIST_FILES = $(FILES) \
- grass$(GRASS_NAME).tmp \
+ $(GRASS_NAME).tmp \
bin \
docs \
driver \
@@ -81,11 +81,18 @@
real-install:
test -d $(INST_DIR) || $(MAKE_DIR_CMD) $(INST_DIR)
test -d $(UNIX_BIN) || $(MAKE_DIR_CMD) $(UNIX_BIN)
- -sed 's#'$(RUN_GISBASE)'#'$(INST_DIR)'#g' $(ARCH_BINDIR)/$(GRASS_NAME) > $(UNIX_BIN)/$(GRASS_NAME)
- -chmod a+x $(UNIX_BIN)/$(GRASS_NAME)
ifneq ($(strip $(MINGW)),)
- -sed 's#'$(RUN_GISBASE)'#'$(INST_DIR)'#g' $(ARCH_BINDIR)/$(GRASS_NAME).py > $(UNIX_BIN)/$(GRASS_NAME).py
+ -sed -e 's#'@GISBASE@'#'$(INST_DIR)'#g' \
+ -e 's#'@LD_LIBRARY_PATH_VAR@'#'$(LD_LIBRARY_PATH_VAR)'#g' \
+ -e 's#'@CONFIG_PROJSHARE@'#'$(PROJSHARE)'#g' \
+ $(ARCH_DISTDIR)/$(GRASS_NAME).tmp > $(UNIX_BIN)/$(GRASS_NAME).py
-chmod a+x $(UNIX_BIN)/$(GRASS_NAME).py
+else
+ -sed -e 's#'@GISBASE@'#'$(INST_DIR)'#g' \
+ -e 's#'@LD_LIBRARY_PATH_VAR@'#'$(LD_LIBRARY_PATH_VAR)'#g' \
+ -e 's#'@CONFIG_PROJSHARE@'#'$(PROJSHARE)'#g' \
+ $(ARCH_DISTDIR)/$(GRASS_NAME).tmp > $(UNIX_BIN)/$(GRASS_NAME)
+ -chmod a+x $(UNIX_BIN)/$(GRASS_NAME)
endif
-tar cBCf $(GISBASE) - . | tar xBCf $(INST_DIR) - 2>/dev/null
-sed 's#'$(GISBASE)'#'$(INST_DIR)'#g' $(GISBASE)/etc/fontcap > $(INST_DIR)/etc/fontcap
Modified: grass/trunk/lib/init/Makefile
===================================================================
--- grass/trunk/lib/init/Makefile 2010-04-14 14:33:27 UTC (rev 41861)
+++ grass/trunk/lib/init/Makefile 2010-04-14 16:36:24 UTC (rev 41862)
@@ -15,6 +15,7 @@
FILES = \
$(ARCH_BINDIR)/$(START_UP) \
+ $(ARCH_DISTDIR)/$(START_UP).tmp \
$(ETC)/clean_temp$(EXE) \
$(ETC)/lock$(EXE) \
$(ETC)/run$(EXE) \
@@ -74,6 +75,16 @@
$< > $@
chmod +x $@
+$(ARCH_DISTDIR)/$(START_UP).tmp: grass.py
+ rm -f $@
+ sed \
+ -e 's#@GRASS_VERSION_NUMBER@#$(GRASS_VERSION_NUMBER)#' \
+ -e 's#@START_UP@#$(START_UP)#' \
+ -e 's#@GRASS_CONFIG_DIR@#$(GRASS_CONFIG_DIR)#' \
+ -e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#' \
+ -e 's#@CONFIG_PROJSHARE@#$(PROJSHARE)#' \
+ $< > $@
+
$(ETC)/echo$(EXE) $(ETC)/run$(EXE): $(ETC)/%$(EXE): $(OBJDIR)/%.o
$(call linker_base,$(LINK),$(LDFLAGS),$(MANIFEST_OBJ))
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2010-04-14 14:33:27 UTC (rev 41861)
+++ grass/trunk/lib/init/grass.py 2010-04-14 16:36:24 UTC (rev 41862)
@@ -32,17 +32,11 @@
# Variables substituted during build process
# Set the GISBASE variable
-if os.getenv("GISBASE"):
- gisbase = os.getenv("GISBASE")
-else:
- gisbase = "@GISBASE@"
+gisbase = "@GISBASE@"
cmd_name = "@START_UP@"
grass_version = "@GRASS_VERSION_NUMBER@"
ld_library_path_var = '@LD_LIBRARY_PATH_VAR@'
-if os.getenv("GRASS_PROJSHARE"):
- config_projshare = os.getenv("GRASS_PROJSHARE")
-else:
- config_projshare = "@CONFIG_PROJSHARE@"
+config_projshare = "@CONFIG_PROJSHARE@"
grass_config_dirname = "@GRASS_CONFIG_DIR@"
gisbase = os.path.normpath(gisbase)
More information about the grass-commit
mailing list