Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
d75c2f20
Commit
d75c2f20
authored
Apr 22, 2016
by
Rashad Kanavath
Browse files
PKG: write startup script and .profile using pkgsetup
parent
3795fdb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
SuperBuild/CMake/PackageHelper.cmake
View file @
d75c2f20
...
...
@@ -148,23 +148,17 @@ function(install_common include_mvd)
# one for debugging..
# install(CODE "message(\"CMake/PackageHelper.cmake:install_common(${outdir})\n${vars}\n\")")
#For Unixes we make them in the *pkgsetup.in
##################### install environment source ##########################
if
(
WIN32 OR CMAKE_CROSSCOMPILING
)
set
(
ENV_SOURCE_FILE
S
"
${
PACKAGE_SUPPORT_FILES_DIR
}
/otbenv.cmd"
"
${
PACKAGE_SUPPORT_FILES_DIR
}
/otbenv.profile"
)
elseif
(
UNIX
)
set
(
ENV_SOURCE_FILES
"
${
PACKAGE_SUPPORT_FILES_DIR
}
/otbenv.profile"
)
foreach
(
ENV_SOURCE_FILE
"
${
PACKAGE_SUPPORT_FILES_DIR
}
/otbenv.cmd"
"
${
PACKAGE_SUPPORT_FILES_DIR
}
/otbenv.profile"
)
if
(
EXISTS
${
ENV_SOURCE_FILE
}
)
install
(
FILES
${
ENV_SOURCE_FILE
}
DESTINATION
${
PKG_STAGE_DIR
}
)
endif
(
)
endforeach
(
)
endif
()
foreach
(
ENV_SOURCE_FILE
${
ENV_SOURCE_FILES
}
)
if
(
EXISTS
${
ENV_SOURCE_FILE
}
)
install
(
FILES
${
ENV_SOURCE_FILE
}
DESTINATION
${
PKG_STAGE_DIR
}
)
endif
()
endforeach
()
####################### install cli and gui scripts ###########################
file
(
GLOB PKG_APP_SCRIPTS
${
OTB_INSTALL_DIR
}
/bin/otbcli*
...
...
@@ -347,7 +341,8 @@ function(configure_package)
list
(
APPEND PKG_PEFILES
"
${
CMAKE_INSTALL_PREFIX
}
/bin/
${
EXE_FILE
}${
EXE_EXT
}
"
)
endif
()
if
(
NOT UNIX
)
#For Unixes we write the startup script in the *pkgsetup.in
if
(
WIN32 OR CMAKE_CROSSCOMPILING
)
if
(
DEFINED Monteverdi_SOURCE_DIR
)
if
(
EXISTS
${
Monteverdi_SOURCE_DIR
}
/Packaging/
${
EXE_FILE
}${
SCR_EXT
}
)
install
(
PROGRAMS
...
...
@@ -356,7 +351,7 @@ function(configure_package)
"
${
PKG_STAGE_DIR
}
"
)
endif
()
endif
()
endif
(
NOT UNIX
)
endif
(
WIN32 OR CMAKE_CROSSCOMPILING
)
endforeach
()
file
(
GLOB OTB_APPS_LIST
${
OTB_APPLICATIONS_DIR
}
/otbapp_
${
LIB_EXT
}
)
# /lib/otb
...
...
SuperBuild/Packaging/linux_pkgsetup.in
View file @
d75c2f20
...
...
@@ -22,6 +22,39 @@ for bin_file in $BINARY_FILES; do
fi
done
cat
>
$OUT_DIR
/monteverdi.sh
<<
EOF
#!/bin/sh
export LC_NUMERIC=C
export OTB_APPLICATION_PATH=
$OUT_DIR
/lib/otb/applications
export GDAL_DATA=
$OUT_DIR
/share/gdal
export GEOTIFF_CSV=
$OUT_DIR
/share/epsg_csv
$OUT_DIR
/bin/monteverdi "
\$
@"
EOF
chmod
+x
$OUT_DIR
/monteverdi.sh
cat
>
$OUT_DIR
/mapla.sh
<<
EOF
#!/bin/sh
export LC_NUMERIC=C
export OTB_APPLICATION_PATH=
$OUT_DIR
/lib/otb/applications
export GDAL_DATA=
$OUT_DIR
/share/gdal
export GEOTIFF_CSV=
$OUT_DIR
/share/epsg_csv
$OUT_DIR
/bin/mapla "
\$
@"
EOF
chmod
+x
$OUT_DIR
/mapla.sh
cat
>
$OUT_DIR
/otbenv.profile
<<
EOF
#!/bin/sh
PATH=
\$
PATH:
$OUT_DIR
/bin
GDAL_DATA=
$OUT_DIR
/share/gdal
GEOTIFF_CSV=
$OUT_DIR
/share/espg_csv
export LC_NUMERIC=C
export PATH
export GDAL_DATA
export GEOTIFF_CSV
EOF
# echo "Creating symbolic links..."
.
./make_symlinks
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment