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
This commit is contained in:
q66 2020-12-21 19:16:05 +01:00 committed by Érico Nogueira Rolim
parent aeb539f635
commit 6283b0d209
4 changed files with 15 additions and 17 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}