summaryrefslogtreecommitdiff
path: root/brp-ldconfig
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-01-15 06:47:29 +0000
committerCoprDistGit <infra@openeuler.org>2025-01-15 06:47:29 +0000
commit9d624aa4e88e5eb4b0df90060dcd40e518a7458b (patch)
tree70292c74c2ab4db698615e7d823d9357eeaced7f /brp-ldconfig
parent1175fc575d157169d8592e937cba42181d0ec3f2 (diff)
automatic import of openEuler-rpm-config
Diffstat (limited to 'brp-ldconfig')
-rwxr-xr-xbrp-ldconfig16
1 files changed, 16 insertions, 0 deletions
diff --git a/brp-ldconfig b/brp-ldconfig
new file mode 100755
index 0000000..7b2fb15
--- /dev/null
+++ b/brp-ldconfig
@@ -0,0 +1,16 @@
+#!/bin/sh -efu
+
+# If using normal root, avoid changing anything.
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+riscv64_lp64d=0
+if [ "$HOSTTYPE" = "riscv64" -a -e $RPM_BUILD_ROOT/usr/lib64 -a ! -e $RPM_BUILD_ROOT/usr/lib64/lp64d ]; then
+ ln -s . $RPM_BUILD_ROOT/usr/lib64/lp64d
+ riscv64_lp64d=1
+fi
+/sbin/ldconfig -N -r "$RPM_BUILD_ROOT"
+if [ $riscv64_lp64d = 1 ]; then
+ rm -f $RPM_BUILD_ROOT/usr/lib64/lp64d
+fi