Use the /usr directory instead of /opt.
This commit is contained in:
parent
fe1cf70770
commit
40ff865489
|
@ -78,12 +78,13 @@ target_compile_definitions(ybcon PRIVATE YBCON_VERSION="${CODENAME} ${PROJECT_VE
|
|||
set(PNAME ${PROJECT_NAME}-${CODENAME}-${TIME})
|
||||
if (UNIX AND NOT MINGW)
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_INSTALL_PREFIX "/opt")
|
||||
set(CMAKE_INSTALL_PREFIX "/usr")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PNAME}_lpkg")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/scripts/postinst")
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA})
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/postinst" "processed/postinst" @ONLY)
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/processed/postinst")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CPACK_RPM_POST_INSTALL_SCRIPT_FILE})
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.14), libstdc++6 (>= 9)")
|
||||
set(CPACK_DEBIAN_COMPRESSION_TYPE lzma)
|
||||
set(CPACK_RPM_COMPRESSION_TYPE lzma)
|
||||
|
@ -110,7 +111,7 @@ if (UNIX AND NOT MINGW)
|
|||
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/completions DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ybcon.d)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ybcon
|
||||
DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR})
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
elseif(MINGW OR MSVC)
|
||||
set(CMAKE_INSTALL_PREFIX "C:\\progs\\${PROJECT_NAME}")
|
||||
|
|
|
@ -1 +1 @@
|
|||
cd ./cmake-build-release/ && clear && ./ybcon -printresult ../examples/HelloWorld.ybcon
|
||||
cd ./cmake-build-release/ && clear && ./ybcon --printresult ../examples/HelloWorld.ybcon
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
# Post install ybcon script
|
||||
|
||||
ybconDir="/opt/share/ybcon.d"
|
||||
ln -sf "/opt/yerbacon/bin/ybcon" "/usr/bin/ybcon"
|
||||
ybconDir="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/ybcon.d"
|
||||
fishLoc="/usr/share/fish/vendor_completions.d"
|
||||
bashcompleteLoc="/etc/bash_completion.d"
|
||||
zshLoc="/etc/zsh_completion.d"
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
EXENAME=ybcon
|
||||
|
||||
# Default location of the executable
|
||||
defaultBinLocation=/opt/libexec/ybcon
|
||||
scriptDir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
|
||||
|
||||
# Location of the executable
|
||||
defaultBinLocation="$scriptDir/../libexec/ybcon"
|
||||
|
||||
usage() {
|
||||
if [ "$1" = false ]; then echo "Invalid arguments, usage:"; fi
|
||||
|
|
Loading…
Reference in New Issue