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
|
|
|
|
2020-05-06 16:32:39 +02:00
|
|
|
# To provide /usr/bin/python as symlink to /usr/bin/python3
|
|
|
|
PACKAGES+=" python-is-python3"
|
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# Used by build-package.sh and CI/CD scripts.
|
2020-03-21 15:30:02 +01:00
|
|
|
PACKAGES+=" curl"
|
|
|
|
PACKAGES+=" gnupg"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# 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"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" autogen"
|
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"
|
2019-12-01 21:49:47 +01:00
|
|
|
PACKAGES+=" libltdl-dev"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" libtool-bin"
|
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"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" scdoc"
|
2017-02-02 22:14:46 +01:00
|
|
|
PACKAGES+=" texinfo"
|
|
|
|
PACKAGES+=" xmlto"
|
2020-12-08 00:10:42 +01:00
|
|
|
PACKAGES+=" xmltoman"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Needed by python modules (e.g. asciinema) and some build systems.
|
2020-10-08 16:49:24 +02:00
|
|
|
PACKAGES+=" python3.9"
|
2021-10-06 21:20:04 +02:00
|
|
|
PACKAGES+=" python3.10"
|
2020-06-13 17:49:52 +02:00
|
|
|
PACKAGES+=" python3-pip"
|
2020-01-23 13:01:59 +01:00
|
|
|
PACKAGES+=" python3-setuptools"
|
|
|
|
|
|
|
|
# Needed by package bc.
|
|
|
|
PACKAGES+=" ed"
|
|
|
|
|
|
|
|
# Provides utility hexdump which is needed by package bitcoin.
|
|
|
|
PACKAGES+=" bsdmainutils"
|
|
|
|
|
2021-08-16 15:42:22 +02:00
|
|
|
# Needed by package seafile-client.
|
2020-01-23 13:01:59 +01:00
|
|
|
PACKAGES+=" valac"
|
|
|
|
|
2021-05-29 13:41:04 +02:00
|
|
|
# Needed by package libgcrypt.
|
|
|
|
PACKAGES+=" fig2dev"
|
|
|
|
|
|
|
|
# Needed by package libidn2.
|
|
|
|
PACKAGES+=" gengetopt"
|
|
|
|
|
|
|
|
# Needed by package proxmark3-git.
|
|
|
|
PACKAGES+=" swig"
|
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# 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"
|
|
|
|
|
2020-04-14 22:17:44 +02:00
|
|
|
# Needed by php.
|
|
|
|
PACKAGES+=" re2c"
|
|
|
|
|
2020-12-10 21:05:15 +01:00
|
|
|
# Needed by composer.
|
|
|
|
PACKAGES+=" php"
|
|
|
|
PACKAGES+=" composer"
|
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# Needed by package rust.
|
2018-10-30 16:19:19 +01:00
|
|
|
PACKAGES+=" libssl-dev" # Needed to build Rust
|
2020-05-09 04:13:09 +02:00
|
|
|
PACKAGES+=" clang-10"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
|
|
|
# Needed for package smalltalk.
|
|
|
|
PACKAGES+=" libsigsegv-dev"
|
|
|
|
PACKAGES+=" zip"
|
|
|
|
|
2020-05-07 21:51:19 +02:00
|
|
|
# Needed for package sqlcipher.
|
|
|
|
PACKAGES+=" tcl"
|
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# 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-04-09 17:23:07 +02:00
|
|
|
# For swift.
|
2020-02-17 18:24:10 +01:00
|
|
|
PACKAGES+=" lld"
|
2020-04-09 17:23:07 +02:00
|
|
|
|
2020-05-08 01:23:01 +02:00
|
|
|
# Needed by wrk.
|
|
|
|
PACKAGES+=" luajit"
|
|
|
|
|
2020-05-06 09:16:43 +02:00
|
|
|
# Needed by libduktape (2.5.0 still uses python2 unfortunately)
|
|
|
|
PACKAGES+=" python-yaml"
|
|
|
|
|
2020-03-08 20:44:59 +01:00
|
|
|
# Java.
|
2021-07-29 15:48:28 +02:00
|
|
|
PACKAGES+=" openjdk-8-jdk openjdk-16-jdk"
|
2020-03-08 20:44:59 +01:00
|
|
|
|
2020-08-24 21:21:18 +02:00
|
|
|
# needed by ovmf
|
|
|
|
PACKAGES+=" libarchive-tools"
|
|
|
|
|
2021-06-28 20:27:37 +02:00
|
|
|
# Needed by cavif-rs
|
|
|
|
PACKAGES+=" nasm"
|
|
|
|
|
2021-09-03 22:02:53 +02:00
|
|
|
# Needed by dgsh
|
|
|
|
PACKAGES+=" rsync"
|
|
|
|
|
2021-10-13 09:20:37 +02:00
|
|
|
# Needed by megacmd
|
|
|
|
PACKAGES+=" wget"
|
|
|
|
|
2020-01-23 15:26:10 +01:00
|
|
|
# Needed by packages in unstable repository.
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" comerr-dev"
|
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"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" heimdal-multidev"
|
|
|
|
PACKAGES+=" libconfig-dev"
|
|
|
|
PACKAGES+=" libevent-dev"
|
2020-01-23 18:46:48 +01:00
|
|
|
PACKAGES+=" libgc-dev"
|
|
|
|
PACKAGES+=" libgmp-dev"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" libjansson-dev"
|
2020-06-19 01:54:45 +02:00
|
|
|
PACKAGES+=" libparse-yapp-perl"
|
2020-09-21 19:21:49 +02:00
|
|
|
PACKAGES+=" libreadline-dev"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" libunistring-dev"
|
|
|
|
PACKAGES+=" llvm-10-dev"
|
|
|
|
PACKAGES+=" llvm-10-tools"
|
2020-01-23 15:26:10 +01:00
|
|
|
|
2020-01-23 13:01:59 +01:00
|
|
|
# Needed by packages in X11 repository.
|
2020-06-20 21:46:33 +02:00
|
|
|
PACKAGES+=" alex"
|
2020-03-08 19:31:15 +01:00
|
|
|
PACKAGES+=" docbook-xsl-ns"
|
2020-01-23 13:01:59 +01:00
|
|
|
PACKAGES+=" gnome-common"
|
|
|
|
PACKAGES+=" gobject-introspection"
|
|
|
|
PACKAGES+=" gtk-3-examples"
|
|
|
|
PACKAGES+=" gtk-doc-tools"
|
2020-06-20 21:46:33 +02:00
|
|
|
PACKAGES+=" happy"
|
2020-01-23 15:26:10 +01:00
|
|
|
PACKAGES+=" itstool"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" libdbus-glib-1-dev-bin"
|
2020-01-23 15:26:10 +01:00
|
|
|
PACKAGES+=" libgdk-pixbuf2.0-dev"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" libwayland-dev"
|
2020-05-19 20:32:23 +02:00
|
|
|
PACKAGES+=" python-setuptools"
|
2020-05-05 19:34:34 +02:00
|
|
|
PACKAGES+=" python3-xcbgen"
|
2021-06-04 12:34:15 +02:00
|
|
|
PACKAGES+=" sassc"
|
2020-05-19 15:32:14 +02:00
|
|
|
PACKAGES+=" texlive-extra-utils"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" wayland-scanner++"
|
2020-06-22 15:00:22 +02:00
|
|
|
PACKAGES+=" xfce4-dev-tools"
|
2020-01-23 15:26:10 +01:00
|
|
|
PACKAGES+=" xfonts-utils"
|
2021-03-29 16:01:26 +02:00
|
|
|
PACKAGES+=" xutils-dev"
|
2020-01-23 13:01:59 +01:00
|
|
|
|
2020-05-09 18:37:55 +02:00
|
|
|
# Needed by packages in science repository
|
|
|
|
PACKAGES+=" protobuf-c-compiler"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" sqlite3"
|
2020-05-09 18:37:55 +02:00
|
|
|
|
|
|
|
# Needed by packages in game repository
|
2020-05-09 20:17:56 +02:00
|
|
|
PACKAGES+=" cvs"
|
2021-09-17 09:59:48 +02:00
|
|
|
PACKAGES+=" python3-yaml"
|
2020-05-09 18:37:55 +02:00
|
|
|
|
2020-11-05 16:06:04 +01:00
|
|
|
# Needed by apt.
|
|
|
|
PACKAGES+=" triehash"
|
|
|
|
|
2020-12-08 17:01:57 +01:00
|
|
|
# Needed by aspell dictionaries.
|
|
|
|
PACKAGES+=" aspell"
|
|
|
|
|
2022-01-13 13:02:55 +01:00
|
|
|
# Needed by package kphp.
|
|
|
|
PACKAGES+=" python3-jsonschema"
|
|
|
|
|
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
|
2021-10-05 17:40:30 +02:00
|
|
|
$SUDO apt-get -yq update
|
2016-09-23 02:47:11 +02:00
|
|
|
|
2021-10-05 14:24:32 +02:00
|
|
|
# Newer Python versions for host builds
|
2021-10-05 17:40:30 +02:00
|
|
|
if dpkg --compare-versions $(lsb_release -rs) lt 21.04; then
|
2021-10-05 16:18:27 +02:00
|
|
|
$SUDO add-apt-repository -y ppa:deadsnakes/ppa
|
2021-10-06 02:22:50 +02:00
|
|
|
INSTALL_NEW_PIP3=true
|
2021-10-06 21:20:04 +02:00
|
|
|
PACKAGES+=" python3.10-distutils"
|
2021-10-06 02:22:50 +02:00
|
|
|
else
|
|
|
|
INSTALL_NEW_PIP3=false
|
2021-10-05 14:24:32 +02:00
|
|
|
fi
|
|
|
|
|
2021-12-11 22:18:09 +01:00
|
|
|
$SUDO env 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
|
|
|
|
2021-10-06 02:22:50 +02:00
|
|
|
if $INSTALL_NEW_PIP3; then
|
|
|
|
curl -L --output /tmp/get-pip.py https://bootstrap.pypa.io/pip/get-pip.py
|
|
|
|
$SUDO python3.10 /tmp/get-pip.py
|
|
|
|
rm -f /tmp/get-pip.py
|
|
|
|
fi
|
|
|
|
|
2021-06-21 19:13:02 +02:00
|
|
|
# Pip for python2.
|
|
|
|
curl -L --output /tmp/py2-get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py
|
|
|
|
$SUDO python2 /tmp/py2-get-pip.py
|
|
|
|
rm -f /tmp/py2-get-pip.py
|
|
|
|
|
2021-11-27 13:33:31 +01:00
|
|
|
# Install Nodejs. Needed by Gitea.
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_lts.x | $SUDO bash -
|
|
|
|
$SUDO apt install -y nodejs
|
|
|
|
|
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-10-30 20:34:46 +01:00
|
|
|
. $(dirname "$(realpath "$0")")/properties.sh
|
|
|
|
$SUDO mkdir -p $TERMUX_PREFIX
|
2020-01-06 17:33:55 +01:00
|
|
|
$SUDO chown -R $(whoami) /data
|