From: xf0r3m Date: Sat, 11 May 2024 10:16:52 +0000 (+0200) Subject: Dodanie skryptu librewolf.sh - automatyczny build LibreWolf amd64 do tarball. X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=aedd004980360f6124d4d9e249bdb09d6ac1d742;p=backup.git Dodanie skryptu librewolf.sh - automatyczny build LibreWolf amd64 do tarball. --- diff --git a/librewolf.sh b/librewolf.sh new file mode 100755 index 0000000..36d2c56 --- /dev/null +++ b/librewolf.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +set -e + +if [ "$(uname -m)" != "x86_64" ]; then + echo "64-bit OS is required for sucessfull LibreWolf build. You can use"; + echo "immudex-sdk for build librewolf for 32-bit system. For 32-bit (--i386)"; + echo "result of this script, you get binary archive with LibreWolf and" + echo "the .desktop file, for browser appearance in menu."; + exit 1; +fi + +wget https://codeberg.org/librewolf/source/tags.rss +ver=$(grep 'title' tags.rss | sed -n '2p' | sed -e 's,,,g' -e 's,,,g' -e 's,^[[:space:]]*,,g') +sourceURL="https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/${ver}/librewolf-${ver}.source.tar.gz"; +wget $sourceURL +tar -xf $(basename $sourceURL) +cd librewolf-${ver} +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +sudo apt install pkg-config build-essential python3-pip python3-distutils -y +export PATH=${PATH}:${HOME}/.cargo/bin; +if [ "$1" ] && [ "$1" = "--i386" ]; then + rustup target add i686-unknown-linux-gnu + sed -i '22s/.*/ac_add_options --target=i686-linux-gnu/' mozconfig +fi +./mach --no-interactive bootstrap --application-choice=browser +./lw/setup-wasi-linux.sh +./mach build +./mach package +if [ "$1" ] && [ "$1" = "--i386" ]; then + cp obj-i686-pc-linux-gnu/dist/librewolf-${ver}.en-US.linux-i686.tar.bz2 $HOME; +else + cp -vv obj-x86_64-pc-linux-gnu/dist/librewolf-${ver}.en-US.linux-$(uname -m).tar.bz2 ${HOME}/ftp/librewolf +fi + +if [ $? -eq 0 ]; then + cd ..; + rm -rf librewolf-${ver}; + rm $(basename $sourceURL); + rm tags.rss; +fi