Firefox (x86)

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: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Firefox (x86)

Post#16 by Hamza » 30 Sep 2011, 15:41

@bour59
Yes, the syntax of BASH is more complete than SH's syntax.

@Virii
I don't understand what you meant.
NjVFQzY2Rg==

n2prtsusr
White ninja
White ninja
Posts: 14
Joined: 12 Nov 2012, 02:33
Distribution: Porteus 2.1 lxde 130809
Location: us

Re: Firefox (x86)

Post#17 by n2prtsusr » 24 Aug 2013, 06:02

@ hamza
I can't read script by I tried to figure it out
changed to http://ftp.mozilla.org/pub/mozilla.org/ ... 686/en-US/ /tmp
package will download,creates xzm module but type firefox in lxterminal can not find

I love this script, thanks in advance

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

Re: Firefox (x86)

Post#18 by Hamza » 24 Aug 2013, 10:29

Please send/post your updated copy of the script.
NjVFQzY2Rg==

n2prtsusr
White ninja
White ninja
Posts: 14
Joined: 12 Nov 2012, 02:33
Distribution: Porteus 2.1 lxde 130809
Location: us

Re: Firefox (x86)

Post#19 by n2prtsusr » 24 Aug 2013, 15:26

#!/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://ftp.mozilla.org/pub/mozilla.org/ ... 686/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 ... st_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/lib
mkdir usr/share/applications
mkdir usr/share/pixmaps

cp -r $SRC/* usr/lib

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

echo "Copying logo..."
cp $SRC/firefox/browser/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.xzm -b $B_SIZE
else
mksquashfs $WRK /root/firefox.xzm -b 256K
fi

if [ -e "/root/firefox.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
Last edited by n2prtsusr on 25 Aug 2013, 01:04, edited 1 time in total.

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

Re: Firefox (x86)

Post#20 by Hamza » 24 Aug 2013, 19:11

That's not a firefox pbuild but a flash pbuild.
NjVFQzY2Rg==

n2prtsusr
White ninja
White ninja
Posts: 14
Joined: 12 Nov 2012, 02:33
Distribution: Porteus 2.1 lxde 130809
Location: us

Re: Firefox (x86)

Post#21 by n2prtsusr » 25 Aug 2013, 01:07

I reposted it
I'm sorry about that, my mistake

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

Re: Firefox (x86)

Post#22 by Hamza » 25 Aug 2013, 09:50

Both links go to the same repository but only the first will works with the script as we're using regex to parse the downloaded page. Your link doesn't use the same listing standards and may not work correctly.
NjVFQzY2Rg==

n2prtsusr
White ninja
White ninja
Posts: 14
Joined: 12 Nov 2012, 02:33
Distribution: Porteus 2.1 lxde 130809
Location: us

Re: Firefox (x86)

Post#23 by n2prtsusr » 25 Aug 2013, 15:55

@Hamza

O.k.
thanks for the help
I'll work on it again tonite

Post Reply