Debian Codegraph @

DEBIAN/Binary/postinst.in

raw
1 #!/bin/bash
2
3 ################################################################################
4 ##
5 ## The University of Illinois/NCSA
6 ## Open Source License (NCSA)
7 ##
8 ## Copyright (c) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
9 ##
10 ## Developed by:
11 ##
12 ## AMD Research and AMD HSA Software Development
13 ##
14 ## Advanced Micro Devices, Inc.
15 ##
16 ## www.amd.com
17 ##
18 ## Permission is hereby granted, free of charge, to any person obtaining a copy
19 ## of this software and associated documentation files (the "Software"), to
20 ## deal with the Software without restriction, including without limitation
21 ## the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 ## and/or sell copies of the Software, and to permit persons to whom the
23 ## Software is furnished to do so, subject to the following conditions:
24 ##
25 ## - Redistributions of source code must retain the above copyright notice,
26 ## this list of conditions and the following disclaimers.
27 ## - Redistributions in binary form must reproduce the above copyright
28 ## notice, this list of conditions and the following disclaimers in
29 ## the documentation and/or other materials provided with the distribution.
30 ## - Neither the names of Advanced Micro Devices, Inc,
31 ## nor the names of its contributors may be used to endorse or promote
32 ## products derived from this Software without specific prior written
33 ## permission.
34 ##
35 ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36 ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37 ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38 ## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
39 ## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
40 ## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41 ## DEALINGS WITH THE SOFTWARE.
42 ##
43 ################################################################################
44
45 set -e
46
47 # left-hand term originates from @ENABLE_LDCONFIG@ = ON/OFF at package build
48 do_ldconfig() {
49 if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
50 echo @CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ > /etc/ld.so.conf.d/rocr-runtime.conf
51 ldconfig
52 fi
53 }
54
55 case "$1" in
56 ( configure )
57 do_ldconfig
58 ;;
59 ( abort-upgrade | abort-remove | abort-deconfigure )
60 echo "$1"
61 ;;
62 ( * )
63 exit 0
64 ;;
65 esac