orhankislal commented on code in PR #603:
URL: https://github.com/apache/madlib/pull/603#discussion_r1202311618


##########
src/ports/greenplum/cmake/FindGreenplum_6.cmake:
##########
@@ -17,3 +17,64 @@
 
 set(_FIND_PACKAGE_FILE "${CMAKE_CURRENT_LIST_FILE}")
 include("${CMAKE_CURRENT_LIST_DIR}/FindGreenplum.cmake")
+
+function(add_gppkg GPDB_VERSION GPDB_VARIANT GPDB_VARIANT_SHORT 
UPGRADE_SUPPORT)
+    string(TOLOWER ${GPDB_VERSION} GPDB_VERSION_LC)
+    string(REPLACE "." "_" VERSION_ "${GPDB_VERSION}")
+
+    # Get information about the rhel version
+    rh_version(RH_VERSION)
+    string(REGEX MATCH "([0-9])" RH_MAJOR_VERSION "${RH_VERSION}")
+
+    file(WRITE 
"${CMAKE_BINARY_DIR}/deploy/gppkg/${GPDB_VARIANT}_${VERSION_}_gppkg.cmake" "
+    file(MAKE_DIRECTORY
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/BUILD\"
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/SPECS\"
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/RPMS\"
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/gppkg\"
+    )
+
+    set(GPDB_VERSION \"${GPDB_VERSION}\")
+    set(GPDB_VERSION_LC \"${GPDB_VERSION_LC}\")
+    set(GPDB_VARIANT \"${GPDB_VARIANT}\")
+    set(GPDB_VARIANT_SHORT \"${GPDB_VARIANT_SHORT}\")
+    set(UPGRADE_SUPPORT \"${UPGRADE_SUPPORT}\")
+    set(RH_MAJOR_VERSION \"${RH_MAJOR_VERSION}\")
+    string(TOLOWER \"${GPDB_VARIANT}\" PORT_NAME)
+
+    configure_file(
+        madlib.spec.in
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/SPECS/madlib.spec\"
+    )
+    configure_file(
+        gppkg_spec.yml.in
+        \"\${CMAKE_CURRENT_BINARY_DIR}/${GPDB_VERSION}/gppkg/gppkg_spec.yml\"
+    )
+
+    if(GPPKG_BINARY AND RPMBUILD_BINARY)

Review Comment:
   This PR is for the madlib2-master so the focus is on GP7+ & PG13+. GP6 has 
py3 capabilities via an extension so it is deemphasised. 



-- 
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: dev-unsubscr...@madlib.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to