alinaliBQ commented on code in PR #49787:
URL: https://github.com/apache/arrow/pull/49787#discussion_r3112744002
##########
cpp/src/arrow/flight/sql/odbc/CMakeLists.txt:
##########
@@ -159,6 +159,85 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
set(CPACK_WIX_UI_BANNER
"${CMAKE_CURRENT_SOURCE_DIR}/install/windows/arrow-wix-banner.bmp")
+ else()
+ set(ODBC_UNIX_FILE_NAME
+
"ArrowFlightSqlOdbcODBC-${CPACK_PACKAGE_VERSION_MAJOR}.${ODBC_PACKAGE_VERSION_MINOR}.${ODBC_PACKAGE_VERSION_PATCH}"
+ )
+ if(APPLE)
+ set(CPACK_PACKAGE_FILE_NAME "${ODBC_UNIX_FILE_NAME}")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
+
+ set(CPACK_SET_DESTDIR ON)
+ set(CPACK_INSTALL_PREFIX "/Library/ODBC")
+ # Register ODBC after install
+ set(CPACK_POSTFLIGHT_ARROW_FLIGHT_SQL_ODBC_SCRIPT
+ "${CMAKE_CURRENT_SOURCE_DIR}/install/mac/postinstall")
+ set(CPACK_RESOURCE_FILE_README
"${CMAKE_CURRENT_SOURCE_DIR}/install/mac/README.txt")
+ set(CPACK_RESOURCE_FILE_WELCOME
+ "${CMAKE_CURRENT_SOURCE_DIR}/install/mac/Welcome.txt")
+
+ set(ODBC_INSTALL_DIR "arrow-odbc/lib")
+ set(DOC_INSTALL_DIR "arrow-odbc/doc")
+ else()
+ # Linux
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
+ if(${ODBC_PACKAGE_FORMAT} STREQUAL "DEB")
+ # GH-49595 TODO: implement DEB installer
+ message(STATUS "ODBC_PACKAGE_FORMAT DEB not implemented, see GH-49595")
+ elseif(${ODBC_PACKAGE_FORMAT} STREQUAL "RPM")
+ set(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
+ set(CPACK_GENERATOR RPM)
+ set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
+ "${CMAKE_CURRENT_SOURCE_DIR}/install/linux/rpm/postinstall")
+ set(CPACK_RPM_FILE_NAME "${ODBC_UNIX_FILE_NAME}.rpm")
+ # Disable dependency check as ODBC embeds all third party dependencies
+ set(CPACK_RPM_PACKAGE_AUTOREQPROV "no")
+ set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
+ set(CPACK_RPM_COMPONENT_INSTALL ON)
+ else()
+ message(FATAL_ERROR "ODBC_PACKAGE_FORMAT '${ODBC_PACKAGE_FORMAT}' must
be DEB or RPM for Linux installer."
+ )
+ endif()
Review Comment:
The code changes for RPM installer are ready for review. This PR contains
code changes that are dependent on https://github.com/apache/arrow/pull/49766
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]