Browse Source
Partial compatibility for on-device builds. There is no guarantee that it will be possible to build all available packages and built packages will have same reliability that cross-compiled but should solve "self-hosting" problems as much as possible.emacs-27
Leonid Plyushch
6 years ago
21 changed files with 382 additions and 147 deletions
@ -1,14 +1,30 @@ |
|||
termux_setup_ninja() { |
|||
local NINJA_VERSION=1.9.0 |
|||
local NINJA_FOLDER=$TERMUX_COMMON_CACHEDIR/ninja-$NINJA_VERSION |
|||
if [ ! -x "$NINJA_FOLDER/ninja" ]; then |
|||
mkdir -p "$NINJA_FOLDER" |
|||
local NINJA_ZIP_FILE=$TERMUX_PKG_TMPDIR/ninja-$NINJA_VERSION.zip |
|||
termux_download https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip \ |
|||
"$NINJA_ZIP_FILE" \ |
|||
1b1235f2b0b4df55ac6d80bbe681ea3639c9d2c505c7ff2159a3daf63d196305 |
|||
unzip "$NINJA_ZIP_FILE" -d "$NINJA_FOLDER" |
|||
chmod 755 $NINJA_FOLDER/ninja |
|||
|
|||
if [ -z "$TERMUX_ON_DEVICE_BUILD" ]; then |
|||
if [ ! -x "$NINJA_FOLDER/ninja" ]; then |
|||
mkdir -p "$NINJA_FOLDER" |
|||
local NINJA_ZIP_FILE=$TERMUX_PKG_TMPDIR/ninja-$NINJA_VERSION.zip |
|||
termux_download https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-linux.zip \ |
|||
"$NINJA_ZIP_FILE" \ |
|||
1b1235f2b0b4df55ac6d80bbe681ea3639c9d2c505c7ff2159a3daf63d196305 |
|||
unzip "$NINJA_ZIP_FILE" -d "$NINJA_FOLDER" |
|||
chmod 755 $NINJA_FOLDER/ninja |
|||
fi |
|||
export PATH=$NINJA_FOLDER:$PATH |
|||
else |
|||
if [ "$(dpkg-query -W -f '${db:Status-Status}\n' ninja 2>/dev/null)" != "installed" ]; then |
|||
echo "Package 'ninja' is not installed." |
|||
echo "You can install it with" |
|||
echo |
|||
echo " pkg install ninja" |
|||
echo |
|||
echo "or build it from source with" |
|||
echo |
|||
echo " ./build-package.sh ninja" |
|||
echo |
|||
exit 1 |
|||
fi |
|||
fi |
|||
export PATH=$NINJA_FOLDER:$PATH |
|||
} |
|||
|
@ -1,7 +1,9 @@ |
|||
termux_step_finish_build() { |
|||
echo "termux - build of '$TERMUX_PKG_NAME' done" |
|||
test -t 1 && printf "\033]0;%s - DONE\007" "$TERMUX_PKG_NAME" |
|||
mkdir -p /data/data/.built-packages |
|||
echo "$TERMUX_PKG_FULLVERSION" > "/data/data/.built-packages/$TERMUX_PKG_NAME" |
|||
|
|||
mkdir -p "$TERMUX_BUILT_PACKAGES_DIRECTORY" |
|||
echo "$TERMUX_PKG_FULLVERSION" > "$TERMUX_BUILT_PACKAGES_DIRECTORY/$TERMUX_PKG_NAME" |
|||
|
|||
exit 0 |
|||
} |
|||
|
@ -0,0 +1,45 @@ |
|||
#!/data/data/com.termux/files/usr/bin/sh |
|||
|
|||
PACKAGES="autoconf" |
|||
PACKAGES+=" automake" |
|||
PACKAGES+=" bc" |
|||
PACKAGES+=" bison" |
|||
PACKAGES+=" bzip2" |
|||
PACKAGES+=" clang" |
|||
PACKAGES+=" cmake" |
|||
PACKAGES+=" coreutils" |
|||
PACKAGES+=" curl" |
|||
PACKAGES+=" diffutils" |
|||
PACKAGES+=" ed" |
|||
PACKAGES+=" file" |
|||
PACKAGES+=" findutils" |
|||
PACKAGES+=" flex" |
|||
PACKAGES+=" gawk" |
|||
PACKAGES+=" gettext" |
|||
PACKAGES+=" git" |
|||
PACKAGES+=" golang" |
|||
PACKAGES+=" gperf" |
|||
PACKAGES+=" grep" |
|||
PACKAGES+=" gzip" |
|||
PACKAGES+=" libtool" |
|||
PACKAGES+=" lzip" |
|||
PACKAGES+=" lzop" |
|||
PACKAGES+=" m4" |
|||
PACKAGES+=" make" |
|||
PACKAGES+=" ninja" |
|||
PACKAGES+=" patch" |
|||
PACKAGES+=" perl" |
|||
PACKAGES+=" pkg-config" |
|||
PACKAGES+=" protobuf" |
|||
PACKAGES+=" python" |
|||
PACKAGES+=" python2" |
|||
PACKAGES+=" rust" |
|||
PACKAGES+=" sed" |
|||
PACKAGES+=" tar" |
|||
PACKAGES+=" texinfo" |
|||
PACKAGES+=" unzip" |
|||
PACKAGES+=" xz-utils" |
|||
|
|||
apt update |
|||
apt dist-upgrade -y |
|||
apt install -y $PACKAGES |
Loading…
Reference in new issue