File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1313ROOT=/omd/sites/$SITE
1414test -d " ${ROOT} " || exit 1
1515
16- TARGET=" :all "
16+ TARGET=" :livestatus_shared_runpath "
1717bazel build " ${TARGET} "
1818EXECUTION_ROOT=$( bazel info execution_root)
1919for FILE in $( bazel cquery --output=files " ${TARGET} " ) ; do
2222 case " ${BASENAME} " in
2323 liblivestatus.so)
2424 install --mode 644 " ${FULL_PATH} " " ${ROOT} /lib/liblivestatus.so.0.1"
25- patchelf --set-rpath " \$ ORIGIN/../lib" " ${ROOT} /lib/liblivestatus.so.0.1"
2625 ;;
2726 esac
2827done
Original file line number Diff line number Diff line change 11load ("@bazel_skylib//rules:build_test.bzl" , "build_test" )
22load ("@rules_pkg//pkg:mappings.bzl" , "pkg_files" , "pkg_mklink" )
33load ("@rules_pkg//pkg:tar.bzl" , "pkg_tar" )
4+ load ("//bazel/rules:patchelf.bzl" , "set_runpath" )
45load ("//bazel/rules:xcomp/cc.bzl" , "cc_library" , "cc_test" )
56
67cc_library (
@@ -78,11 +79,18 @@ cc_shared_library(
7879 ],
7980)
8081
82+ set_runpath (
83+ name = "livestatus_shared_runpath" ,
84+ srcs = [":livestatus_shared" ],
85+ rpaths = ["$ORIGIN" ],
86+ tags = ["manual" ],
87+ )
88+
8189pkg_files (
8290 name = "livestatus_shared_files" ,
83- srcs = [":livestatus_shared " ],
91+ srcs = [":livestatus_shared_runpath " ],
8492 prefix = "lib" ,
85- renames = {":livestatus_shared " : "liblivestatus.so.0.1" },
93+ renames = {":livestatus_shared_runpath " : "liblivestatus.so.0.1" },
8694)
8795
8896pkg_mklink (
You can’t perform that action at this time.
0 commit comments