vulkan-loader-android: clean up script

This commit is contained in:
Jia Yuan Lo 2021-08-13 21:50:38 +08:00 committed by Leonid Pliushch
parent 7b0b44ab6c
commit af807e8fbb

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Vulkan Loader for Android"
TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
TERMUX_PKG_REVISION=1
TERMUX_PKG_SKIP_SRC_EXTRACT=true
# Desktop Vulkan Loader
@ -19,21 +20,9 @@ TERMUX_PKG_SKIP_SRC_EXTRACT=true
# The package will symbolic link system provided libvulkan.so to Termux Prefix
# if available
termux_step_extract_into_massagedir() {
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib"
if [ "$TERMUX_ARCH" = "aarch64" ]; then
_ARCH="arm64"
elif [ "$TERMUX_ARCH" = "i686" ]; then
_ARCH="x86"
else
_ARCH="$TERMUX_ARCH"
fi
# aarch64 dont follow the lib64 trend or
# x86_64 dont follow the lib trend
if [ "$TERMUX_ARCH" = "x86_64" ]; then _BITS=64; else _BITS=""; fi
cp "$NDK/platforms/android-${TERMUX_PKG_API_LEVEL}/arch-${_ARCH}/usr/lib${_BITS}/libvulkan.so" \
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/libvulkan.so"
unset _ARCH
termux_step_post_make_install() {
cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/libvulkan.so" \
"$TERMUX_PREFIX/lib/libvulkan.so"
}
termux_step_create_debscripts() {
@ -45,7 +34,7 @@ termux_step_create_debscripts() {
ln -fsT "/system/lib${_BITS}/libvulkan.so" "$TERMUX_PREFIX/lib/libvulkan.so"
fi
EOF
cat <<- EOF > postrm
#!$TERMUX_PREFIX/bin/sh
rm -f "$TERMUX_PREFIX/lib/libvulkan.so"