Browse Source

bundling step now works for install also;
simplified duplication in install and bindist;

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38369 15284696-431f-4ddb-bdfa-cd5b030d7da7

William Kyngesburye 15 years ago
parent
commit
50111bb1fe
3 changed files with 40 additions and 56 deletions
  1. 32 46
      macosx/Makefile
  2. 3 5
      macosx/ReadMe.rtf
  3. 5 5
      macosx/pkg/bundle.make

+ 32 - 46
macosx/Makefile

@@ -35,6 +35,8 @@ endif
 
 default: subdirs
 
+include bundle.make
+
 install-macosx:
 	echo ${ARCH_DISTDIR}/${MACOSX_APP_NAME}
 	@ if [ ! -d ${ARCH_DISTDIR}/${MACOSX_APP_NAME} ] ; then \
@@ -44,58 +46,23 @@ install-macosx:
 	fi; \
 	${MAKE} real-install-macosx
 
-# Duplicated, mostly, from the top-level makefile.  There are enough
-# differences that make it simpler to have a separate install target.
+# Duplicated, mostly, from the top-level makefile.
 
-real-install-macosx:
-	${MAKE_DIR_CMD} ${INST_DIR}
-	${MAKE} macosx-support-dir
-	-cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${prefix} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - docs | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null ; fi
-	-cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-	-sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR}/etc/monitorcap
-	-chmod -R a+rX ${prefix}/${MACOSX_APP_NAME} 2>/dev/null
-	-touch ${prefix}/${MACOSX_APP_NAME}
-	@#-cd ${GRASS_HOME} ; tar cBf - gem/skeleton | (cd ${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
-	@#-${INSTALL} ${GRASS_HOME}/gem/gem6 ${prefix}/${MACOSX_APP_NAME}/Contents/MacOS 2>/dev/null
-	@#-cd ${GISBASE} ; tar cBf - modbuild | (cd ${MACOSX_SUPPDIR} ; tar xBf - ) 2>/dev/null
-	@# help file package - in the future files will go in /Library/Documentation/Help
-	${LN_DIR} "${INST_DIR}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
+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
+	-cd ${GISBASE} ; tar cBf - modbuild | (cd ${MACOSX_SUPPDIR} ; tar xBf - ) 2>/dev/null
+	@# help file package
+	${LN_DIR} "${INST_DIR_TARGET}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}
 
 # create a packagemaker installer package.
 # pretty much the same as install, but needs intermediate install location
 # to assemble package parts.
 
-include pkg/bundle.make
-
-bindist-macosx:
-	${MAKE_DIR_CMD} ${GRASS_HOME}/macosx/dist
-	-cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${GRASS_HOME}/macosx/dist ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - bin | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - docs | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - driver | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - etc | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - fonts | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - man | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - scripts | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null ; fi
-	-cd ${GISBASE} ; tar cBf - include | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-cd ${GISBASE} ; tar cBf - lib | (cd ${MACOSX_BUNDLE_PREFIX} ; tar xBf - ) 2>/dev/null
-	-sed 's#'${GISBASE}'#'${INST_DIR_MACOSX}'#g' ${GISBASE}/etc/monitorcap > dist/${MACOSX_APPDIR}/etc/monitorcap
-	-chmod -R a+rX dist/${MACOSX_APPDIR} 2>/dev/null
-	@#-cd ${GRASS_HOME} ; tar cBf - gem/skeleton | (cd ${MACOSX_BUNDLE_PREFIX}/etc ; tar xBf - ) 2>/dev/null
-	@#-${INSTALL} ${GRASS_HOME}/gem/gem6 dist/${MACOSX_APP_NAME}/Contents/MacOS 2>/dev/null
-	@# extras to bundle
-	${MAKE} bundle-macosx
-	@# pkg resources
+bindist-macosx: INST_DIR_TARGET = ${MACOSX_BUNDLE_PREFIX}
+bindist-macosx: PREFIX_TARGET = ${GRASS_HOME}/macosx/dist
+bindist-macosx: 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
 	-chmod a+rx dist/resources/postflight
@@ -114,6 +81,25 @@ endif
 	@# remove intermediate files
 	@# -rm -rf dist 2>/dev/null
 
