]> gitweb.morketsmerke.org Git - immudex.git/commitdiff
Zmiana w sposobie dostarczania LibreWolf.
authorxf0r3m <jakubstasinski@protonmail.com>
Thu, 9 May 2024 06:12:21 +0000 (08:12 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Thu, 9 May 2024 06:12:21 +0000 (08:12 +0200)
addons/librewolf
addons/librewolf_old [new file with mode: 0644]

index f3206b39d93b5efea4f10281a7d479089d6747ee..7e680b835642a63a6584ce144454e9e7784e858f 100644 (file)
@@ -3,66 +3,12 @@
 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.";
+  echo "Other architectures than x86_64 (amd64) is not supported by this script";
   exit 1;
 fi 
 
-wget https://codeberg.org/librewolf/source/tags.rss
-ver=$(grep 'title' tags.rss | sed -n '2p' | sed -e 's,<title>,,g' -e 's,</title>,,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
-       tar -xf obj-x86_64-pc-linux-gnu/dist/librewolf-${ver}.en-US.linux-$(uname -m).tar.bz2 -C /usr/lib
-fi
-
-if [ $? -eq 0 ]; then
-        cd ..;
-        rm -rf librewolf-${ver};
-        rm $(basename $sourceURL);
-        rm tags.rss;
-       if [ "$1" ] && [ "$1" = "--i386" ]; then
-               desktopFileTarget="${HOME}/librewolf.desktop";
-    echo;
-    echo "You need to copy ${HOME}/librewolf.desktop file to the";
-    echo " /usr/share/applications.";
-       else
-               desktopFileTarget='/usr/share/applications/librewolf.desktop';
-       fi
-       cat >> $desktopFileTarget << EOF
-[Desktop Entry]
-Name=LibreWolf
-Name[pl]=LibreWolf
-Comment=Secure the World Wide Web Browsing
-Comment[pl]=Bezpieczene przeglądanie stron WWW
-GenericName=Secure Web Browser
-X-GNOME-FullName=LibreWolf Web Browser
-X-GNOME-FullName[pl]=Przeglądarka WWW LibreWolf
-Exec=/usr/lib/librewolf/librewolf %u
-Terminal=false
-X-MultipleArgs=false
-Type=Application
-Icon=/usr/lib/librewolf/browser/chrome/icons/default/default128.png
-Categories=Network;WebBrowser;
-MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
-StartupWMClass=Firefox-esr
-StartupNotify=true
-EOF
-fi
+wget https://deb.librewolf.net/pool/bookworm/ -O index.html;
+latestLink=$(grep -o '<a href=".*">' index.html | sed 's/>/ /g' | cut -d " " -f 2 | sed -n '2,$p' | sed 's/"/ /g' | cut -d " " -f 3 | tail -1);
+filename=$(basename $latestLink);
+wget https://deb.librewolf.net${latestLink} -O /tmp/${filename};
+dpkg -i /tmp/${filename}; 
diff --git a/addons/librewolf_old b/addons/librewolf_old
new file mode 100644 (file)
index 0000000..f3206b3
--- /dev/null
@@ -0,0 +1,68 @@
+#!/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,<title>,,g' -e 's,</title>,,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
+       tar -xf obj-x86_64-pc-linux-gnu/dist/librewolf-${ver}.en-US.linux-$(uname -m).tar.bz2 -C /usr/lib
+fi
+
+if [ $? -eq 0 ]; then
+        cd ..;
+        rm -rf librewolf-${ver};
+        rm $(basename $sourceURL);
+        rm tags.rss;
+       if [ "$1" ] && [ "$1" = "--i386" ]; then
+               desktopFileTarget="${HOME}/librewolf.desktop";
+    echo;
+    echo "You need to copy ${HOME}/librewolf.desktop file to the";
+    echo " /usr/share/applications.";
+       else
+               desktopFileTarget='/usr/share/applications/librewolf.desktop';
+       fi
+       cat >> $desktopFileTarget << EOF
+[Desktop Entry]
+Name=LibreWolf
+Name[pl]=LibreWolf
+Comment=Secure the World Wide Web Browsing
+Comment[pl]=Bezpieczene przeglądanie stron WWW
+GenericName=Secure Web Browser
+X-GNOME-FullName=LibreWolf Web Browser
+X-GNOME-FullName[pl]=Przeglądarka WWW LibreWolf
+Exec=/usr/lib/librewolf/librewolf %u
+Terminal=false
+X-MultipleArgs=false
+Type=Application
+Icon=/usr/lib/librewolf/browser/chrome/icons/default/default128.png
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
+StartupWMClass=Firefox-esr
+StartupNotify=true
+EOF
+fi