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-03 23:19:29 +01:00
|
|
|
PACKAGES+=" locales"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" asciidoc"
|
2018-09-26 08:26:51 +02:00
|
|
|
PACKAGES+=" asciidoctor" # Used by weechat for man pages.
|
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"
|
2019-09-16 13:57:55 +02:00
|
|
|
PACKAGES+=" bsdmainutils" # Provides 'hexdump' which is needed for building bitcoin package.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" curl" # Used for fetching sources.
|
2017-05-19 23:54:36 +02:00
|
|
|
PACKAGES+=" ed" # Used by bc
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" flex"
|
2018-09-12 07:07:49 +02:00
|
|
|
PACKAGES+=" g++-multilib" # Used by nodejs build for 32-bit arches.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" gettext" # Provides 'msgfmt' which the apt build uses.
|
2017-11-26 00:41:28 +01:00
|
|
|
PACKAGES+=" g++"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" git" # Used by the neovim build.
|
2017-07-26 14:21:12 +02:00
|
|
|
PACKAGES+=" gperf" # Used by the fontconfig build.
|
2019-12-01 18:33:55 +01:00
|
|
|
PACKAGES+=" groff" # Used by some packages like openldap
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" help2man"
|
|
|
|
PACKAGES+=" intltool" # Used by qalc build.
|
2019-07-13 16:08:57 +02:00
|
|
|
PACKAGES+=" libdbus-1-dev" # Used by dbus-glib build.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" libglib2.0-dev" # Provides 'glib-genmarshal' which the glib build uses.
|
2019-07-24 18:49:02 +02:00
|
|
|
PACKAGES+=" libc-ares-dev" # Used by host build part of nodejs v12.6.0+.
|
|
|
|
PACKAGES+=" libicu-dev" # Used by host build part of nodejs v12.6.0+.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" libtool-bin"
|
2019-12-01 21:49:47 +01:00
|
|
|
PACKAGES+=" libltdl-dev"
|
|
|
|
PACKAGES+=" libsigsegv-dev"
|
2017-05-09 17:00:42 +02:00
|
|
|
PACKAGES+=" libncurses5-dev" # Used by mariadb for host build part.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" lzip"
|
2018-10-21 21:16:53 +02:00
|
|
|
PACKAGES+=" python3.7"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" tar"
|
|
|
|
PACKAGES+=" unzip"
|
|
|
|
PACKAGES+=" m4"
|
2019-08-28 14:23:28 +02:00
|
|
|
PACKAGES+=" pandoc" # For manpage generation for uftrace package.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" pkg-config"
|
2019-11-17 20:26:50 +01:00
|
|
|
PACKAGES+=" python3.8"
|
2017-04-20 09:00:02 +02:00
|
|
|
PACKAGES+=" python3-docutils" # For rst2man, used by mpv.
|
|
|
|
PACKAGES+=" python3-setuptools" # Needed by at least asciinema.
|
2017-07-26 16:13:45 +02:00
|
|
|
PACKAGES+=" python3-sphinx" # Needed by notmuch man page generation.
|
2017-11-26 00:41:28 +01:00
|
|
|
PACKAGES+=" ruby" # Needed to build ruby.
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" scons"
|
|
|
|
PACKAGES+=" texinfo"
|
|
|
|
PACKAGES+=" xmlto"
|
2017-08-11 13:25:55 +02:00
|
|
|
PACKAGES+=" libexpat1-dev" # Needed by ghostscript
|
|
|
|
PACKAGES+=" libjpeg-dev" # Needed by ghostscript
|
2017-08-31 20:16:35 +02:00
|
|
|
PACKAGES+=" gawk" # Needed by apr-util
|
2018-10-30 16:19:19 +01:00
|
|
|
PACKAGES+=" libssl-dev" # Needed to build Rust
|
2019-01-26 15:43:14 +01:00
|
|
|
PACKAGES+=" gnupg" # Needed to verify downloaded .debs
|
2019-03-04 22:08:56 +01:00
|
|
|
PACKAGES+=" jq" # Needed by bintray upload script.
|
2019-03-25 15:12:03 +01:00
|
|
|
PACKAGES+=" lua5.3" # Needed to build luarocks package.
|
2019-03-21 05:42:58 +01:00
|
|
|
PACKAGES+=" python3-recommonmark" # needed for llvm-8 documentation
|
2019-04-27 22:47:56 +02:00
|
|
|
PACKAGES+=" llvm-8-tools" # so we don't build llvm for build
|
2019-07-25 17:13:11 +02:00
|
|
|
PACKAGES+=" valac" # for ccnet
|
2019-04-09 17:16:51 +02:00
|
|
|
PACKAGES+=" openssl" # Needed by swi-prolog
|
2019-12-01 21:06:42 +01:00
|
|
|
PACKAGES+=" zip" # For smalltalk.
|
2019-04-09 17:16:51 +02:00
|
|
|
PACKAGES+=" libssl-dev:i386" # Needed by swi-prolog 32-bit
|
|
|
|
PACKAGES+=" zlib1g-dev:i386"
|
|
|
|
|
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
|