termux-packages/packages/termux-api/build.sh
Fredrik Fornwall 8353c56c0b Modify setup in wrappers for /system/bin/ commands
On several devices several tools in /system/bin/ requires
LD_LIBRARY_PATH to contain /system/lib(64). Check for the bit-ness
with `getprop ro.product.cpu.abilist64`  and setup the environment
accordingly.

Closes #193.
Closes #206.
2016-04-10 20:20:17 -04:00

15 lines
567 B
Bash

TERMUX_PKG_HOMEPAGE=http://termux.com/add-ons/api/
TERMUX_PKG_DESCRIPTION="Termux API commands"
TERMUX_PKG_VERSION=0.14
termux_step_make_install () {
mkdir -p $TERMUX_PREFIX/bin
local TERMUX_API_BINARY=$TERMUX_PREFIX/libexec/termux-api
cd $TERMUX_PKG_BUILDER_DIR
for file in `ls termux-* | grep -v termux-api.c`; do
sed "s|@TERMUX_API@|$TERMUX_API_BINARY|" $file > $TERMUX_PREFIX/bin/$file
chmod +x $TERMUX_PREFIX/bin/$file
done
$CC $CFLAGS -std=c11 -Wall -Wextra -pedantic -Werror $LDFLAGS termux-api.c -o $TERMUX_API_BINARY
}