+install-basic-macosx:
+	${MAKE_DIR_CMD} ${INST_DIR_TARGET}
+	-cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${PREFIX_TARGET} ; tar xBf - ) 2>/dev/null
+	-cd ${GISBASE} ; tar cBf - bin | (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
+	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
+	-sed 's#'${GISBASE}'#'${INST_DIR_TARGET}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR_TARGET}/etc/monitorcap
+	-chmod -R a+rX ${PREFIX_TARGET}/${MACOSX_APP_NAME} 2>/dev/null
+	@#-cd ${GRASS_HOME} ; tar cBf - gem/skeleton | (cd ${INST_DIR_TARGET}/etc ; tar xBf - ) 2>/dev/null
+	@#-${INSTALL} ${GRASS_HOME}/gem/gem6 ${INST_DIR_TARGET} 2>/dev/null
+	-touch ${PREFIX_TARGET}/${MACOSX_APP_NAME}
+
 macosx-support-dir:
 	${MAKE_DIR_CMD} "${MACOSX_SUPPDIR}"
 	${MAKE_DIR_CMD} "${MACOSX_SUPPDIR}/Modules/bin"

+ 3 - 5
macosx/ReadMe.rtf

@@ -324,7 +324,7 @@ This installer currently does NOT do any verification of installed dependencies
 \cf0 \ul Bundling Libraries and Programs\
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 \cf0 \ulnone \
-With the installer package build, additional dependent libraries and programs can be bundled with the application package to make a more portable and easily installed GRASS application.  See 
+Additional dependent libraries and programs can be bundled with the application package to make a more portable and easily installed GRASS application.  See 
 \f1\fs20 macosx/pkg/bundle.make
 \f0\fs24  for details.\
 \
@@ -411,10 +411,8 @@ sudo ln -sf /Library/Frameworks/Tk.framework/Versions/8.5/libtkstub8.5.a /usr/lo
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 
 \b0\fs24 \cf0 \
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-\cf0 A universal GPSBabel CLI executable is now included in the OSX binary from {\field{\*\fldinst{HYPERLINK "http://www.gpsbabel.org/"}}{\fldrslt www.gpsbabel.org}}.  This does not need to be 64bit.\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
-\cf0 \
+A universal GPSBabel CLI executable is now included in the OSX binary from {\field{\*\fldinst{HYPERLINK "http://www.gpsbabel.org/"}}{\fldrslt www.gpsbabel.org}}.  This does not need to be 64bit.\
+\
 \
 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
 

+ 5 - 5
macosx/pkg/bundle.make

@@ -6,19 +6,19 @@
 # use ${LN} and ${LN_DIR} to symlink files and folders respectively.
 # 
 # Destinations include: bin and lib and should be prefixed by
-# ${MACOSX_BUNDLE_PREFIX}/
+# ${INST_DIR_TARGET}/
 # Includes should not normally be needed.
 # 
 # For libraries, make sure to make symlinks if the symlink is the linked name.
 # ie, libfoo.1.0.dylib is the library file, but libfoo.1.dylib is the link name:
-#   ${LN} libfoo.1.0.dylib ${MACOSX_BUNDLE_PREFIX}/lib/libfoo.1.dylib
+#   ${LN} libfoo.1.0.dylib ${INST_DIR_TARGET}/lib/libfoo.1.dylib
 # If you're not sure, make all symlinks for a library.
 # 
 # use one line per file after the "bundle-macosx:" line, indented with a tab.
 # ie:
-#	${INSTALL} /usr/local/bin/gpsbabel ${MACOSX_BUNDLE_PREFIX}/bin
-#	${INSTALL} /usr/local/pgsql/lib/libpq.5.1.dylib ${MACOSX_BUNDLE_PREFIX}/lib
-#	${LN} libpq.5.1.dylib ${MACOSX_BUNDLE_PREFIX}/lib/libpq.5.dylib
+#	${INSTALL} /usr/local/bin/gpsbabel ${INST_DIR_TARGET}/bin
+#	${INSTALL} /usr/local/pgsql/lib/libpq.5.1.dylib ${INST_DIR_TARGET}/lib
+#	${LN} libpq.5.1.dylib ${INST_DIR_TARGET}/lib/libpq.5.dylib
 
 bundle-macosx:
 	@# add custom bundle commands here: