This patch ensures that the documentation will be available in
a standard location on Debian GNU/Linux systems.
This patch was designed and applied by the packager, 
Filippo Rusconi <lopippo@debian.org>.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -284,6 +284,9 @@
 	include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/svnversion.cmake) # generate the header once (for VersionInfo.C include)
 endif()
 
+# At this point make a summary of where data and doc will be located:
+message(STATUS "Info: CF_OPENMS_DATA_PATH: ${CF_OPENMS_DATA_PATH}")
+message(STATUS "Info: CF_OPENMS_DOC_PATH: ${CF_OPENMS_DOC_PATH}")
 
 ########################################################
 ###    configure config.h														 ###
--- a/cmake/OpenMSBuildSystem_configh.cmake
+++ b/cmake/OpenMSBuildSystem_configh.cmake
@@ -2,14 +2,14 @@
 ## define some directories
 if ("${INSTALL_PREFIX}" STREQUAL ".")
 	set(CF_OPENMS_DATA_PATH ${PROJECT_SOURCE_DIR}/share/OpenMS CACHE INTERNAL "Path to the shared documents of OpenMS.")
+	set(CF_OPENMS_DOC_PATH ${PROJECT_SOURCE_DIR}/doc CACHE INTERNAL "Path to the documentation of OpenMS.")
 	set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR})
 else()
 	set(CF_OPENMS_DATA_PATH ${INSTALL_PREFIX}/share/OpenMS CACHE INTERNAL "Path to the shared documents of OpenMS.")
+	set(CF_OPENMS_DOC_PATH ${INSTALL_PREFIX}/doc CACHE INTERNAL "Path to the documentation of OpenMS.")
 	set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX})
 endif()
 
-
-
 set(CF_OPENMS_TEST_DATA_PATH ${PROJECT_SOURCE_DIR}/source/TEST/data/ CACHE INTERNAL "Path to the test data")
 
 ## check for Microsoft Visual Studio compiler
--- a/include/OpenMS/config.h.in
+++ b/include/OpenMS/config.h.in
@@ -53,6 +53,9 @@
 // The path to the directory where OpenMS data is installed
 #define OPENMS_DATA_PATH "@CF_OPENMS_DATA_PATH@"
 
+// The path to the directory where OpenMS doc is installed
+#define OPENMS_DOC_PATH "@CF_OPENMS_DOC_PATH@"
+
 // The directory where OpenMS is build
 #define OPENMS_SOURCE_PATH "@PROJECT_SOURCE_DIR@"
 
--- a/source/SYSTEM/File.C
+++ b/source/SYSTEM/File.C
@@ -286,6 +286,9 @@
     search_dirs.push_back(String(OPENMS_BINARY_PATH) + "/doc/");
     search_dirs.push_back(String(OPENMS_SOURCE_PATH) + "/doc/");
     search_dirs.push_back(getOpenMSDataPath() + "/../../doc/");
+#ifdef OPENMS_DOC_PATH
+    search_dirs.push_back(String(OPENMS_DOC_PATH));
+#endif
     
     // needed for OpenMS Mac OS X packages where documentation is stored in <package-root>/Documentation
 #if defined(__APPLE__)
