summaryrefslogtreecommitdiff
path: root/brp-ldconfig
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-09-18 07:06:26 +0000
committerCoprDistGit <infra@openeuler.org>2024-09-18 07:06:26 +0000
commitd68770f6939ab160ff27ec4e65ccc88cd3677bd0 (patch)
tree5fc00dcf6a9f1ac8a974f9d3b42e07001796a3b6 /brp-ldconfig
parentc22cb56acddf5bc4147f60908d5ebd770a079070 (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