resources: dependencies: pureos: switch to install_packages.
The goal is to minimize the difference with the resources/dependencies/trisquel script. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
35d70e38f6
commit
7d171f9275
|
@ -26,6 +26,18 @@
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
|
to_install=""
|
||||||
|
install_packages()
|
||||||
|
{
|
||||||
|
for package in $@ ; do
|
||||||
|
if dpkg -l "${package}" | grep "^ii" 2>&1>/dev/null ; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
to_install="${to_install} ${package}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
if [ $EUID -ne 0 ]; then
|
if [ $EUID -ne 0 ]; then
|
||||||
printf "This script must be run as root\n"
|
printf "This script must be run as root\n"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -36,80 +48,84 @@ fi
|
||||||
# This is so that they can moved to separate scripts.
|
# This is so that they can moved to separate scripts.
|
||||||
#
|
#
|
||||||
|
|
||||||
apt install -y --allow-reinstall install wget
|
install_packages wget
|
||||||
|
|
||||||
# For downloading source code
|
# For downloading source code
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install git
|
install_packages git
|
||||||
|
|
||||||
# For Tianocore and iPXE
|
# For Tianocore and iPXE
|
||||||
# TODO: check whether this is the full list
|
# TODO: check whether this is the full list
|
||||||
|
|
||||||
apt install -y --allow-reinstall install uuid-dev nasm
|
install_packages uuid-dev nasm
|
||||||
|
|
||||||
# For building source code:
|
# For building source code:
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install build-essential
|
install_packages build-essential
|
||||||
|
|
||||||
# for running the crostool script (to get mrc.bin file for t440p)
|
# for running the crostool script (to get mrc.bin file for t440p)
|
||||||
apt install -y --allow-reinstall install sharutils curl parted e2fsprogs unzip
|
install_packages sharutils curl parted e2fsprogs unzip
|
||||||
|
|
||||||
# to use the right software versions and links for compiling
|
# to use the right software versions and links for compiling
|
||||||
apt install -y --allow-reinstall install pkg-config
|
install_packages pkg-config
|
||||||
|
|
||||||
# for cross-compiling ARM binaries
|
# for cross-compiling ARM binaries
|
||||||
apt install -y --allow-reinstall install gcc-arm-linux-gnueabi
|
install_packages gcc-arm-linux-gnueabi
|
||||||
|
|
||||||
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
|
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
|
||||||
arch=${?}
|
arch=${?}
|
||||||
|
|
||||||
# For cross-compiling i686 target on x86_64 host.
|
# For cross-compiling i686 target on x86_64 host.
|
||||||
if [ "${arch}" -eq 0 ]; then
|
if [ "${arch}" -eq 0 ]; then
|
||||||
apt install -y --allow-reinstall install gcc-multilib libc6-i386 libc6-dev-i386
|
install_packages gcc-multilib libc6-i386 libc6-dev-i386
|
||||||
apt install -y --allow-reinstall install lib32stdc++6 g++-multilib dh-autoreconf
|
install_packages lib32stdc++6 g++-multilib dh-autoreconf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Memtest86+ build dependencies
|
# Memtest86+ build dependencies
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install build-essential python2.7 python-is-python3
|
install_packages build-essential python2.7 python-is-python3
|
||||||
|
|
||||||
# i945-pwm build dependencies
|
# i945-pwm build dependencies
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install build-essential perl
|
install_packages build-essential perl
|
||||||
|
|
||||||
# Coreboot build dependencies (also requires build-essential and git)
|
# Coreboot build dependencies (also requires build-essential and git)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install libncurses5-dev doxygen acpica-tools gdb flex bison build-essential git libssl-dev gnat
|
install_packages libncurses5-dev doxygen acpica-tools gdb flex bison build-essential git libssl-dev gnat
|
||||||
|
|
||||||
# GRUB build dependencies (also requires build-essential, bison and flex)
|
# GRUB build dependencies (also requires build-essential, bison and flex)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install fonts-unifont libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev libfont-freetype-perl automake autotools-dev build-essential bison flex libfuse-dev liblzma-dev gawk libdevmapper-dev libtool-bin libfreetype6-dev
|
install_packages fonts-unifont libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev libfont-freetype-perl automake autotools-dev build-essential bison flex libfuse-dev liblzma-dev gawk libdevmapper-dev libtool-bin libfreetype6-dev
|
||||||
|
|
||||||
# BucTS build dependencies (external script)
|
# BucTS build dependencies (external script)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install build-essential
|
install_packages build-essential
|
||||||
|
|
||||||
# Flashrom build dependencies (also requires build-essential)
|
# Flashrom build dependencies (also requires build-essential)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
apt install -y --allow-reinstall install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0-0
|
install_packages libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0-0
|
||||||
|
|
||||||
# For cross-compiling i686 target on x86_64 host.
|
# For cross-compiling i686 target on x86_64 host.
|
||||||
[ "${arch}" -eq 0 ] && apt install -y --allow-reinstall install lib32z1-dev
|
[ "${arch}" -eq 0 ] && install_packages lib32z1-dev
|
||||||
|
|
||||||
# For running make check
|
# For running make check
|
||||||
# ----------------------
|
# ----------------------
|
||||||
apt install -y --allow-reinstall install shellcheck # lint
|
install_packages shellcheck # lint
|
||||||
apt install -y --allow-reinstall install gawk git grep lzip make sed tar xz-utils # u-boot-libre
|
install_packages gawk git grep lzip make sed tar xz-utils # u-boot-libre
|
||||||
|
|
||||||
# For building the website tarball
|
# For building the website tarball
|
||||||
apt install -y --allow-reinstall install \
|
install_packages \
|
||||||
graphviz \
|
graphviz \
|
||||||
pandoc
|
pandoc
|
||||||
|
|
||||||
|
if [ -n "${to_install}" ] ; then
|
||||||
|
apt install -y ${to_install}
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue