From 0933c2df2da1c4910599a86b7364887f6758a2e0 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 21 Dec 2020 19:16:05 +0100 Subject: [PATCH] common/hooks/{pre,post}-install: generalized libdir hook this makes sure we don't have to worry about packages installing stuff in lib32/lib64, it will be automagically symlinked if something is still left over for whatever reason, or if the opposite wordsize directory exists, that will be caught by pkglint --- common/hooks/post-install/00-lib32.sh | 8 -------- common/hooks/post-install/00-libdir.sh | 7 +++++++ common/hooks/pre-install/00-lib32.sh | 9 --------- common/hooks/pre-install/00-libdir.sh | 8 ++++++++ 4 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 common/hooks/post-install/00-lib32.sh create mode 100644 common/hooks/post-install/00-libdir.sh delete mode 100644 common/hooks/pre-install/00-lib32.sh create mode 100644 common/hooks/pre-install/00-libdir.sh diff --git a/common/hooks/post-install/00-lib32.sh b/common/hooks/post-install/00-lib32.sh deleted file mode 100644 index f5c4fa259ec..00000000000 --- a/common/hooks/post-install/00-lib32.sh +++ /dev/null @@ -1,8 +0,0 @@ -# This hook removes the /usr/lib32 symlink on 32-bit systems. - -hook() { - if [ "$XBPS_TARGET_WORDSIZE" = "32" ] && \ - [ "${pkgname}" != "base-files" ]; then - rm -f ${PKGDESTDIR}/usr/lib32 - fi -} diff --git a/common/hooks/post-install/00-libdir.sh b/common/hooks/post-install/00-libdir.sh new file mode 100644 index 00000000000..21c7e35ea95 --- /dev/null +++ b/common/hooks/post-install/00-libdir.sh @@ -0,0 +1,7 @@ +# This hook removes the wordsize specific libdir symlink. + +hook() { + if [ "${pkgname}" != "base-files" ]; then + rm -f ${PKGDESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE} + fi +} diff --git a/common/hooks/pre-install/00-lib32.sh b/common/hooks/pre-install/00-lib32.sh deleted file mode 100644 index 0d97a825758..00000000000 --- a/common/hooks/pre-install/00-lib32.sh +++ /dev/null @@ -1,9 +0,0 @@ -# This hook creates the /usr/lib32 symlink for 32-bit systems. - -hook() { - if [ "$XBPS_TARGET_WORDSIZE" = "32" ] && \ - [ "${pkgname}" != "base-files" ]; then - vmkdir usr/lib - ln -sf lib ${PKGDESTDIR}/usr/lib32 - fi -} diff --git a/common/hooks/pre-install/00-libdir.sh b/common/hooks/pre-install/00-libdir.sh new file mode 100644 index 00000000000..f19f68088ff --- /dev/null +++ b/common/hooks/pre-install/00-libdir.sh @@ -0,0 +1,8 @@ +# This hook creates the wordsize specific libdir symlink. + +hook() { + if [ "${pkgname}" != "base-files" ]; then + vmkdir usr/lib + ln -sf lib ${PKGDESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE} + fi +}