distribution/packages/compat/lib32/package.mk

47 lines
1.3 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
PKG_NAME="lib32"
PKG_VERSION="$(date +%Y%m%d)"
PKG_ARCH="aarch64 x86_64"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="GPLv2"
PKG_DEPENDS_TARGET="toolchain retroarch SDL2 libsndfile libmodplug"
PKG_SHORTDESC="ARM 32bit bundle for aarch64"
PKG_PRIORITY="optional"
PKG_TOOLCHAIN="manual"
makeinstall_target() {
case ${TARGET_ARCH} in
aarch64)
LIBARCH="arm"
LDSO="ld-linux-armhf.so.3"
;;
x86_64)
LIBARCH="x86"
LDSO="ld-linux.so.2"
;;
esac
2022-02-05 14:23:32 +00:00
cd ${PKG_BUILD}
LIBROOT="${ROOT}/build.${DISTRO}-${DEVICE}.${LIBARCH}/image/system/"
mkdir -p ${INSTALL}/usr/lib32
rsync -al ${LIBROOT}/usr/lib/* ${INSTALL}/usr/lib32 >/dev/null 2>&1
chmod -f 0755 ${INSTALL}/usr/lib32/* || :
2022-02-05 14:23:32 +00:00
mkdir -p ${INSTALL}/usr/lib
ln -s /usr/lib32/${LDSO} ${INSTALL}/usr/lib/${LDSO}
mkdir -p "${INSTALL}/etc/ld.so.conf.d"
echo "/usr/lib32" > "${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32.conf"
echo "/usr/lib32/pulseaudio" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-pulseaudio.conf"
if [ -d "${LIBROOT}/usr/lib/dri" ]
then
echo "/usr/lib32/dri" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-dri.conf"
fi
2023-03-03 22:30:22 +00:00
if [ -d "${LIBROOT}/usr/lib/gl4es" ]
then
echo "/usr/lib/gl4es" >"${INSTALL}/etc/ld.so.conf.d/${LIBARCH}-lib32-gl4es.conf"
2023-03-03 22:30:22 +00:00
fi
2022-02-05 14:23:32 +00:00
}