2020-01-06 17:33:55 +01:00
|
|
|
#!/usr/bin/env bash
|
2017-02-02 22:14:46 +01:00
|
|
|
set -e -u
|
2015-07-27 22:12:06 +02:00
|
|
|
|
|
|
|
PACKAGES=""
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# For en_US.UTF-8 locale.
|
2020-01-03 23:19:29 +01:00
|
|
|
PACKAGES+=" locales"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Used by build-package.sh and CI/CD scripts.
|
|
|
|
PACKAGES+=" curl" # Used for fetching sources.
|
|
|
|
PACKAGES+=" jq"
|
|
|
|
|
|
|
|
# Used for fetching package sources from Git repositories.
|
|
|
|
PACKAGES+=" git"
|
|
|
|
|
|
|
|
# Used for extracting package sources.
|
|
|
|
PACKAGES+=" lzip"
|
|
|
|
PACKAGES+=" tar"
|
|
|
|
PACKAGES+=" unzip"
|
|
|
|
|
|
|
|
# Used by common build systems.
|
|
|
|
PACKAGES+=" autoconf"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" automake"
|
2019-07-21 17:57:09 +02:00
|
|
|
PACKAGES+=" autopoint"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" bison"
|
|
|
|
PACKAGES+=" flex"
|
2017-11-26 00:41:28 +01:00
|
|
|
PACKAGES+=" g++"
|
2020-01-23 13:01:59 +01:00
|
|
|
PACKAGES+=" g++-multilib"
|
|
|
|
PACKAGES+=" gawk"
|
|
|
|
PACKAGES+=" gettext"
|
|
|
|
PACKAGES+=" gperf"
|
|
|
|
PACKAGES+=" intltool"
|
|
|
|
PACKAGES+=" libglib2.0-dev"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" libtool-bin"
|
2019-12-01 21:49:47 +01:00
|
|
|
PACKAGES+=" libltdl-dev"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" m4"
|
|
|
|
PACKAGES+=" pkg-config"
|
|
|
|
PACKAGES+=" scons"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Used to generate package documentation.
|
|
|
|
PACKAGES+=" asciidoc"
|
|
|
|
PACKAGES+=" asciidoctor"
|
|
|
|
PACKAGES+=" groff"
|
|
|
|
PACKAGES+=" help2man"
|
|
|
|
PACKAGES+=" pandoc"
|
|
|
|
PACKAGES+=" python3-docutils"
|
|
|
|
PACKAGES+=" python3-recommonmark"
|
|
|
|
PACKAGES+=" python3-sphinx"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" texinfo"
|
|
|
|
PACKAGES+=" xmlto"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Needed by python modules (e.g. asciinema) and some build systems.
|
|
|
|
PACKAGES+=" python3.7"
|
|
|
|
PACKAGES+=" python3.8"
|
|
|
|
PACKAGES+=" python3-setuptools"
|
|
|
|
|
|
|
|
# Needed by package bc.
|
|
|
|
PACKAGES+=" ed"
|
|
|
|
|
|
|
|
# Provides utility hexdump which is needed by package bitcoin.
|
|
|
|
PACKAGES+=" bsdmainutils"
|
|
|
|
|
|
|
|
# Needed by package ccnet.
|
|
|
|
PACKAGES+=" valac"
|
|
|
|
|
|
|
|
# Needed by package dbus-glib.
|
|
|
|
PACKAGES+=" libdbus-1-dev"
|
|
|
|
|
|
|
|
# Needed by package ghostscript.
|
|
|
|
PACKAGES+=" libexpat1-dev"
|
|
|
|
PACKAGES+=" libjpeg-dev"
|
|
|
|
|
|
|
|
# Needed by package luarocks.
|
|
|
|
PACKAGES+=" lua5.3"
|
|
|
|
|
|
|
|
# Used bt host build of package mariadb.
|
|
|
|
PACKAGES+=" libncurses5-dev"
|
|
|
|
|
|
|
|
# Needed by packages mkvtoolnix and ruby.
|
|
|
|
PACKAGES+=" ruby"
|
|
|
|
|
|
|
|
# Needed by host build of package nodejs.
|
|
|
|
PACKAGES+=" libc-ares-dev"
|
|
|
|
PACKAGES+=" libicu-dev"
|
|
|
|
|
|
|
|
# Needed by package rust.
|
2018-10-30 16:19:19 +01:00
|
|
|
PACKAGES+=" libssl-dev" # Needed to build Rust
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Needed for package smalltalk.
|
|
|
|
PACKAGES+=" libsigsegv-dev"
|
|
|
|
PACKAGES+=" zip"
|
|
|
|
|
|
|
|
# Needed by package swi-prolog.
|
|
|
|
PACKAGES+=" openssl"
|
|
|
|
PACKAGES+=" zlib1g-dev"
|
|
|
|
PACKAGES+=" libssl-dev:i386"
|
2019-04-09 17:16:51 +02:00
|
|
|
PACKAGES+=" zlib1g-dev:i386"
|
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# So we don't build llvm for build.
|
|
|
|
PACKAGES+=" llvm-8-tools"
|
|
|
|
|
2020-01-23 15:26:10 +01:00
|
|
|
# Needed by packages in unstable repository.
|
2020-01-23 18:46:48 +01:00
|
|
|
PACKAGES+=" docbook-to-man"
|
|
|
|
PACKAGES+=" docbook-utils"
|
2020-01-23 20:51:13 +01:00
|
|
|
PACKAGES+=" erlang-nox"
|
2020-01-23 18:46:48 +01:00
|
|
|
PACKAGES+=" libgc-dev"
|
|
|
|
PACKAGES+=" libgmp-dev"
|
|
|
|
PACKAGES+=" libunistring-dev"
|
2020-01-24 23:31:41 +01:00
|
|
|
PACKAGES+=" llvm-9-dev"
|
2020-01-23 15:26:10 +01:00
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# Needed by packages in X11 repository.
|
|
|
|
PACKAGES+=" gnome-common"
|
|
|
|
PACKAGES+=" gobject-introspection"
|
|
|
|
PACKAGES+=" gtk-3-examples"
|
|
|
|
PACKAGES+=" gtk-doc-tools"
|
2020-01-23 15:26:10 +01:00
|
|
|
PACKAGES+=" itstool"
|
|
|
|
PACKAGES+=" libgdk-pixbuf2.0-dev"
|
2020-01-23 18:46:48 +01:00
|
|
|
PACKAGES+=" python-xcbgen"
|
2020-01-23 15:26:10 +01:00
|
|
|
PACKAGES+=" xfonts-utils"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
2020-01-06 17:33:55 +01:00
|
|
|
# Do not require sudo if already running as root.
|
|
|
|
if [ "$(id -u)" = "0" ]; then
|
|
|
|
SUDO=""
|
|
|
|
else
|
|
|
|
SUDO="sudo"
|
|
|
|
fi
|
|
|
|
|
2019-04-09 17:16:51 +02:00
|
|
|
# Allow 32-bit packages.
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO dpkg --add-architecture i386
|
|
|
|
$SUDO apt-get -yq update
|
2016-09-23 02:47:11 +02:00
|
|
|
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO DEBIAN_FRONTEND=noninteractive \
|
2018-05-02 23:00:28 +02:00
|
|
|
apt-get install -yq --no-install-recommends $PACKAGES
|
2015-07-27 22:12:06 +02:00
|
|
|
|
2019-05-28 05:55:26 +02:00
|
|
|
# Find and assign UBUNTU_VERSION
|
|
|
|
if [[ `lsb_release -rs` == "19.04" ]]; then
|
|
|
|
UBUNTU_VERSION="19.04.2"
|
|
|
|
else
|
|
|
|
UBUNTU_VERSION="18.10.1"
|
|
|
|
fi
|
|
|
|
|
2019-04-27 22:47:56 +02:00
|
|
|
# Make openjdk 8 available:
|
2019-05-28 05:55:26 +02:00
|
|
|
curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
|
|
|
|
curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
|
|
|
|
curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
|
|
|
|
curl -O http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO dpkg -i openjdk-8-jre-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jre_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jdk_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jdk-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb || $SUDO apt install -f -y
|
|
|
|
|
|
|
|
rm openjdk-8-jre-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jre_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jdk_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb \
|
|
|
|
openjdk-8-jdk-headless_8u212-b03-0ubuntu1."$UBUNTU_VERSION"_amd64.deb
|
2019-04-27 22:47:56 +02:00
|
|
|
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO locale-gen --purge en_US.UTF-8
|
|
|
|
echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US:en"\n' | $SUDO tee -a /etc/default/locale
|
2020-01-03 23:19:29 +01:00
|
|
|
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO mkdir -p /data/data/com.termux/files/usr
|
|
|
|
$SUDO chown -R $(whoami) /data
|