Split packaging into binary and dev packages.
Conform with normal packaging behavior where a binary and its development headers are in separate packages. Change-Id: I91c58ea271a8e1c710c213060bca6d58d69287e6
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2014-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2014-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
## this list of conditions and the following disclaimers.
|
## this list of conditions and the following disclaimers.
|
||||||
## - Redistributions in binary form must reproduce the above copyright
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
## notice, this list of conditions and the following disclaimers in
|
## notice, this list of conditions and the following disclaimers in
|
||||||
## the documentation and#or other materials provided with the distribution.
|
## the documentation and/or other materials provided with the distribution.
|
||||||
## - Neither the names of Advanced Micro Devices, Inc,
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
## nor the names of its contributors may be used to endorse or promote
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
## products derived from this Software without specific prior written
|
## products derived from this Software without specific prior written
|
||||||
@@ -40,19 +40,7 @@
|
|||||||
##
|
##
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
cmake_minimum_required ( VERSION 3.5.0 )
|
cmake_minimum_required ( VERSION 3.6.3 )
|
||||||
|
|
||||||
## Cosmetic Cmake version warnings.
|
|
||||||
if(NOT EXISTS VERSION_WARNED)
|
|
||||||
set (VERSION_WARNED FALSE CACHE BOOL "")
|
|
||||||
endif()
|
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "3.6.0" AND NOT ${VERSION_WARNED})
|
|
||||||
message("Your CMake version is too old for full functionality.
|
|
||||||
Generated package file names may be incorrect.
|
|
||||||
Please update to CMake 3.6 or newer to generate correct package file names")
|
|
||||||
set( VERSION_WARNED TRUE CACHE BOOL "Suppress cosmetic build errors due to CMake version after first warning." FORCE )
|
|
||||||
mark_as_advanced( FORCE VERSION_WARNED )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
## Clear target dependency data.
|
## Clear target dependency data.
|
||||||
## Needed to allow UI transitions between static and dynamic builds.
|
## Needed to allow UI transitions between static and dynamic builds.
|
||||||
@@ -315,8 +303,8 @@ install ( TARGETS ${CORE_RUNTIME_TARGET} EXPORT ${CORE_RUNTIME_NAME}Targets
|
|||||||
# TODO: Fix me for flat directory layout. Should be ${CMAKE_INSTALL_INCLUDEDIR}
|
# TODO: Fix me for flat directory layout. Should be ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
|
install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION include/hsa COMPONENT dev )
|
||||||
|
|
||||||
# Legacy symlink.
|
# Legacy symlink - not packaged (CPack is bugged until ~3.18, see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4637)
|
||||||
install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa COMPONENT dirlink)
|
install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa_include_link DESTINATION hsa/include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa )
|
||||||
|
|
||||||
# Legacy symlinks.
|
# Legacy symlinks.
|
||||||
if ( ${BUILD_SHARED_LIBS} )
|
if ( ${BUILD_SHARED_LIBS} )
|
||||||
@@ -388,27 +376,24 @@ set ( CPACK_GENERATOR "DEB;RPM" CACHE STRING "Package types to build")
|
|||||||
set ( ENABLE_LDCONFIG ON CACHE BOOL "Set library links and caches using ldconfig.")
|
set ( ENABLE_LDCONFIG ON CACHE BOOL "Set library links and caches using ldconfig.")
|
||||||
|
|
||||||
## Only pack the "binary" and "dev" components, post install script will add the directory link.
|
## Only pack the "binary" and "dev" components, post install script will add the directory link.
|
||||||
set (CPACK_DEB_COMPONENT_INSTALL ON)
|
set ( CPACK_COMPONENTS_ALL binary dev )
|
||||||
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
|
set ( CPACK_DEB_COMPONENT_INSTALL ON)
|
||||||
set (CPACK_COMPONENTS_ALL binary dev)
|
set ( CPACK_RPM_COMPONENT_INSTALL ON)
|
||||||
|
|
||||||
set ( CPACK_PACKAGE_NAME "hsa-rocr-dev" )
|
|
||||||
set ( CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc." )
|
set ( CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc." )
|
||||||
set ( CPACK_PACKAGE_VERSION ${PACKAGE_VERSION_STRING} )
|
set ( CPACK_PACKAGE_VERSION ${PACKAGE_VERSION_STRING} )
|
||||||
set ( CPACK_PACKAGE_CONTACT "TODO Advanced Micro Devices, Inc." )
|
set ( CPACK_PACKAGE_CONTACT "TODO Advanced Micro Devices, Inc." )
|
||||||
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "AMD Heterogeneous System Architecture HSA - Linux HSA Runtime for Boltzmann (ROCm) platforms" )
|
set ( CPACK_COMPONENT_BINARY_DESCRIPTION "AMD Heterogeneous System Architecture HSA - Linux HSA Runtime for Boltzmann (ROCm) platforms" )
|
||||||
|
set ( CPACK_COMPONENT_DEV_DESCRIPTION "AMD Heterogeneous System Architecture HSA development package.\n This package contains the headers and cmake files for the hsa-rocr package." )
|
||||||
set ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md" )
|
set ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md" )
|
||||||
|
|
||||||
## Process the Debian install/remove scripts to update the CPACK variables
|
|
||||||
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/postinst.in DEBIAN/postinst @ONLY )
|
|
||||||
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/prerm.in DEBIAN/prerm @ONLY )
|
|
||||||
|
|
||||||
if ( DEFINED ENV{ROCM_LIBPATCH_VERSION} )
|
if ( DEFINED ENV{ROCM_LIBPATCH_VERSION} )
|
||||||
set ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.$ENV{ROCM_LIBPATCH_VERSION}" )
|
set ( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.$ENV{ROCM_LIBPATCH_VERSION}" )
|
||||||
message ( "Using CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}" )
|
message ( "Using CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Debian package specific variables
|
# Debian package specific variables
|
||||||
|
set ( CPACK_DEBIAN_BINARY_PACKAGE_NAME "hsa-rocr")
|
||||||
|
set ( CPACK_DEBIAN_DEV_PACKAGE_NAME "hsa-rocr-dev")
|
||||||
if ( DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
|
if ( DEFINED ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
|
set ( CPACK_DEBIAN_PACKAGE_RELEASE $ENV{CPACK_DEBIAN_PACKAGE_RELEASE} )
|
||||||
else()
|
else()
|
||||||
@@ -416,48 +401,63 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
message ( "Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}" )
|
message ( "Using CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_DEBIAN_PACKAGE_RELEASE}" )
|
||||||
set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" )
|
set ( CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_DEPENDS "hsakmt-roct" )
|
|
||||||
set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/RadeonOpenCompute/ROCR-Runtime" )
|
set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/RadeonOpenCompute/ROCR-Runtime" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "DEBIAN/postinst;DEBIAN/prerm" )
|
|
||||||
|
|
||||||
# Declare that this package will replace functionality provided by hsa-ext-rocr-dev package
|
## Process the Debian install/remove scripts to update the CPACK variables
|
||||||
|
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Binary/postinst.in DEBIAN/Binary/postinst @ONLY )
|
||||||
|
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Binary/prerm.in DEBIAN/Binary/prerm @ONLY )
|
||||||
|
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Dev/postinst.in DEBIAN/Dev/postinst @ONLY )
|
||||||
|
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/DEBIAN/Dev/prerm.in DEBIAN/Dev/prerm @ONLY )
|
||||||
|
|
||||||
|
set ( CPACK_DEBIAN_BINARY_PACKAGE_CONTROL_EXTRA "DEBIAN/Binary/postinst;DEBIAN/Binary/prerm" )
|
||||||
|
set ( CPACK_DEBIAN_DEV_PACKAGE_CONTROL_EXTRA "DEBIAN/Dev/postinst;DEBIAN/Dev/prerm" )
|
||||||
|
|
||||||
|
# Declare package relationships (hsa-ext-rocr-dev is a legacy package that we subsume)
|
||||||
|
set ( CPACK_DEBIAN_BINARY_PACKAGE_DEPENDS "hsakmt-roct" )
|
||||||
|
set ( CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "hsa-rocr" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_BREAKS "hsa-ext-rocr-dev" )
|
set ( CPACK_DEBIAN_PACKAGE_BREAKS "hsa-ext-rocr-dev" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_PROVIDES "hsa-ext-rocr-dev, hsa-rocr, hsa-rocr-dev" )
|
set ( CPACK_DEBIAN_PACKAGE_PROVIDES "hsa-ext-rocr-dev" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_REPLACES "hsa-ext-rocr-dev" )
|
set ( CPACK_DEBIAN_PACKAGE_REPLACES "hsa-ext-rocr-dev" )
|
||||||
set ( CPACK_DEBIAN_PACKAGE_CONFLICTS "hsa-ext-rocr-dev" )
|
set ( CPACK_DEBIAN_PACKAGE_CONFLICTS "hsa-ext-rocr-dev" )
|
||||||
|
|
||||||
|
|
||||||
# RPM package specific variables
|
# RPM package specific variables
|
||||||
|
set ( CPACK_RPM_BINARY_PACKAGE_NAME "hsa-rocr" )
|
||||||
|
set ( CPACK_RPM_DEV_PACKAGE_NAME "hsa-rocr-devel" )
|
||||||
if ( DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE} )
|
if ( DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE} )
|
||||||
set ( CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE} )
|
set ( CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE} )
|
||||||
else()
|
else()
|
||||||
set ( CPACK_RPM_PACKAGE_RELEASE "local" )
|
set ( CPACK_RPM_PACKAGE_RELEASE "local" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# 'dist' breaks manual builds on debian systems due to empty Provides
|
|
||||||
execute_process( COMMAND rpm --eval %{?dist}
|
execute_process( COMMAND rpm --eval %{?dist}
|
||||||
RESULT_VARIABLE PROC_RESULT
|
RESULT_VARIABLE PROC_RESULT
|
||||||
OUTPUT_VARIABLE EVAL_RESULT
|
OUTPUT_VARIABLE EVAL_RESULT
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||||
message("RESULT_VARIABLE ${PROC_RESULT} OUTPUT_VARIABLE: ${EVAL_RESULT}")
|
|
||||||
|
|
||||||
if ( PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "" )
|
if ( PROC_RESULT EQUAL "0" AND NOT EVAL_RESULT STREQUAL "" )
|
||||||
string ( APPEND CPACK_RPM_PACKAGE_RELEASE "%{?dist}" )
|
string ( APPEND CPACK_RPM_PACKAGE_RELEASE "%{?dist}" )
|
||||||
endif()
|
endif()
|
||||||
set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" )
|
set ( CPACK_RPM_FILE_NAME "RPM-DEFAULT" )
|
||||||
message("CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
|
message("CPACK_RPM_PACKAGE_RELEASE: ${CPACK_RPM_PACKAGE_RELEASE}")
|
||||||
set ( CPACK_RPM_PACKAGE_DEPENDS "hsakmt-roct" )
|
|
||||||
|
|
||||||
# Declare that this package will replace functionality provided by hsa-ext-rocr-dev package
|
## Process the Rpm install/remove scripts to update the CPACK variables
|
||||||
set ( CPACK_RPM_PACKAGE_PROVIDES "hsa-ext-rocr-dev hsa-rocr hsa-rocr-devel" )
|
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/Binary/post.in" RPM/Binary/post @ONLY )
|
||||||
|
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/Binary/postun.in" RPM/Binary/postun @ONLY )
|
||||||
|
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/Dev/post.in" RPM/Dev/post @ONLY )
|
||||||
|
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/Dev/postun.in" RPM/Dev/postun @ONLY )
|
||||||
|
|
||||||
|
set ( CPACK_RPM_BINARY_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Binary/post" )
|
||||||
|
set ( CPACK_RPM_BINARY_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Binary/postun" )
|
||||||
|
set ( CPACK_RPM_DEV_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Dev/post" )
|
||||||
|
set ( CPACK_RPM_DEV_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/Dev/postun" )
|
||||||
|
|
||||||
|
# Declare package relationships (hsa-ext-rocr-dev is a legacy package that we subsume)
|
||||||
|
set ( CPACK_RPM_BINARY_PACKAGE_REQUIRES "hsakmt-roct" )
|
||||||
|
set ( CPACK_RPM_BINARY_PACKAGE_PROVIDES "hsa-ext-rocr-dev" )
|
||||||
|
set ( CPACK_RPM_DEV_PACKAGE_REQUIRES "hsa-rocr" )
|
||||||
|
set ( CPACK_RPM_DEV_PACKAGE_PROVIDES "hsa-ext-rocr-dev hsa-rocr-dev" )
|
||||||
set ( CPACK_RPM_PACKAGE_OBSOLETES "hsa-ext-rocr-dev" )
|
set ( CPACK_RPM_PACKAGE_OBSOLETES "hsa-ext-rocr-dev" )
|
||||||
set ( CPACK_RPM_PACKAGE_CONFLICTS "hsa-ext-rocr-dev" )
|
set ( CPACK_RPM_PACKAGE_CONFLICTS "hsa-ext-rocr-dev" )
|
||||||
|
|
||||||
## Process the Rpm install/remove scripts to update the CPACK variables
|
|
||||||
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/post.in" RPM/post @ONLY )
|
|
||||||
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/RPM/postun.in" RPM/postun @ONLY )
|
|
||||||
|
|
||||||
set ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/post" )
|
|
||||||
set ( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/RPM/postun" )
|
|
||||||
|
|
||||||
## Include packaging
|
## Include packaging
|
||||||
include ( CPack )
|
include ( CPack )
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
##
|
||||||
|
## The University of Illinois/NCSA
|
||||||
|
## Open Source License (NCSA)
|
||||||
|
##
|
||||||
|
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
##
|
||||||
|
## Developed by:
|
||||||
|
##
|
||||||
|
## AMD Research and AMD HSA Software Development
|
||||||
|
##
|
||||||
|
## Advanced Micro Devices, Inc.
|
||||||
|
##
|
||||||
|
## www.amd.com
|
||||||
|
##
|
||||||
|
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
## of this software and associated documentation files (the "Software"), to
|
||||||
|
## deal with the Software without restriction, including without limitation
|
||||||
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
|
##
|
||||||
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimers.
|
||||||
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
|
## notice, this list of conditions and the following disclaimers in
|
||||||
|
## the documentation and/or other materials provided with the distribution.
|
||||||
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
|
## products derived from this Software without specific prior written
|
||||||
|
## permission.
|
||||||
|
##
|
||||||
|
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
## DEALINGS WITH THE SOFTWARE.
|
||||||
|
##
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
||||||
|
do_ldconfig() {
|
||||||
|
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
||||||
|
echo @CPACK_PACKAGING_INSTALL_PREFIX@/lib > /etc/ld.so.conf.d/hsa-rocr.conf
|
||||||
|
ldconfig
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
( configure )
|
||||||
|
do_ldconfig
|
||||||
|
;;
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
echo "$1"
|
||||||
|
;;
|
||||||
|
( * )
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2020-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -19,14 +19,14 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
## this list of conditions and the following disclaimers.
|
## this list of conditions and the following disclaimers.
|
||||||
## - Redistributions in binary form must reproduce the above copyright
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
## notice, this list of conditions and the following disclaimers in
|
## notice, this list of conditions and the following disclaimers in
|
||||||
## the documentation and#or other materials provided with the distribution.
|
## the documentation and/or other materials provided with the distribution.
|
||||||
## - Neither the names of Advanced Micro Devices, Inc,
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
## nor the names of its contributors may be used to endorse or promote
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
## products derived from this Software without specific prior written
|
## products derived from this Software without specific prior written
|
||||||
@@ -47,7 +47,7 @@ set -e
|
|||||||
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
||||||
rm_ldconfig() {
|
rm_ldconfig() {
|
||||||
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
||||||
rm -f /etc/ld.so.conf.d/hsa-rocr-dev.conf
|
rm -f /etc/ld.so.conf.d/hsa-rocr.conf
|
||||||
ldconfig
|
ldconfig
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -55,8 +55,6 @@ rm_ldconfig() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
( remove )
|
( remove )
|
||||||
rm_ldconfig
|
rm_ldconfig
|
||||||
# Workaround for CPACK directory symlink handling error.
|
|
||||||
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/hsa
|
|
||||||
;;
|
;;
|
||||||
( purge )
|
( purge )
|
||||||
;;
|
;;
|
||||||
+3
-12
@@ -5,7 +5,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2020-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -19,14 +19,14 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
## this list of conditions and the following disclaimers.
|
## this list of conditions and the following disclaimers.
|
||||||
## - Redistributions in binary form must reproduce the above copyright
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
## notice, this list of conditions and the following disclaimers in
|
## notice, this list of conditions and the following disclaimers in
|
||||||
## the documentation and#or other materials provided with the distribution.
|
## the documentation and/or other materials provided with the distribution.
|
||||||
## - Neither the names of Advanced Micro Devices, Inc,
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
## nor the names of its contributors may be used to endorse or promote
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
## products derived from this Software without specific prior written
|
## products derived from this Software without specific prior written
|
||||||
@@ -44,17 +44,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
|
||||||
do_ldconfig() {
|
|
||||||
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
|
||||||
echo @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/lib > /etc/ld.so.conf.d/hsa-rocr-dev.conf
|
|
||||||
ldconfig
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
( configure )
|
( configure )
|
||||||
do_ldconfig
|
|
||||||
# Workaround for CPACK directory symlink handling error.
|
# Workaround for CPACK directory symlink handling error.
|
||||||
mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include
|
mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include
|
||||||
ln -sf ../../include/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa
|
ln -sf ../../include/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
##
|
||||||
|
## The University of Illinois/NCSA
|
||||||
|
## Open Source License (NCSA)
|
||||||
|
##
|
||||||
|
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
##
|
||||||
|
## Developed by:
|
||||||
|
##
|
||||||
|
## AMD Research and AMD HSA Software Development
|
||||||
|
##
|
||||||
|
## Advanced Micro Devices, Inc.
|
||||||
|
##
|
||||||
|
## www.amd.com
|
||||||
|
##
|
||||||
|
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
## of this software and associated documentation files (the "Software"), to
|
||||||
|
## deal with the Software without restriction, including without limitation
|
||||||
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
|
##
|
||||||
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimers.
|
||||||
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
|
## notice, this list of conditions and the following disclaimers in
|
||||||
|
## the documentation and/or other materials provided with the distribution.
|
||||||
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
|
## products derived from this Software without specific prior written
|
||||||
|
## permission.
|
||||||
|
##
|
||||||
|
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
## DEALINGS WITH THE SOFTWARE.
|
||||||
|
##
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
( remove )
|
||||||
|
# Workaround for CPACK directory symlink handling error.
|
||||||
|
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/hsa
|
||||||
|
;;
|
||||||
|
( purge )
|
||||||
|
;;
|
||||||
|
( * )
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2016-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
## this list of conditions and the following disclaimers.
|
## this list of conditions and the following disclaimers.
|
||||||
## - Redistributions in binary form must reproduce the above copyright
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
## notice, this list of conditions and the following disclaimers in
|
## notice, this list of conditions and the following disclaimers in
|
||||||
## the documentation and#or other materials provided with the distribution.
|
## the documentation and/or other materials provided with the distribution.
|
||||||
## - Neither the names of Advanced Micro Devices, Inc,
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
## nor the names of its contributors may be used to endorse or promote
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
## products derived from this Software without specific prior written
|
## products derived from this Software without specific prior written
|
||||||
@@ -42,6 +42,6 @@
|
|||||||
|
|
||||||
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
||||||
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
||||||
echo @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/lib > /etc/ld.so.conf.d/hsa-rocr-dev.conf
|
echo @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/lib > /etc/ld.so.conf.d/hsa-rocr.conf
|
||||||
ldconfig
|
ldconfig
|
||||||
fi
|
fi
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2016-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
## this list of conditions and the following disclaimers.
|
## this list of conditions and the following disclaimers.
|
||||||
## - Redistributions in binary form must reproduce the above copyright
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
## notice, this list of conditions and the following disclaimers in
|
## notice, this list of conditions and the following disclaimers in
|
||||||
## the documentation and#or other materials provided with the distribution.
|
## the documentation and/or other materials provided with the distribution.
|
||||||
## - Neither the names of Advanced Micro Devices, Inc,
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
## nor the names of its contributors may be used to endorse or promote
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
## products derived from this Software without specific prior written
|
## products derived from this Software without specific prior written
|
||||||
@@ -42,6 +42,6 @@
|
|||||||
|
|
||||||
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
# left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
|
||||||
if [ $1 -eq 0 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
if [ $1 -eq 0 ] && [ "@ENABLE_LDCONFIG@" == "ON" ]; then
|
||||||
rm -f /etc/ld.so.conf.d/hsa-rocr-dev.conf
|
rm -f /etc/ld.so.conf.d/hsa-rocr.conf
|
||||||
ldconfig
|
ldconfig
|
||||||
fi
|
fi
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
################################################################################
|
||||||
|
##
|
||||||
|
## The University of Illinois/NCSA
|
||||||
|
## Open Source License (NCSA)
|
||||||
|
##
|
||||||
|
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
##
|
||||||
|
## Developed by:
|
||||||
|
##
|
||||||
|
## AMD Research and AMD HSA Software Development
|
||||||
|
##
|
||||||
|
## Advanced Micro Devices, Inc.
|
||||||
|
##
|
||||||
|
## www.amd.com
|
||||||
|
##
|
||||||
|
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
## of this software and associated documentation files (the "Software"), to
|
||||||
|
## deal with the Software without restriction, including without limitation
|
||||||
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
|
##
|
||||||
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimers.
|
||||||
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
|
## notice, this list of conditions and the following disclaimers in
|
||||||
|
## the documentation and/or other materials provided with the distribution.
|
||||||
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
|
## products derived from this Software without specific prior written
|
||||||
|
## permission.
|
||||||
|
##
|
||||||
|
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
## DEALINGS WITH THE SOFTWARE.
|
||||||
|
##
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Workaround for CPACK directory symlink handling error.
|
||||||
|
mkdir -p @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include
|
||||||
|
ln -sf ../../include/hsa @CPACK_PACKAGING_INSTALL_PREFIX@/hsa/include/hsa
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
################################################################################
|
||||||
|
##
|
||||||
|
## The University of Illinois/NCSA
|
||||||
|
## Open Source License (NCSA)
|
||||||
|
##
|
||||||
|
## Copyright (c) 2016-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
##
|
||||||
|
## Developed by:
|
||||||
|
##
|
||||||
|
## AMD Research and AMD HSA Software Development
|
||||||
|
##
|
||||||
|
## Advanced Micro Devices, Inc.
|
||||||
|
##
|
||||||
|
## www.amd.com
|
||||||
|
##
|
||||||
|
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
## of this software and associated documentation files (the "Software"), to
|
||||||
|
## deal with the Software without restriction, including without limitation
|
||||||
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
## and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
|
##
|
||||||
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimers.
|
||||||
|
## - Redistributions in binary form must reproduce the above copyright
|
||||||
|
## notice, this list of conditions and the following disclaimers in
|
||||||
|
## the documentation and/or other materials provided with the distribution.
|
||||||
|
## - Neither the names of Advanced Micro Devices, Inc,
|
||||||
|
## nor the names of its contributors may be used to endorse or promote
|
||||||
|
## products derived from this Software without specific prior written
|
||||||
|
## permission.
|
||||||
|
##
|
||||||
|
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
## DEALINGS WITH THE SOFTWARE.
|
||||||
|
##
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
# Workaround for CPACK directory symlink handling error.
|
||||||
|
rm -rf @CPACK_PACKAGING_INSTALL_PREFIX@/hsa
|
||||||
|
fi
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
## The University of Illinois/NCSA
|
## The University of Illinois/NCSA
|
||||||
## Open Source License (NCSA)
|
## Open Source License (NCSA)
|
||||||
##
|
##
|
||||||
## Copyright (c) 2020-2020, Advanced Micro Devices, Inc. All rights reserved.
|
## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
|
||||||
##
|
##
|
||||||
## Developed by:
|
## Developed by:
|
||||||
##
|
##
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
## of this software and associated documentation files (the "Software"), to
|
## of this software and associated documentation files (the "Software"), to
|
||||||
## deal with the Software without restriction, including without limitation
|
## deal with the Software without restriction, including without limitation
|
||||||
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
## and#or sell copies of the Software, and to permit persons to whom the
|
## and or sell copies of the Software, and to permit persons to whom the
|
||||||
## Software is furnished to do so, subject to the following conditions:
|
## Software is furnished to do so, subject to the following conditions:
|
||||||
##
|
##
|
||||||
## - Redistributions of source code must retain the above copyright notice,
|
## - Redistributions of source code must retain the above copyright notice,
|
||||||
|
|||||||
Reference in New Issue
Block a user