[GRASS-SVN] r42158 - in grass/trunk/macosx: . app
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 8 11:27:01 EDT 2010
Author: kyngchaos
Date: 2010-05-08 11:27:01 -0400 (Sat, 08 May 2010)
New Revision: 42158
Modified:
grass/trunk/macosx/Makefile
grass/trunk/macosx/app/Makefile
Log:
update mac install to mirror current standard install
Modified: grass/trunk/macosx/Makefile
===================================================================
--- grass/trunk/macosx/Makefile 2010-05-08 12:48:01 UTC (rev 42157)
+++ grass/trunk/macosx/Makefile 2010-05-08 15:27:01 UTC (rev 42158)
@@ -33,8 +33,6 @@
PKG_INST_DIR = ${prefix}
endif
-FILES = AUTHORS COPYING CHANGES REQUIREMENTS.html GPL.TXT
-
default: subdirs
include bundle.make
@@ -52,7 +50,7 @@
real-install-macosx: INST_DIR_TARGET = ${INST_DIR}
real-install-macosx: PREFIX_TARGET = ${prefix}
-real-install-macosx: install-basic-macosx macosx-support-dir bundle-macosx
+real-install-macosx: install-macosxapp install-basic-macosx macosx-support-dir bundle-macosx
@# help file package
${LN_DIR} "${INST_DIR_TARGET}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
@@ -62,13 +60,24 @@
bindist-macosx: INST_DIR_TARGET = ${MACOSX_BUNDLE_PREFIX}
bindist-macosx: PREFIX_TARGET = ${GRASS_HOME}/macosx/dist
-bindist-macosx: install-basic-macosx bundle-macosx
+bindist-macosx: install-macosxapp install-basic-macosx bundle-macosx
@# installer pkg resources
${MAKE_DIR_CMD} dist/resources
- -sed -e "s#@INST_DIR@#${INST_DIR}#g" -e "s#@MACOSX_SUPPDIR@#${MACOSX_SUPPDIR}#g" -e "s#@GRASS_VER@#${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}#g" -e "s#@PYVER@#${PYVER}#g" pkg/resources/postflight.in > dist/resources/postflight
+ -sed -e "s#@INST_DIR@#${INST_DIR}#g" \
+ -e "s#@MACOSX_SUPPDIR@#${MACOSX_SUPPDIR}#g" \
+ -e "s#@GRASS_VER@#${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}#g" \
+ -e "s#@PYVER@#${PYVER}#g" \
+ pkg/resources/postflight.in > dist/resources/postflight
-chmod a+rx dist/resources/postflight
- -sed -e "s#@GRASS_VER@#${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}#g" pkg/resources/Description.plist.in > dist/Description.plist
- -sed -e "s#@GRASS_VERSION_MAJOR@#${GRASS_VERSION_MAJOR}#g" -e "s#@GRASS_VERSION_MINOR@#${GRASS_VERSION_MINOR}#g" -e "s#@GRASS_VERSION_RELEASE@#${GRASS_VERSION_RELEASE}#g" -e "s#@VER_MINOR_REL@#${VER_MINOR_REL}#g" -e "s#@VER_DATE@#${VER_DATE}#g" -e "s#@PKG_INST_DIR@#${PKG_INST_DIR}#g" pkg/resources/Info.plist.in > dist/Info.plist
+ -sed -e "s#@GRASS_VER@#${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}#g" \
+ pkg/resources/Description.plist.in > dist/Description.plist
+ -sed -e "s#@GRASS_VERSION_MAJOR@#${GRASS_VERSION_MAJOR}#g" \
+ -e "s#@GRASS_VERSION_MINOR@#${GRASS_VERSION_MINOR}#g" \
+ -e "s#@GRASS_VERSION_RELEASE@#${GRASS_VERSION_RELEASE}#g" \
+ -e "s#@VER_MINOR_REL@#${VER_MINOR_REL}#g" \
+ -e "s#@VER_DATE@#${VER_DATE}#g" \
+ -e "s#@PKG_INST_DIR@#${PKG_INST_DIR}#g" \
+ pkg/resources/Info.plist.in > dist/Info.plist
-${INSTALL_DATA} pkg/resources/License.rtf dist/resources
-${INSTALL_DATA} pkg/resources/ReadMe.rtf dist/resources
@# build the package
@@ -79,30 +88,30 @@
${PACKAGEMAKER} -build -ds -p "GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.pkg" -f dist/${MACOSX_APP_NAME} -r dist/resources -i dist/Info.plist -d dist/Description.plist
endif
+install-macosxapp:
+ -$(MAKE_DIR_CMD) ${INST_DIR_TARGET}/bin
+ -$(MAKE_DIR_CMD) ${INST_DIR_TARGET}/etc
+ -$(MAKE_DIR_CMD) ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents/Resources/Scripts
+ -$(MAKE_DIR_CMD) ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents/Resources/English.lproj/MainMenu.nib
+ $(INSTALL) app/build_html_user_index.sh ${INST_DIR_TARGET}/etc
+ $(INSTALL) app/build_gui_user_menu.sh ${INST_DIR_TARGET}/etc
+ $(INSTALL) app/python_wrapper ${INST_DIR_TARGET}/bin/python
+ $(INSTALL_DATA) app/app.icns ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents/Resources
+ $(INSTALL_DATA) app/${OBJDIR}/Info.plist ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents
+ $(INSTALL_DATA) app/PkgInfo ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents
+ $(INSTALL) app/${OBJDIR}/GRASS.scpt ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents/Resources/Scripts/
+ $(INSTALL) app/${OBJDIR}/grass.sh ${INST_DIR_TARGET}
+ $(INSTALL) app/${OBJDIR}/GRASS ${INST_DIR_TARGET}
+ $(INSTALL_DATA) app/English.lproj/MainMenu.nib/* ${PREFIX_TARGET}/${MACOSX_APP_NAME}/Contents/Resources/English.lproj/MainMenu.nib
+
install-basic-macosx:
- ${MAKE_DIR_CMD} ${INST_DIR_TARGET}
- -cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${PREFIX_TARGET} ; tar xBf - ) 2>/dev/null
- @# ***TODO*** don't build app shell into dist, assemble app bundle here
- @# install dist all at once
- -cd ${GISBASE} ; tar cBf - $(FILES) | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - demolocation | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - docs | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - tools | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null ; fi
- -cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
+ -tar cBCf $(GISBASE) - . | tar xBCf $(INST_DIR_TARGET) - 2>/dev/null
-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 > $(INST_DIR_TARGET)/$(GRASS_NAME)
-chmod a+x $(UNIX_BIN)/$(GRASS_NAME)
+ -rm -f $(INST_DIR_TARGET)/$(GRASS_NAME).tmp
-chmod -R a+rX ${PREFIX_TARGET}/${MACOSX_APP_NAME} 2>/dev/null
-touch ${PREFIX_TARGET}/${MACOSX_APP_NAME}
Modified: grass/trunk/macosx/app/Makefile
===================================================================
--- grass/trunk/macosx/app/Makefile 2010-05-08 12:48:01 UTC (rev 42157)
+++ grass/trunk/macosx/app/Makefile 2010-05-08 15:27:01 UTC (rev 42158)
@@ -31,84 +31,43 @@
WX64BIT = 0
endif
-NIBSRC := $(wildcard English.lproj/MainMenu.nib/*)
-NIBDST := $(patsubst English.lproj/%,$(APPDIR)/Resources/English.lproj/%,$(NIBSRC))
-
FILES = \
- $(APPDIR)/MacOS/etc/build_html_user_index.sh \
- $(APPDIR)/MacOS/etc/build_gui_user_menu.sh \
- $(APPDIR)/MacOS/bin/python \
- $(APPDIR)/Resources/app.icns \
- $(APPDIR)/Info.plist \
- $(APPDIR)/PkgInfo \
- $(APPDIR)/Resources/Scripts/GRASS.scpt \
- $(APPDIR)/MacOS/grass.sh \
- $(APPDIR)/MacOS/GRASS \
- $(NIBDST)
+ $(OBJDIR)/GRASS \
+ $(OBJDIR)/Info.plist \
+ $(OBJDIR)/GRASS.scpt \
+ $(OBJDIR)/grass.sh
-default: macosxapp
+default: $(FILES)
-macosxapp:
- -$(MAKE_DIR_CMD) $(OBJDIR)
- -$(MAKE_DIR_CMD) $(APPDIR)/Resources/Scripts
- -$(MAKE_DIR_CMD) $(APPDIR)/MacOS/bin
- -$(MAKE_DIR_CMD) $(APPDIR)/MacOS/etc
- -$(MAKE_DIR_CMD) $(APPDIR)/Resources/English.lproj/MainMenu.nib
- $(MAKE) $(FILES)
-
-$(APPDIR)/Resources/app.icns: app.icns
- $(INSTALL_DATA) $< $@
-
-$(APPDIR)/Resources/English.lproj/%: English.lproj/%
- $(INSTALL_DATA) $< $@
-
-$(APPDIR)/Info.plist: $(OBJDIR)/Info.plist
- $(INSTALL_DATA) $< $@
-
-$(APPDIR)/PkgInfo: PkgInfo
- $(INSTALL_DATA) $< $@
-
-$(APPDIR)/Resources/Scripts/GRASS.scpt: $(OBJDIR)/GRASS.scpt
- $(INSTALL_DATA) $< $@
-
-$(APPDIR)/MacOS/grass.sh: $(OBJDIR)/grass.sh
- $(INSTALL) $< $@
-
-$(APPDIR)/MacOS/etc/%.sh: %.sh
- $(INSTALL) $< $@
-
-$(APPDIR)/MacOS/bin/python: python_wrapper
- $(INSTALL) $< $@
-
$(OBJDIR)/main.o: main.m
$(MAKE_DIR_CMD) $(OBJDIR)
- $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(EXTRA_INC) -o $(OBJDIR)/main.o -c main.m
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(EXTRA_INC) -o $@ -c $<
-$(APPDIR)/MacOS/GRASS: $(OBJDIR)/main.o
- -$(MAKE_DIR_CMD) $(APPDIR)/MacOS
- $(CC) $(LDFLAGS) -o $(APPDIR)/MacOS/GRASS $(OBJDIR)/main.o $(EXTRA_LDFLAGS)
+$(OBJDIR)/GRASS: $(OBJDIR)/main.o
+ $(MAKE_DIR_CMD) $(OBJDIR)
+ $(CC) $(LDFLAGS) -o $@ $< $(EXTRA_LDFLAGS)
$(OBJDIR)/Info.plist: Info.plist.in
$(MAKE_DIR_CMD) $(OBJDIR)
sed -e "s, at GRASS_VERSION_MAJOR@,$(GRASS_VERSION_MAJOR),g" \
- -e "s, at GRASS_VERSION_MINOR@,$(GRASS_VERSION_MINOR),g" \
- -e "s, at GRASS_VERSION_RELEASE@,$(GRASS_VERSION_RELEASE),g" \
- -e "s, at GRASS_VERSION_BUILD@,$(GRASS_VERSION_BUILD),g" \
- Info.plist.in > $(OBJDIR)/Info.plist
+ -e "s, at GRASS_VERSION_MINOR@,$(GRASS_VERSION_MINOR),g" \
+ -e "s, at GRASS_VERSION_RELEASE@,$(GRASS_VERSION_RELEASE),g" \
+ -e "s, at GRASS_VERSION_BUILD@,$(GRASS_VERSION_BUILD),g" \
+ $< > $@
$(OBJDIR)/GRASS.scpt: GRASS.applescript
$(MAKE_DIR_CMD) $(OBJDIR)
- osacompile -d -x -i /System/Library/Frameworks/AppleScriptKit.framework -o $(OBJDIR)/GRASS.scpt GRASS.applescript
+ osacompile -d -x -i /System/Library/Frameworks/AppleScriptKit.framework -o $@ $<
$(OBJDIR)/grass.sh: grass.sh.in
$(MAKE_DIR_CMD) $(OBJDIR)
sed -e "s, at GDAL_BIN_PATH@,$(GDAL_BIN)," \
- -e "s, at PROJ_BIN_PATH@,$(PROJ_BIN)," \
- -e "s, at X11@,$(USE_X11),g" \
- -e "s, at PYVER@,$(PYVER),g" \
- -e "s, at WX64BIT@,$(WX64BIT),g" \
- -e "s, at GRASS_NAME@,$(GRASS_NAME),g" \
- grass.sh.in > $(OBJDIR)/grass.sh
+ -e "s, at PROJ_BIN_PATH@,$(PROJ_BIN)," \
+ -e "s, at X11@,$(USE_X11),g" \
+ -e "s, at PYVER@,$(PYVER),g" \
+ -e "s, at WX64BIT@,$(WX64BIT),g" \
+ -e "s, at GRASS_NAME@,$(GRASS_NAME),g" \
+ $< > $@
clean:
-rm -rf $(OBJDIR) $(EXTRA_CLEAN_DIRS) $(EXTRA_CLEAN_FILES)
More information about the grass-commit
mailing list