Skip to content

Commit

Permalink
[irods#7371] Add curl to development package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SwooshyCueb authored and alanking committed Mar 25, 2024
1 parent 55e8a22 commit 207a1f5
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,40 +54,33 @@ endif()

set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)

# identify proper curl packages for debian
get_filename_component(CURL_LIBRARY_REALPATH ${CURL_LIBRARY} REALPATH)
get_filename_component(CURL_LIBRARY_REALNAME ${CURL_LIBRARY_REALPATH} NAME_WE)
if (CURL_LIBRARY_REALNAME STREQUAL "libcurl-gnutls")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-gnutls")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-gnutls-dev")
elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl-nss")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-nss")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-nss-dev")
elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV "libcurl4-openssl-dev")
endif()

#######################################
## Runtime package
#######################################
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_NAME "irods-runtime")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_PROVIDES "irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION})")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libfuse2, libxml2, openssl, ${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL}, libgcc-s1, libstdc++6")
if (OPENSSL_VERSION VERSION_LESS "3.0.0")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libssl1.1, libfuse2, libxml2, openssl, libgcc-s1, libstdc++6")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, libssl1.1")
else()
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, libc6, sudo, libssl3, libfuse2, libxml2, openssl, libgcc-s1, libstdc++6")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, libssl3")
endif()
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_REPLACES "irods-server (<< 4.2.10-2~)")

get_filename_component(CURL_LIBRARY_REALPATH ${CURL_LIBRARY} REALPATH)
get_filename_component(CURL_LIBRARY_REALNAME ${CURL_LIBRARY_REALPATH} NAME_WE)
if (CURL_LIBRARY_REALNAME STREQUAL "libcurl-gnutls")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-gnutls")
elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl-nss")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3-nss")
elseif (CURL_LIBRARY_REALNAME STREQUAL "libcurl")
if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "ubuntu")
if (IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR GREATER_EQUAL "18")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3")
endif()
elseif (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "debian")
if (IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR GREATER_EQUAL "10")
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl4")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS_CURL "libcurl3")
endif()
endif()
endif()
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS "${CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME_UPPERCASE}_PACKAGE_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL}")

set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_RUNTIME_NAME}_PACKAGE_NAME "irods-runtime")
if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "opensuse")
Expand Down Expand Up @@ -153,12 +146,13 @@ endif()
## Development package
#######################################
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_NAME "irods-dev")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), libssl-dev")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_DEPENDS "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime (= ${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}), libssl-dev, libcurl-dev")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS_CURL_DEV}")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_PROVIDES "irods-dev (= ${CPACK_DEBIAN_PACKAGE_VERSION})")
set(CPACK_DEBIAN_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME_UPPERCASE}_PACKAGE_REPLACES "irods-runtime (<< 4.3.0~)")

set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_NAME "irods-devel")
set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime = ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}")
set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${IRODS_DEVELOP_DEPENDENCIES_STRING}, irods-runtime = ${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}, libcurl-devel")
if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "opensuse")
set(CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES "${CPACK_RPM_${IRODS_PACKAGE_COMPONENT_DEVELOPMENT_NAME}_PACKAGE_REQUIRES}, libopenssl-devel")
else()
Expand Down

0 comments on commit 207a1f5

Please sign in to comment.