[UNMAINTAINED] Firefox (x64)

This section is designed for your 'porteus build scripts' which create Porteus modules for your favorite applications. Scripts should work like the well-known 'SlackBuilds' with minimum user interaction.
User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

[UNMAINTAINED] Firefox (x64)

Post#1 by Hamza » 05 May 2013, 21:09

Here is a script to make a module of the latest Mozilla Firefox, and for 64bit cpu!

Code: Select all

#!/bin/bash

WRK=/tmp/firefox
SRC=/tmp/firefox_src
ME=`whoami`

clear
echo "===============> PORTEUS <==============="
echo 
echo "Welcome to Firefox Updater for Porteus"
echo "Press any key to start the update"
read junk

clear # Clear the console

echo "Downloading...."
rm -Rf $WRK
if [ -d $WRK ]; then echo ""
else 
   mkdir $WRK
fi
if [ -d $SRC ]; then echo ""
else 
   mkdir $SRC
fi
cd /tmp
wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/ /tmp
latest_version=`grep tar.bz2 index.html | head -n1 | cut -d- -f2- | cut -d '"' -f1`
echo "Downloading of latest version of Mozilla Firefox"
wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/firefox-$latest_version
if [ -e "/tmp/firefox-$latest_version" ]; then tar xjvf firefox-$latest_version -C $SRC
else
   echo "Check your internet connection!"
   echo "Cleaning the system..."
   rm -Rf $WRK $SRC
   clear
   exit 0
fi
echo "Creating the module directories..."
cd $WRK
mkdir root
mkdir root/Downloads
mkdir usr
mkdir usr/share
mkdir usr/bin
mkdir usr/lib64
mkdir usr/share/applications
mkdir usr/share/pixmaps

