unify dependencies scripts

the unified logic is so small that i simply added it
to the main "build" script

commands are identical. example:

./build dependencies debian

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-08-20 21:17:02 +01:00
parent 023d6b6996
commit 9031bb7ba7
13 changed files with 90 additions and 681 deletions

22
lbmk
View File

@ -40,10 +40,13 @@ main()
buildpath="./resources/scripts/${0##*/}" buildpath="./resources/scripts/${0##*/}"
mode="${1}" mode="${1}"
./.gitcheck if [ "${mode}" = "dependencies" ]; then
if [ "${mode}" != "dependencies" ]; then install_dependencies $@ || die "Could not install dependencies"
./resources/scripts/misc/versioncheck exit 0
fi fi
./.gitcheck
[ "${mode}" != "dependencies" ] && \
./resources/scripts/misc/versioncheck
if [ "${mode}" = help ]; then if [ "${mode}" = help ]; then
usage $0 usage $0
exit 0 exit 0
@ -80,6 +83,19 @@ main()
./.gitcheck clean ./.gitcheck clean
} }
install_dependencies()
{
[ -f "resources/dependencies/${2}" ] || die "Unsupported target"
aur_notice=""
. "resources/dependencies/${2}"
${pkg_add} ${pkglist} || die "Error installing dependencies"
[ "${aur_notice}" != "" ] && \
printf "You must install these AUR packages: %s\n" \
"${aur_notice}" 1>&2
}
# Takes exactly one mode as parameter # Takes exactly one mode as parameter
listoptions() listoptions()
{ {

10
resources/dependencies/arch Executable file
View File

@ -0,0 +1,10 @@
pkg_add="pacman -S --needed --noconfirm"
pkglist=" \
wget git nasm perl-libwww python subversion base-devel sharutils curl parted \
e2fsprogs unzip arm-none-eabi-gcc base-devel python base-devel perl ncurses \
doxygen acpica gdb flex bison base-devel git openssl gcc-ada autogen help2man \
base-devel bison flex ttf-dejavu texinfo rsync python libusb xz gawk \
device-mapper fuse2 gettext freetype2 base-devel libpciaccess pciutils zlib \
libftdi base-devel libusb innoextract p7zip unar cmake swig dtc \
"
aur_notice="unifont bdf-unifont"

18
resources/dependencies/debian Executable file
View File

@ -0,0 +1,18 @@
pkg_add="apt-get -y install"
pkglist=" \
wget git uuid-dev nasm build-essential sharutils curl parted e2fsprogs unzip \
pkg-config gcc-arm-linux-gnueabi \
build-essential python3 \
build-essential perl python3-setuptools libncurses5-dev doxygen iasl gdb flex \
bison build-essential git libssl-dev gnat python-is-python3 \
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 libfreetype6-dev \
gettext unifont bc bison build-essential device-tree-compiler efitools flex \
libfdt-dev liblz4-tool libgnutls28-dev libncurses-dev libpython3-dev libsdl2-dev \
libssl-dev lz4 lzma lzma-alone openssl pkg-config python3 python3-distutils \
python3-pkg-resources python3-pycryptodome python3-pyelftools swig uuid-dev \
build-essential libpci-dev pciutils zlib1g-dev libftdi-dev build-essential \
libusb-1.0-0-dev libusb-1.0 libusb-1.0-0-dev libusb-dev cmake \
innoextract p7zip p7zip-full unar \
"

10
resources/dependencies/fedora38 Executable file
View File

@ -0,0 +1,10 @@
pkg_add="dnf -y install"
pkglist=" \
wget git pandoc nasm perl-libwww-perl python3 subversion gcc sharutils curl \
parted e2fsprogs unzip arm-none-eabi-gcc-cs gcc python3 gcc perl gcc-gnat \
ncurses-devel doxygen acpica-tools gdb flex bison gcc git openssl-devel gprbuild \
bzip2 unifont-fonts unifont unifont-ttf-fonts autogen help2man gcc bison flex \
dejavu-fonts-all texinfo rsync python3 libusb xz gawk device-mapper fuse gettext \
freetype-devel intltool libselinux-devel gcc pciutils-devel zlib-devel \
libftdi-devel gcc libusb-devel cmake innoextract p7zip p7zip-plugins unar \
"

10
resources/dependencies/parabola Executable file
View File

@ -0,0 +1,10 @@
pkg_add="pacman -S --needed --noconfirm"
pkglist=" \
wget git nasm perl-libwww python subversion base-devel sharutils curl parted \
e2fsprogs unzip arm-none-eabi-gcc base-devel python base-devel perl ncurses \
doxygen acpica gdb flex bison base-devel git openssl gcc-ada autogen help2man \
base-devel bison flex ttf-dejavu texinfo rsync python libusb xz gawk \
device-mapper fuse2 gettext freetype2 base-devel libpciaccess pciutils zlib \
libftdi base-devel libusb innoextract p7zip unar swig dtc cmake unifont-utils \
bdf-unifont \
"

View File

@ -0,0 +1,13 @@
pkg_add="apt-get -y install"
pkglist=" \
wget git uuid-dev nasm build-essential sharutils curl parted e2fsprogs unzip \
pkg-config gcc-arm-linux-gnueabi gcc-multilib libc6-i386 libc6-dev-i386 \
lib32stdc++6 g++-multilib dh-autoreconf lib32tinfo-dev build-essential python3 \
build-essential perl libncurses5-dev doxygen iasl gdb flex bison build-essential \
git libssl-dev gnat lib32ncurses5-dev ttf-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 libfreetype6-dev gettext build-essential libpci-dev \
pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0 \
libusb-1.0-0-dev libusb-dev lib32z1-dev cmake innoextract p7zip p7zip-full unar \
"

10
resources/dependencies/void Executable file
View File

@ -0,0 +1,10 @@
pkg_add="xbps-install -y"
pkglist=" \
wget git nasm perl-LWP python subversion base-devel sharutils curl parted \
e2fsprogs unzip cross-arm-none-eabi-gcc base-devel python base-devel perl \
ncurses doxygen acpica-utils gdb flex bison base-devel git openssl gcc-ada \
ncurses-devel font-unifont-bdf autogen help2man base-devel bison flex \
dejavu-fonts-ttf texinfo rsync python3 libusb xz gawk device-mapper fuse gettext \
gettext-devel freetype base-devel libpciaccess pciutils zlib libftdi1 \
base-devel libusb cmake innoextract p7zip unar \
"

View File

@ -1,108 +0,0 @@
#!/usr/bin/env sh
# arch script: installs build dependencies for Arch Linux
#
# Copyright (C) 2021 Melissa Goad <mszoopers@protonmail.com>
# Copyright (C) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (C) 2023 Andreas Hartmann <andreas@ohok.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
pacman -S --needed --noconfirm wget
# For downloading source code
# ------------------------------------------------------------
pacman -S --needed --noconfirm git
# For Tianocore and iPXE
# TODO: check whether this is the full list
pacman -S --needed --noconfirm nasm perl-libwww python subversion
# For building source code:
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel
# for running the crostool script (to get mrc.bin file for t440p)
pacman -S --needed --noconfirm sharutils curl parted e2fsprogs unzip
# for cross-compiling ARM binaries
pacman -S --needed --noconfirm arm-none-eabi-gcc
# Memtest86+ build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel python
# i945-pwm build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel perl
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
pacman -S --needed --noconfirm ncurses doxygen acpica gdb flex bison \
base-devel git openssl gcc-ada
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
pacman -S --needed --noconfirm autogen help2man base-devel bison flex \
ttf-dejavu texinfo rsync python libusb xz gawk device-mapper \
fuse2 gettext freetype2
# BucTS build dependencies (external script)
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
pacman -S --needed --noconfirm libpciaccess pciutils zlib libftdi \
base-devel libusb
# Management engine extraction dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm innoextract p7zip unar
# UEFIExtract
# ------------
pacman -S --needed --noconfirm cmake
# U-Boot build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm swig dtc
printf "You also need unifont and bdf-unifont from AUR, to build GRUB:\n"
printf "https://aur.archlinux.org/pkgbase/unifont\n"
printf "https://aur.archlinux.org/pkgbase/bdf-unifont\n"

View File

@ -1,138 +0,0 @@
#!/usr/bin/env sh
# ubuntu2004 script: installs build dependencies for Ubuntu 20.04
#
# Copyright (C) 2014, 2015, 2021 Leah Rowe <info@minifree.org>
# Copyright (C) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
set -e
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
apt-get -y install wget
# For downloading source code
# ------------------------------------------------------------
apt-get -y install git
# For Tianocore and iPXE
# TODO: check whether this is the full list
apt-get -y install uuid-dev nasm
# For building source code:
# ------------------------------------------------------------
apt-get -y install build-essential
# for running the crostool script (to get mrc.bin file for t440p)
apt-get -y install sharutils curl parted e2fsprogs unzip
# to use the right software versions and links for compiling
apt-get -y install pkg-config
# for cross-compiling ARM binaries
apt-get -y install gcc-arm-linux-gnueabi
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
arch=${?}
# For cross-compiling i686 target on x86_64 host.
if [ "${arch}" -eq 0 ]; then
apt-get -y install gcc-multilib libc6-i386 libc6-dev-i386
apt-get -y install lib32stdc++6 g++-multilib dh-autoreconf
# recommended, but not sure what for:
apt-get -y install lib32tinfo-dev
fi
# Memtest86+ build dependencies
# ------------------------------------------------------------
apt-get -y install build-essential python3
# i945-pwm build dependencies
# ------------------------------------------------------------
apt-get -y install build-essential perl
# u-boot needed this
apt-get -y install python3-setuptools
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
apt-get -y install libncurses5-dev doxygen iasl gdb flex bison \
build-essential git libssl-dev gnat python-is-python3
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32ncurses5-dev
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
apt-get -y 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 \
libfreetype6-dev gettext
apt-get -y install unifont
# U-Boot build dependencies
# -------------------------
apt-get -y install bc bison build-essential device-tree-compiler efitools \
flex libfdt-dev liblz4-tool libgnutls28-dev libncurses-dev \
libpython3-dev libsdl2-dev libssl-dev lz4 lzma lzma-alone \
openssl pkg-config python3 python3-distutils \
python3-pkg-resources python3-pycryptodome \
python3-pyelftools swig uuid-dev
# BucTS build dependencies (external script)
# ------------------------------------------------------------
apt-get -y install build-essential
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev \
build-essential libusb-1.0-0-dev libusb-1.0 \
libusb-1.0-0-dev libusb-dev
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev
# UEFIExtract
# ------------
apt-get -y install cmake
# Blobs building dependencies (for me)
# ------------------------------------------------------------
apt-get -y install innoextract p7zip p7zip-full unar

View File

@ -1,103 +0,0 @@
#!/usr/bin/env sh
# Fedora script: installs build dependencies for Fedora
#
# Copyright (C) 2021 Melody Goad <mszoopers@protonmail.com>
# Copyright (C) 2021 Wei Mingzhi <whistler@member.fsf.org>
# Copyright (C) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
dnf -y install wget
# For downloading source code
# ------------------------------------------------------------
dnf -y install git
# For building the documentation
# ------------------------------------------------------------
dnf -y install pandoc
# For Tianocore and iPXE
# TODO: check whether this is the full list
dnf -y install nasm perl-libwww-perl python3 subversion
# For building source code:
# ------------------------------------------------------------
dnf -y install gcc
# for running the crostool script (to get mrc.bin file for t440p)
dnf -y install sharutils curl parted e2fsprogs unzip
# for cross-compiling ARM binaries
dnf -y install arm-none-eabi-gcc-cs
# Memtest86+ build dependencies
# ------------------------------------------------------------
dnf -y install gcc python3
# i945-pwm build dependencies
# ------------------------------------------------------------
dnf -y install gcc perl
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
dnf -y install gcc-gnat ncurses-devel doxygen acpica-tools gdb flex bison \
gcc git openssl-devel gprbuild bzip2
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
dnf -y install unifont-fonts unifont unifont-ttf-fonts autogen help2man \
gcc bison flex dejavu-fonts-all texinfo rsync python3 \
libusb xz gawk device-mapper fuse gettext freetype-devel \
intltool libselinux-devel
# BucTS build dependencies (external script)
# ------------------------------------------------------------
dnf -y install gcc
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
dnf -y install pciutils-devel zlib-devel libftdi-devel gcc libusb-devel
# UEFIExtract
# ------------
dnf -y install cmake
# For extracting IntelME from lenovo updates (X230 etc)
dnf -y install innoextract p7zip p7zip-plugins unar

View File

@ -1,113 +0,0 @@
#!/usr/bin/env sh
# parabola script: installs build dependencies for Parabola GNU/Linux-libre
# based on the arch script
#
# Copyright (C) 2021 Melissa Goad <mszoopers@protonmail.com>
# Copyright (C) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (C) 2023 Andreas Hartmann <andreas@ohok.org>
# Copyright (C) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
pacman -S --needed --noconfirm wget
# For downloading source code
# ------------------------------------------------------------
pacman -S --needed --noconfirm git
# For Tianocore and iPXE
# TODO: check whether this is the full list
pacman -S --needed --noconfirm nasm perl-libwww python subversion
# For building source code:
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel
# for running the crostool script (to get mrc.bin file for t440p)
pacman -S --needed --noconfirm sharutils curl parted e2fsprogs unzip
# for cross-compiling ARM binaries
pacman -S --needed --noconfirm arm-none-eabi-gcc
# Memtest86+ build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel python
# i945-pwm build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel perl
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
pacman -S --needed --noconfirm ncurses doxygen acpica gdb flex bison \
base-devel git openssl gcc-ada
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
pacman -S --needed --noconfirm autogen help2man base-devel bison flex \
ttf-dejavu texinfo rsync python libusb xz gawk \
device-mapper fuse2 gettext freetype2
# BucTS build dependencies (external script)
# ------------------------------------------------------------
pacman -S --needed --noconfirm base-devel
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
pacman -S --needed --noconfirm libpciaccess pciutils zlib \
libftdi base-devel libusb
# Management engine extraction dependencies
#
# ------------------------------------------------------------
pacman -S --needed --noconfirm innoextract p7zip unar
# U-Boot build dependencies
# ------------------------------------------------------------
pacman -S --needed --noconfirm swig dtc
# UEFIExtract
# ------------
pacman -S --needed --noconfirm cmake
# Unifont, for GRUB
# ------------------------------------------------------------
pacman -S --needed --noconfirm unifont-utils bdf-unifont

View File

@ -1,120 +0,0 @@
#!/usr/bin/env sh
# ubuntu2004 script: installs build dependencies for Ubuntu 20.04
#
# Copyright (C) 2014, 2015, 2021 Leah Rowe <info@minifree.org>
# Copyright (C) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
apt-get -y install wget
# For downloading source code
# ------------------------------------------------------------
apt-get -y install git
# For Tianocore and iPXE
# TODO: check whether this is the full list
apt-get -y install uuid-dev nasm
# For building source code:
# ------------------------------------------------------------
apt-get -y install build-essential
# for running the crostool script (to get mrc.bin file for t440p)
apt-get -y install sharutils curl parted e2fsprogs unzip
# to use the right software versions and links for compiling
apt-get -y install pkg-config
# for cross-compiling ARM binaries
apt-get -y install gcc-arm-linux-gnueabi
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
arch=${?}
# For cross-compiling i686 target on x86_64 host.
if [ "${arch}" -eq 0 ]; then
apt-get -y install gcc-multilib libc6-i386 libc6-dev-i386
apt-get -y install lib32stdc++6 g++-multilib dh-autoreconf
# recommended, but not sure what for:
apt-get -y install lib32tinfo-dev
fi
# Memtest86+ build dependencies
# ------------------------------------------------------------
apt-get -y install build-essential python3
# i945-pwm build dependencies
# ------------------------------------------------------------
apt-get -y install build-essential perl
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
apt-get -y install libncurses5-dev doxygen iasl gdb flex bison \
build-essential git libssl-dev gnat
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32ncurses5-dev
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
apt-get -y install ttf-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 \
libfreetype6-dev gettext
# BucTS build dependencies (external script)
# ------------------------------------------------------------
apt-get -y install build-essential
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev \
build-essential libusb-1.0-0-dev libusb-1.0 \
libusb-1.0-0-dev libusb-dev
# For cross-compiling i686 target on x86_64 host.
[ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev
# UEFIExtract
# ------------
apt-get -y install cmake
# Blobs building dependencies (for me)
# ------------------------------------------------------------
apt-get -y install innoextract p7zip p7zip-full unar

View File

@ -1,96 +0,0 @@
#!/usr/bin/env sh
# void script: installs build dependencies for Void Linux
#
# Copyright (C) 2021 Caleb La Grange <thonkpeasant@protonmail.com>
# Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
if [ "$(id -u)" -ne 0 ]; then
printf "This script must be run as root\n"
exit 1
fi
# Duplications are intentional. Please do not re-factor.
#
# This is so that they can moved to separate scripts.
#
xbps-install -y wget
# For downloading source code
# ------------------------------------------------------------
xbps-install -y git
# For Tianocore and iPXE
# TODO: check whether this is the full list
xbps-install -y nasm perl-LWP python subversion
# For building source code:
# ------------------------------------------------------------
xbps-install -y base-devel
# for running the crostool script (to get mrc.bin file for t440p)
xbps-install -y sharutils curl parted e2fsprogs unzip
# for cross-compiling ARM binaries
xbps-install -y cross-arm-none-eabi-gcc
# Memtest86+ build dependencies
# ------------------------------------------------------------
xbps-install -y base-devel python
# i945-pwm build dependencies
# ------------------------------------------------------------
xbps-install -y base-devel perl
# Coreboot build dependencies (also requires build-essential and git)
# ------------------------------------------------------------
xbps-install -y ncurses doxygen acpica-utils gdb flex bison base-devel git \
openssl gcc-ada ncurses-devel
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
xbps-install -y font-unifont-bdf autogen help2man base-devel bison flex \
dejavu-fonts-ttf texinfo rsync python3 libusb xz gawk \
device-mapper fuse gettext gettext-devel freetype
# BucTS build dependencies (external script)
# ------------------------------------------------------------
xbps-install -y base-devel
# Flashrom build dependencies (also requires build-essential)
# ------------------------------------------------------------
xbps-install -y libpciaccess pciutils zlib libftdi1 base-devel libusb
# UEFIExtract
# ------------
xbps-install -y cmake
# Management engine extraction dependencies
# ------------------------------------------------------------
xbps-install -y innoextract p7zip unar