3fb8ae4
diff -up ./matlab/CMakeLists.txt.octave ./matlab/CMakeLists.txt
3fb8ae4
--- ./matlab/CMakeLists.txt.octave	2015-04-28 00:07:14.000000000 -0400
3fb8ae4
+++ ./matlab/CMakeLists.txt	2015-05-17 11:22:21.355846289 -0400
3fb8ae4
@@ -1,18 +1,25 @@
3fb8ae4
+option(INSTALL_LEGACY_MATLAB "Install deprecated legacy MATLAB routines" FALSE)
3fb8ae4
 # Install matlab files.
3fb8ae4
 if (COMMON_INSTALL_PATH)
3fb8ae4
   # More Octave friendly would be "share/octave/site/m"
3fb8ae4
-  set (INSTALL_MATLAB_DIR "share/matlab")
3fb8ae4
+  set (INSTALL_MATLAB_DIR "share/octave/packages")
3fb8ae4
 else ()
3fb8ae4
   set (INSTALL_MATLAB_DIR "matlab")
3fb8ae4
 endif ()
3fb8ae4
 file (GLOB MATLAB_FILES geographiclib/[A-Za-z]*.m)
3fb8ae4
-install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib)
3fb8ae4
+install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION})
3fb8ae4
+install (FILES geographiclib/packinfo/DESCRIPTION DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo)
3fb8ae4
 # Install "private" functions
3fb8ae4
 file (GLOB PRIVATE_MATLAB_FILES geographiclib/private/[A-Za-z]*.m)
3fb8ae4
 install (FILES ${PRIVATE_MATLAB_FILES}
3fb8ae4
-  DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib/private)
3fb8ae4
+  DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/private)
3fb8ae4
+install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt
3fb8ae4
+  DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo
3fb8ae4
+  RENAME "COPYING")
3fb8ae4
 # Install "legacy" functions
3fb8ae4
-file (GLOB LEGACY_FILES
3fb8ae4
-  geographiclib-legacy/[A-Za-z]*.m  geographiclib-legacy/[A-Za-z]*.cpp)
3fb8ae4
-install (FILES ${LEGACY_FILES}
3fb8ae4
-  DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy)
3fb8ae4
+if (INSTALL_LEGACY_MATLAB)
3fb8ae4
+  file (GLOB LEGACY_FILES
3fb8ae4
+    geographiclib-legacy/[A-Za-z]*.m  geographiclib-legacy/[A-Za-z]*.cpp)
3fb8ae4
+  install (FILES ${LEGACY_FILES} 
3fb8ae4
+    DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy-${PROJECT_VERSION})
3fb8ae4
+endif()
3fb8ae4
diff -up ./matlab/geographiclib/packinfo/DESCRIPTION.octave ./matlab/geographiclib/packinfo/DESCRIPTION
3fb8ae4
--- ./matlab/geographiclib/packinfo/DESCRIPTION.octave	2015-05-17 11:17:23.793165688 -0400
3fb8ae4
+++ ./matlab/geographiclib/packinfo/DESCRIPTION	2015-05-17 11:17:23.793165688 -0400
3fb8ae4
@@ -0,0 +1,15 @@
3fb8ae4
+Name: geographiclib
7a61ae5
+Version: 1.43
7a61ae5
+Date: 2015-05-22
3fb8ae4
+Author: Charles Karney <charles@karney.com>
3fb8ae4
+Maintainer: Rich Mattes <richmattes@gmail.com>
3fb8ae4
+Title: Octave implemtation of GeographicLib
3fb8ae4
+Description: This toolbox provides native MATLAB implementations of a subset of the
3fb8ae4
+ C++ library, GeographicLib.  Key components of this toolbox are
3fb8ae4
+ * Geodesics, direct, inverse, area calculations.
3fb8ae4
+ * Projections, transverse Mercator, polar stereographic, etc.
3fb8ae4
+ * Grid systems, UTM, UPS, MGRS.
3fb8ae4
+ * Geoid lookup, egm84, egm96, egm2008 geoids supported.
3fb8ae4
+ * Geometric transformations, geocentric, local cartesian.
3fb8ae4
+ * Great ellipse, direct, inverse, area calculations.
3fb8ae4
+Url: http://geographiclib.sf.net/html