# build.sh - build librewolf on windows # derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD pkgname=librewolf _pkgname=LibreWolf pkgver=86.0.1 deps_apt() { echo "deps_apt: begin." $deps= apt -y install $(deps) echo "deps_apt: done." } deps_rpm() { echo "deps_rpm: begin." $deps= dnf -y install $(deps) echo "deps_rpm: done." } mach_env() { echo "mach_env: begin." if [ ! -d firefox-$pkgver ]; then exit 1; fi cd firefox-$pkgver ./mach create-mach-environment if [ $? -ne 0 ]; then exit 1; fi cd .. echo "mach_env: done." } fetch() { echo "fetch: begin." # fetch the firefox source. rm -f firefox-$pkgver.source.tar.xz wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz if [ $? -ne 0 ]; then exit 1; fi if [ ! -f firefox-$pkgver.source.tar.xz ]; then exit 1; fi echo "fetch: done." } extract() { echo "extract: begin." echo "Deleting previous firefox-${pkgver} ..." rm -rf firefox-$pkgver echo "Extracting firefox-$pkgver.source.tar.xz ..." tar xf firefox-$pkgver.source.tar.xz if [ $? -ne 0 ]; then exit 1; fi if [ ! -d firefox-$pkgver ]; then exit 1; fi echo "extract: done." } do_patches() { echo "do_patches: begin." # get the patches echo 'Getting patches..' rm -f megabar.patch remove_addons.patch wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch if [ $? -ne 0 ]; then exit 1; fi if [ ! -f megabar.patch ]; then exit 1; fi wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch if [ $? -ne 0 ]; then exit 1; fi if [ ! -f remove_addons.patch ]; then exit 1; fi if [ ! -d firefox-$pkgver ]; then exit 1; fi cd firefox-$pkgver cat >../mozconfig <