-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add pre/post bash packaging scripts Change package install location to /opt/rocm/hipblas Test hipblas install in dockerfile * Update jenkinsfile to apply versioning to packages
- Loading branch information
Kent Knox
authored
May 3, 2017
1 parent
37ab62b
commit 9cc1618
Showing
6 changed files
with
138 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# ######################################################################## | ||
# A helper function to generate packaging scripts to register libraries with system | ||
# ######################################################################## | ||
function( write_rocm_package_script_files scripts_write_dir library_name library_link_name ) | ||
|
||
set( ld_conf_file "/etc/ld.so.conf.d/${library_name}-dev.conf" ) | ||
|
||
file( WRITE ${scripts_write_dir}/postinst | ||
"#!/bin/bash | ||
set -e | ||
do_ldconfig() { | ||
echo ${CPACK_PACKAGING_INSTALL_PREFIX}/${LIB_INSTALL_DIR} > ${ld_conf_file} && ldconfig | ||
} | ||
do_softlinks() { | ||
ln -sr ${CPACK_PACKAGING_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR} ${CPACK_PACKAGING_INSTALL_PREFIX}/../include/${library_name} | ||
ln -sr ${CPACK_PACKAGING_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${library_link_name}.1 ${CPACK_PACKAGING_INSTALL_PREFIX}/../lib/${library_link_name} | ||
ln -sr ${CPACK_PACKAGING_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/cmake/${library_name} ${CPACK_PACKAGING_INSTALL_PREFIX}/../lib/cmake/${library_name} | ||
} | ||
case \"\$1\" in | ||
configure) | ||
do_ldconfig | ||
do_softlinks | ||
;; | ||
abort-upgrade|abort-remove|abort-deconfigure) | ||
echo \"\$1\" | ||
;; | ||
*) | ||
exit 0 | ||
;; | ||
esac | ||
" ) | ||
|
||
file( WRITE ${scripts_write_dir}/prerm | ||
"#!/bin/bash | ||
set -e | ||
rm_ldconfig() { | ||
rm -f ${ld_conf_file} && ldconfig | ||
} | ||
rm_softlinks() { | ||
rm -f ${CPACK_PACKAGING_INSTALL_PREFIX}/../include/${library_name} | ||
rm -f ${CPACK_PACKAGING_INSTALL_PREFIX}/../lib/${library_link_name} | ||
rm -f ${CPACK_PACKAGING_INSTALL_PREFIX}/../lib/cmake/${library_name} | ||
} | ||
case \"\$1\" in | ||
remove|purge) | ||
rm_ldconfig | ||
rm_softlinks | ||
;; | ||
*) | ||
exit 0 | ||
;; | ||
esac | ||
" ) | ||
|
||
endfunction( ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters