#!/bin/bash # Load settings # basically, dot-source the conf file. test -z "${librewolf_dpkg_conf}" && export librewolf_dpkg_conf="$( find "$( dirname "${0}" )" -maxdepth 2 -name "$( basename "${0%%.sh}.conf" )" -print 2>/dev/null | head -n1 )" test ! -r "${librewolf_dpkg_conf}" && { echo "Unable to load config file, which should be named the same as this script but with a .conf ending. Aborted." 1>&2 ; exit 1 ; } . "${librewolf_dpkg_conf}" # Aborts the script upon any faliure set -e; apt update apt install -y \ libx11-dev \ libx11-xcb-dev \ libxt-dev \ libgtk-3-dev \ libgtk2.0-dev \ libglib2.0-dev \ libdrm-dev \ libstartup-notification0-dev \ libjpeg-dev \ zlib1g-dev \ libreadline-dev \ libnspr4-dev \ libnss3-dev \ libvpx-dev \ libdbus-glib-1-dev \ libffi-dev \ libevent-dev \ libpulse-dev \ libasound2-dev \ libjack-dev \ yasm \ nasm \ llvm-dev \ libclang-dev \ clang \ nodejs \ zip \ locales \ xvfb \ xfonts-base \ ttf-bitstream-vera \ fonts-freefont-ttf \ fonts-dejima-mincho \ curl curl https://sh.rustup.rs -o rustup.sh bash rustup.sh -y source /root/.cargo/env cargo install --version 0.16.0 cbindgen cd ${work_dir} dpkg-source -x librewolf_${pkgrel}-${pkgver}.dsc ${output_dir} cd ${output_dir} dpkg-buildpackage -us -uc -d