0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-04 18:45:52 +00:00
termux-packages/packages/swift/swift-runtime-aarch64.subpackage.sh
2024-11-12 13:08:55 +05:30

21 lines
882 B
Bash

TERMUX_SUBPKG_DESCRIPTION="Swift runtime libraries for Android AArch64"
TERMUX_SUBPKG_INCLUDE="opt/ndk-multilib/aarch64-linux-android/lib/lib[_FXs]*.so"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_DEPEND_ON_PARENT=false
TERMUX_SUBPKG_DEPENDS="ndk-multilib"
termux_step_create_subpkg_debscripts() {
local file
for file in postinst prerm; do
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
-e "s|@TERMUX_PACKAGE_FORMAT@|${TERMUX_PACKAGE_FORMAT}|g" \
-e "s|@SWIFT_TRIPLE@|aarch64-linux-android|g" \
$TERMUX_PKG_BUILDER_DIR/trigger-header > "${file}"
done
sed 's|@COMMAND@|ln -sf "'$TERMUX_PREFIX'/opt/ndk-multilib/aarch64-linux-android/lib/lib$so.so" "$install_path"|' \
$TERMUX_PKG_BUILDER_DIR/trigger-command >> postinst
sed 's|@COMMAND@|rm -f "$install_path/lib$so.so"|' \
$TERMUX_PKG_BUILDER_DIR/trigger-command >> prerm
chmod 0700 postinst prerm
}