cp -r $SRC/* usr/lib64

echo "Generating symbolic links..."
cd $WRK
(ln -s /usr/lib64/firefox/firefox usr/bin/firefox)
(ln -s /usr/lib64/firefox/libmozjs.so usr/lib64/libmozjs.so)
(ln -s /usr/lib64/firefox/libnspr4.so usr/lib64/libnspr4.so)
(ln -s /usr/lib64/firefox/libnss3.so usr/lib64/libnss3.so)
(ln -s /usr/lib64/firefox/libnssdbm3.so usr/lib64/libnssdbm3.so)
(ln -s /usr/lib64/firefox/libnssutil3.so usr/lib64/libnssutil3.so)
(ln -s /usr/lib64/firefox/libplc4.so usr/lib64/libplc4.so)
(ln -s /usr/lib64/firefox/libplds4.so usr/lib64/libplds4.so)
(ln -s /usr/lib64/firefox/libsmime3.so usr/lib64/libsmime3.so)
(ln -s /usr/lib64/firefox/libsqlite3.so usr/lib64/libsqlite3.so)
(ln -s /usr/lib64/firefox/libssl3.so usr/lib64/libssl3.so)
(ln -s /usr/lib64/firefox/libxpcom.so usr/lib64/libxpcom.so)
(ln -s /usr/lib64/firefox/libxul.so usr/lib64/libxul.so)

echo "Copying logo..."
cp $SRC/firefox/icons/mozicon128.png $WRK/usr/share/pixmaps/firefox.png

echo "Generating Desktop File..."
echo '[Desktop Entry]' >> $WRK/usr/share/applications/firefox.desktop
echo 'Encoding=UTF-8' >> $WRK/usr/share/applications/firefox.desktop
echo 'Exec=firefox %u' >> $WRK/usr/share/applications/firefox.desktop
echo 'Icon=/usr/share/pixmaps/firefox.png' >> $WRK/usr/share/applications/firefox.desktop
echo 'Type=Application' >> $WRK/usr/share/applications/firefox.desktop
echo 'Categories=Application;Network;' >> $WRK/usr/share/applications/firefox.desktop
echo 'Name=Firefox' >> $WRK/usr/share/applications/firefox.desktop
echo 'MimeType=text/html' >> $WRK/usr/share/applications/firefox.desktop
echo 'X-KDE-StartupNotify=true' >> $WRK/usr/share/applications/firefox.desktop

echo "Building the module."
echo "Type your block size for the module compression OR press ENTER for default block size (256K)"
echo "Block Sizes available:"
echo "1. 64K"
echo "2. 128K"
echo "3. 256K"
echo "4. 512K"
echo "5. 1024K"
echo "Type your block size : " 
read B_SIZE
if [ "$B_SIZE" != "" ]; then 
mksquashfs $WRK /root/firefox-x64.xzm -b $B_SIZE
else
mksquashfs $WRK /root/firefox-x64.xzm -b 256K
fi

if [ -e "/root/firefox-x64.xzm" ]; then 

echo "===============> PORTEUS <==============="
echo "Your firefox module is ready!"
echo "Thanks to the Porteus Community!"
echo "Enjoy surfing with your new browser!"
echo " "
echo "Your module is saved in $ME folder"
echo " "
echo "Cleaning the system..."
rm -Rf /tmp/firefox*
rm /tmp/index.html
else
   clear
   echo "Build failed!"
   echo "Cleaning the system..."
   rm -Rf /tmp/firefox*
   rm /tmp/index.html
fi
Enjoy!
NjVFQzY2Rg==

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#2 by Rava » 06 May 2013, 04:07

Since it is creating the resulting module in /root/.... should there be no way to check if root is the user running the script?
Cheers!
Yours Rava

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Firefox (x64)

Post#3 by Hamza » 06 May 2013, 05:00

Sorry, that is because I am always working under root environment.
NjVFQzY2Rg==

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#4 by Rava » 07 May 2013, 12:11

I am woring on updating the FFx script for x86-64 as well...

It already includes the $VERS and $ARCH in the file name, aside from some other minor changes (as in cp -p or fewer mkdir -p intsead of more single mkdir lines without any "mkdir -p" ...)

But what I want to include is a on-the-fly created menu to select the user's preferred languege (after the question like:
"Do you want to use the default en-US or do you want to choose a different language of the available ones"

And I want this list no be created from the index.html that lists as directories the names of the languages, as in en-GB or de, or all the other flavours we get with FFx. :)
But that last part is not written up to now...

Should I post the current advanced / changed Firefox (x64) module that already uses $LANG as variable, and I will put in a comment telling the user (s)he can change the parameter LANG= to one of the valid and available ones in the FFx download path to get, say, UK/GB English, or German, or Trad. Chinese or whatever. :)


Me thinks when I made the FFx pBuild creating on-the-fly the language selection, me thinks maybe we want to put that into a new thread than and keep the one that downloads just default en-US (but with the commented info that the user could change that parameter to her/his preferred language)... which is the quickest and most practical way, but it needs script hacking.

The other pBuild that is able to create the language selection needs the user's input, but don't need any script hacking abilities, so both have pro and cons... :wink:
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#5 by Rava » 30 Oct 2013, 00:49

Hamza, I tried working on my update / changes to your script (like, I want en-GB, not en-US)...

When going to http://releases.mozilla.org/pub/mozilla.org/, it tells me:
As the Mozilla Foundation has decided to move towards using Content Distribution Networks (CDNs) to distribute Mozilla binaries, the recommended source for Firefox is http://getfirefox.com (all Mozilla products are available at http://www.mozilla.org/products). We are freeing the space on the Open Source Mirror in order to make room for other Open Source projects in need of mirroring services.
but http://www.mozilla.org/en-US/firefox/all/ only seems to have x86 Linux binaries, and not the x86-64 ones! Weird definition of "all Mozilla products are available"... :wall:

...

Well, and the above quote is wrong, too. The files are still there, like here:
http://releases.mozilla.org/pub/mozilla ... _64/en-GB/
http://releases.mozilla.org/pub/mozilla ... .0.tar.bz2
Cheers!
Yours Rava

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Firefox (x64)

Post#6 by Hamza » 30 Oct 2013, 13:12

I don't know where's the problem. My script is working good, so far.
NjVFQzY2Rg==

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#7 by Rava » 01 Nov 2013, 02:49

Hamza wrote:I don't know where's the problem. My script is working good, so far.
I try to change it from en-US to en-GB, and that failed...

Where do I have to change the pBuild?

Are

Code: Select all

wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/ /tmp
and
wget -c http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/firefox-$latest_version
enough?
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#8 by Rava » 01 Nov 2013, 04:30

Update

I am working on a script for en-Gb firefox...

and ran into this issue, these two files are not available:

Code: Select all

# cd /tmp/004-firefox_25.0_en-GB/usr/lib64
lrwxrwxrwx 1 root  30 2013-11-01 05:29 libmozjs.so -> /usr/lib64/firefox/libmozjs.so
lrwxrwxrwx 1 root  32 2013-11-01 05:29 libsqlite3.so -> /usr/lib64/firefox/libsqlite3.so
I checked if they are in /tmp/004-firefox_25.0_en-GB/usr/lib64/firefox/ , which they are not... and my current running 21.0 FFx doesn't have them as well... Are they still needed?
Cheers!
Yours Rava

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Firefox (x64)

Post#9 by Hamza » 01 Nov 2013, 07:26

I don't know. Since Mozilla loves to change architecture of his software at each release ... I don't look for changes.
NjVFQzY2Rg==

User avatar
fanthom
Site Admin
Site Admin
Posts: 4566
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Firefox (x64)

Post#10 by fanthom » 01 Nov 2013, 09:41

@Hamza
so maybe you should add '(Unmaintained)' tag to the thread title?
Please add [Solved] to your thread title if the solution was found.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Firefox (x64)

Post#11 by Rava » 01 Nov 2013, 17:35

Hamza wrote:I don't know. Since Mozilla loves to change architecture of his software at each release ... I don't look for changes.
IKR.... and this sucks. They should at least make a good documentation of the most important changes...

probably that's the issue why the flashplayer no longer works with FFx 25.0...

Or did anyone manage to update x86-64 FFx including the newest x86-64 Flashplayer on Porteus?
Cheers!
Yours Rava

bour59
Samurai
Samurai
Posts: 118
Joined: 29 Dec 2010, 08:10
Distribution: porteus v3.2.2-xfce
Location: France

Re: Firefox (x64)

Post#12 by bour59 » 27 Nov 2013, 16:34

mozilla likes playing tricks :Yahoo!:
the new download address for version 25.0.1 is now (sample for x86)

Code: Select all

http://download-installer.cdn.mozilla.net/pub/firefox/releases/25.0.1/linux-i686/fr/firefox-25.0.1.tar.bz2
edit : feel free to
change the architecture and language to your country
otherwise wait for porteus 3
Last edited by bour59 on 27 Nov 2013, 18:04, edited 1 time in total.

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Firefox (x64)

Post#13 by Hamza » 27 Nov 2013, 17:49

Be careful ... this URL will download French version of Mozilla Firefox.

The english URL would be

Code: Select all

http://download-installer.cdn.mozilla.net/pub/firefox/releases/25.0.1/linux-i686/en-US/firefox-25.0.1.tar.bz2
NjVFQzY2Rg==

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: [UNMAINTAINED] Firefox (x64)

Post#14 by Rava » 07 Dec 2013, 09:25

@Hamza, @Bour59,

this is the thread for the x86-64 Firefox.

You find all languages here:
http://download-installer.cdn.mozilla.n ... ux-x86_64/

Some mostly used languages:

en-GB:
http://download-installer.cdn.mozilla.n ... .1.tar.bz2

en-US:
http://download-installer.cdn.mozilla.n ... .1.tar.bz2

ru:
http://download-installer.cdn.mozilla.n ... .1.tar.bz2

de:
http://download-installer.cdn.mozilla.n ... .1.tar.bz2

fr:
http://download-installer.cdn.mozilla.n ... .1.tar.bz2


I am planning to create a curses based menu driven pBuild for x86-64 and i86 FFx that creates the list of possible language variants on the fly via browsing the folders in http://download-installer.cdn.mozilla.n ... ux-x86_64/ , but so far I not had the time to do so.

I have no idea how large the demand would be, it would be easier for anyone not wanting to hack in a script to just have a menu, select one of the available variants, pressing OK and the pBuild does all the rest...
Cheers!
Yours Rava

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: [UNMAINTAINED] Firefox (x64)

Post#15 by phhpro » 16 Dec 2013, 02:02

...
Last edited by phhpro on 03 Feb 2016, 22:42, edited 1 time in total.

Post Reply