Commit 00f279f3 authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: add uninstall script for OTB jira #1303

parent 4dcce212
......@@ -52,6 +52,12 @@ if [ -f "$otb_python_lib" ]; then
"$PATCH_ELF_EXE" "--set-rpath" "$OUT_DIR/lib" "$otb_python_lib"
fi
#install uninstall_otb script
echo "Installing uninstall script for OTB 'uninstall_otb.sh'"
sed -i -E "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/install_manifest.txt"
sed -i -E "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/uninstall_otb.sh"
chmod +x "$OUT_DIR/uninstall_otb.sh"
sed -i -E "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/monteverdi.sh"
chmod +x "$OUT_DIR/monteverdi.sh"
......@@ -74,12 +80,10 @@ EOF
rm -f "$OUT_DIR/make_symlinks"
printf %s\\n ""
printf %s\\n "You MUST source './otbenv.profile' file to use OTB. see next line:"
printf %s\\n ". $OUT_DIR/otbenv.profile"
printf %s\\n "The changes to environment variables from ./otbenv.profile only affect current session."
printf %s\\n "You can also copy above line to ~/.profile to keep those changes permanently!"
printf %s\\n "source './otbenv.profile' file to set required environment variables"
printf %s\\n "eg: '. $OUT_DIR/otbenv.profile'"
printf %s\\n "You can also copy above line to ~/.profile to keep changes permanently!"
printf %s\\n "More documentation can be found in $OUT_DIR/README"
......
#!/bin/sh
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
xargs rm -frv OUT_DIR/install_manifest.txt
rm -f OUT_DIR/mapla.sh
rm -f OUT_DIR/monteverdi.sh
echo "OTB is now uninstalled from OUT_DIR"
......@@ -30,13 +30,27 @@ macro(installer_files)
install( PROGRAMS "${CMAKE_BINARY_DIR}/make_symlinks" DESTINATION ${PKG_STAGE_DIR})
endif()
########### install patchelf( linux only) ##################
if(LINUX)
install( PROGRAMS "${PATCHELF_PROGRAM}" DESTINATION ${PKG_STAGE_DIR})
endif()
file(READ "${OTB_BINARY_DIR}/install_manifest.txt" mfile_lines)
string(
REPLACE
"${CMAKE_INSTALL_PREFIX}"
"OUT_DIR"
mfile_lines_NEW ${mfile_lines} )
file(WRITE "${CMAKE_BINARY_DIR}/install_manifest.txt"
${mfile_lines_NEW})
install(FILES "${CMAKE_BINARY_DIR}/install_manifest.txt"
DESTINATION ${PKG_STAGE_DIR})
install(FILES "Files/uninstall_otb.sh"
DESTINATION ${PKG_STAGE_DIR})
################## otb_loader executable ###################
add_executable(otb_loader ${CMAKE_CURRENT_SOURCE_DIR}/Files/otb_loader.cxx)
target_link_libraries(otb_loader ${CMAKE_DL_LIBS})
install(TARGETS otb_loader DESTINATION ${PKG_STAGE_DIR}/bin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment