Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Friday, 1 July 2011

Firefox 5 from Source

These are the instructions for installing FF5 from source on the LFS system I built in earlier posts, assuming that you have not installed any version.

wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2
tar -xjvf /sources/extras/libIDL-0.8.14.tar.bz2
cd libIDL-0.8.14
./configure --prefix=/usr &&
make
make install
cd ..
rm -rvf libIDL-0.8.14

wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2
wget http://www.linuxfromscratch.org/patches/blfs/svn/Python-2.6.4-bdb_4.8-1.patch
wget http://docs.python.org/ftp/python/doc/2.6/python-2.6-docs-html.tar.bz2
tar -xjvf /sources/extras/Python-2.6.4.tar.bz2
cd Python-2.6.4
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py
patch -Np1 -i /sources/extras/Python-2.6.4-bdb_4.8-1.patch
./configure --prefix=/usr --enable-shared
make
make test
make install
chmod -v 755 /usr/lib/libpython2.6.so.1.0
install -v -m755 -d /usr/share/doc/Python-2.6.4/html
tar --strip-components=1 --no-same-owner --no-same-permissions -C /usr/share/doc/Python-2.6.4/html -xvf /sources/extras/python-2.6-docs-html.tar.bz2
cat >> /etc/profile << "EOF"
export PYTHONDOCS=/usr/share/doc/Python-2.6.4/html
EOF
cd ..
rm -rvf Python-2.6.4
wget http://www.tortall.net/projects/yasm/releases/yasm-1.0.1.tar.gz
cd /dev/shm
tar -xzvf /sources/extras/yasm-1.0.1.tar.gz
cd yasm-1.0.1
CC="gcc -fPIC" ./configure --prefix=/usr
time make $CORES_TO_USE
make install
wget http://cairographics.org/releases/cairo-1.10.2.tar.gz
cd /dev/shm
tar -xzvf /sources/desktop/cairo-1.10.2.tar.gz
cd cairo-1.10.2
./configure --prefix=/usr --enable-tee=yes
make $CORES_TO_USE
make install
cd ..
rm -rvf cairo-1.10.2
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/5.0/source/firefox-5.0.source.tar.bz2
tar -xjvf /sources/extras/firefox-5.0.source.tar.bz2
cd moz*
cat > .mozconfig << "EOF"
ac_add_options --enable-application=browser
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build
mk_add_options MOZ_MAKE_FLAGS="-j2"
ac_add_options --prefix=/opt/firefox5
ac_add_options --enable-optimize
ac_add_options --enable-system-cairo
ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
ac_add_options --with-pthreads
ac_add_options --with-system-zlib
ac_add_options --disable-accessibility
ac_add_options --disable-crashreporter
ac_add_options --disable-dbus
ac_add_options --disable-gnomevfs
ac_add_options --disable-necko-wifi
ac_add_options --disable-installer
ac_add_options --disable-javaxpcom
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-libnotify
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-strip
EOF
time make -f client.mk build
make -f client.mk install
cd ..
rm -rvf moz*
cat >> /etc/ld.so.conf << "EOF"
# Extra Path so Firefox's libraries can be used by Flash10
/opt/firefox5/lib/firefox-5.0
# End of Extra Path.
EOF
wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2
cd /dev/shm
tar -xjvf /sources/extras/curl-7.20.0.tar.bz2
cd curl-7.20.0
./configure --prefix=/usr
make $CORES_TO_USE
make install
find docs -name "Makefile*" -o -name "*.1" -o -name "*.3" | xargs rm
install -v -d -m755 /usr/share/doc/curl-7.20.0
cp -v -R docs/* /usr/share/doc/curl-7.20.0
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar -xzvf install_flash_player_10_linux.tar.gz
mkdir -v /opt/firefox5/lib/firefox-5.0/plugins
cp -v libflashplayer.so /opt/firefox5/lib/firefox-5.0/plugins
cp -v ./usr/bin/flash-player-properties /usr/bin/
Add this to the openbox menu.xml file:
<item label="flash player properties">
<action name="Execute">
<execute>
/usr/bin/flash-player-properties
</execute>
</action>
</item>
Download Java from here. OR:
wget http://download.oracle.com/otn-pub/java/jdk/6u26-b03/jdk-6u26-linux-i586.bin
mv jdk-6u26-linux-i586.bin* jdk-6u26-linux-i586.bin
chmod +x /sources/extras/jdk-6u26-linux-i586.bin
cd /dev/shm
/sources/extras/jdk-6u26-linux-i586.bin
cd jdk1.6.0_26
install -v -m755 -d /opt/jdk-6u26
mv -v * /opt/jdk-6u26
chown -v -R root:root /opt/jdk-6u26
ln -v -sf xawt/libmawt.so /opt/jdk-6u26/jre/lib/i386/
cd ..
sed -i 's@XINERAMA@FAKEEXTN@g' /opt/jdk-6u26/jre/lib/i386/xawt/libmawt.so
ln -v -nsf jdk-6u26 /opt/jdk
ln -sv /opt/jdk/jre/lib/i386/libnpjp2.so /opt/firefox5/lib/firefox-5.0/plugins
cat >> /etc/profile.d/30-jdk.sh << "EOF"
# Begin /etc/profile.d/30-jdk.sh

# Set JAVA_HOME directory
JAVA_HOME=/opt/jdk

# Adjust PATH
pathappend ${JAVA_HOME}/bin PATH

# Auto Java CLASSPATH
# Copy jar files to, or create symlinks in this directory
AUTO_CLASSPATH_DIR=/usr/lib/classpath
pathprepend . CLASSPATH
for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
pathappend $dir CLASSPATH
done

export JAVA_HOME CLASSPATH
unset AUTO_CLASSPATH_DIR
unset dir

# End /etc/profile.d/30-jdk.sh
EOF
source /etc/profile
If you have installed openoffice:
ln -sv /opt/openoffice-3.2.1/program/libnpsoplugin.so /opt/firefox5/lib/firefox-5.0/plugins

Friday, 22 October 2010

LFS - Firefox 4 Beta from Source

The new version of Firefox is nearly out, and I wanted to try it with my LFS system. I figured that it should not be too different to Firefox 3.6 which I have installed. I encountered two problems when installing FF4. Firstly, for some strange reason, it can't use the libpng that I have installed. I updated libpng to the latest version, but still nada. It also needed the yasm software which is some programming language stuff.

So:
cd /sources/extras
wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
cd /dev/shm
tar -xzvf /sources/extras/yasm-0.8.0.tar.gz
cd yasm-0.8.0
CC="gcc -fPIC" ./configure --prefix=/usr
time make $CORES_TO_USE
make install

And then:

cd /sources/extras
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/4.0b6/source/firefox-4.0b6.source.tar.bz2
cd /dev/shm
tar -xjvf /sources/extras/firefox-4.0b6.source.tar.bz2
cd moz*
cat > .mozconfig << "EOF"
ac_add_options --enable-application=browser
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --prefix=/opt/firefox4
ac_add_options --enable-optimize
ac_add_options --enable-system-cairo
ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
ac_add_options --with-pthreads
ac_add_options --with-system-zlib
ac_add_options --disable-accessibility
ac_add_options --disable-crashreporter
ac_add_options --disable-dbus
ac_add_options --disable-gnomevfs
ac_add_options --disable-necko-wifi
ac_add_options --disable-installer
ac_add_options --disable-javaxpcom
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-libnotify
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-strip
EOF
Note - the "-j4" line. Make this j2 for a dual core, or leave it out altogether for single core. I have commented out the libpng line, because I will want it back if I ever find out what is screwed up. I have also changed the install directory so I can install it alongside FF3. Now run:
time make -f client.mk build
make -f client.mk install
cd ..
rm -rvf moz*
I think I may have found the problem with Flash 10. My system is missing some dependencies. Running [ldd] on the library reports the following as missing:
libssl3.so => not found
libsmime3.so => not found
libnss3.so => not found
libplds4.so => not found
libplc4.so => not found
libnspr4.so => not found
All of these libraries are in the Firefox folder - but are NOT available to the system as a whole. So I need to somehow tell the system it can look in the firefox folders to get these things. They way to do this is by adding the firefox path to following file:
cat >> /etc/ld.so.conf << "EOF"
# Extra Path so Firefox's libraries can be used by Flash10
/opt/firefox4/lib/firefox-4.0b6
# End of Extra Path.
EOF
OK. We now get a fucking different problem. It can't find the cURL library. Which it DOESN'T FUCKING ASK FOR when you [ldd] the fucker. OK.
wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2
tar -xjvf curl-7.20.0.tar.bz2
cd curl-7.20.0
./configure --prefix=/usr
make $CORES_TO_USE
Holy fuck the [make check] is the best I have ever seen! It gives you an actual ETA of how long the test is going to take to run! It is awesome. And then it ruins everything by not giving you a final report. Bastard.
make install
find docs -name "Makefile*" -o -name "*.1" -o -name "*.3" | xargs rm
install -v -d -m755 /usr/share/doc/curl-7.20.0
cp -v -R docs/* /usr/share/doc/curl-7.20.0
And, finally, the fucker works. You just install Flashplayer 10 using the following instructions:
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar -xzvf install_flash_player_10_linux.tar.gz
mkdir -v /opt/firefox4/lib/firefox-4.0b6/plugins
cp -v libflashplayer.so /opt/firefox4/lib/firefox-4.0b6/plugins
If you have already installed Java, just link it to the new plugins directory:
ln -sv /opt/jdk/jre/lib/i386/libnpjp2.so /opt/firefox4/lib/firefox-4.0b6/plugins

Friday, 1 October 2010

LFS - Firefox from Source

OK, I have buckled under the pressure of being sick fucking fed up of text only browsing. Actually, when I looked at it, with the packages I have installed, there are only two dependencies needed to get firefox up and running. So, firefox it is.

cd /sources/extras

The first dependency here is something to do with Interface Definition Language files. Apparently firefox needs to use them, whatever they actually are. Absolutely simply installation commands.
wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2
tar -xjvf /sources/extras/libIDL-0.8.14.tar.bz2
cd libIDL-0.8.14
./configure --prefix=/usr &&
make
make install
cd ..
rm -rvf libIDL-0.8.14

Next up is Python. Frankly I am surprised it has taken until now for this to be installed. Python is another language like C or Perl.
wget http://www.python.org/ftp/python/2.6.4/Python-2.6.4.tar.bz2
wget http://www.linuxfromscratch.org/patches/blfs/svn/Python-2.6.4-bdb_4.8-1.patch
wget http://docs.python.org/ftp/python/doc/2.6/python-2.6-docs-html.tar.bz2
tar -xjvf /sources/extras/Python-2.6.4.tar.bz2
cd Python-2.6.4

We need to fix a potential build problem with a quick [sed]. I have no idea whatsoever what the patch is supposed to fix, BLFS is silent on the issue.
sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py
patch -Np1 -i /sources/extras/Python-2.6.4-bdb_4.8-1.patch
./configure --prefix=/usr --enable-shared
make
make test
make install
chmod -v 755 /usr/lib/libpython2.6.so.1.0

We also want to install Python's documentation, we downloaded it after all. We also need to set a system variable to get the documentation to work properly.
install -v -m755 -d /usr/share/doc/Python-2.6.4/html
tar --strip-components=1 --no-same-owner --no-same-permissions -C /usr/share/doc/Python-2.6.4/html -xvf /sources/extras/python-2.6-docs-html.tar.bz2
cat >> /etc/profile << "EOF"
export PYTHONDOCS=/usr/share/doc/Python-2.6.4/html
EOF
cd ..
rm -rvf Python-2.6.4

And now we come to Firefox itself. This is probably the most complicated build we have done up until now. In fact it is so complicated that we need to create a separate file just to feed the configuration options to the make command.
wget http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.8/source/firefox-3.6.8.source.tar.bz2
tar -xjvf /sources/extras/firefox-3.6.8.source.tar.bz2
cd moz*

The folder created by the unpacking is called [mozilla]-something or other. Using the previous command is a simple way to ensure that we definitely move into that folder, no matter what its specific name. Now lets set up the config file. There are two ways to go with firefox. It comes with quite a lot of its dependencies built in. If you have these packages installed in the system, it is best to use those versions. For the missing dependencies we could download and install the latest versions, but that is too much of a pain in the arse frankly. Some of the packages we can use, like cairo, jpeg, png, and zlib because we have installed those. If you are dealing with a more mature BLFS install, you may have more system packages you can enable.
cat > .mozconfig << "EOF"
ac_add_options --enable-application=browser
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build
ac_add_options --prefix=/opt/firefox
ac_add_options --enable-optimize
ac_add_options --enable-system-cairo
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-pthreads
ac_add_options --with-system-zlib
ac_add_options --disable-accessibility
ac_add_options --disable-crashreporter
ac_add_options --disable-dbus
ac_add_options --disable-gnomevfs
ac_add_options --disable-necko-wifi
ac_add_options --disable-installer
ac_add_options --disable-javaxpcom
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --disable-libnotify
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-strip
EOF

Now you run the compilation. This takes just over 20 minutes on my quad core, so it is a biggie. You might want to benchmark by [time]ing the build.
time make $CORES_TO_USE -f client.mk build
make -f client.mk install
cd ..
rm -rvf moz*

Now may be a good time to install two special firefox plugins: Flash and Java.

First Flash. In the first instance I will try flash 9, because Flashplayer 10 has compatibility problems with firefox.
wget http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp9_archive.zip
unzip /sources/extras/fp9_archive.zip
cd fp9_archive/9r246
tar -xzvf flashplayer9r246_linux.tar.gz
cd install_flash_player_9_linux
cp ./libflashplayer.so /opt/firefox/lib/firefox-3.6.8/plugins
cd ../../..
rm -rf  fp9_archive

Just in case they have fixed Flash 10, you can get it from here:
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
tar -xzvf install_flash_player_10_linux.tar.gz
cp -v libflashplayer.so /opt/firefox/lib/firefox-3.6.8/plugins

For Java, you need to download the binary install file, which is only available from Sun's website. You should now be using Firefox to browse so just save the appropriate file into the /sources/extras folder from this link.

Then, from the directory you download this to, run:
chmod +x /sources/extras/jdk-6u21-linux-i586.bin
/sources/extras/jdk-6u21-linux-i586.bin
cd jdk1.6.0_21
install -v -m755 -d /opt/jdk-6u21
mv -v * /opt/jdk-6u21
chown -v -R root:root /opt/jdk-6u21
ln -v -sf xawt/libmawt.so /opt/jdk-6u21/jre/lib/i386/
cd ..
sed -i 's@XINERAMA@FAKEEXTN@g' /opt/jdk-6u21/jre/lib/i386/xawt/libmawt.so
ln -v -nsf jdk-6u21 /opt/jdk

Java needs quite complicated environment variables to be set, so we'll create a profile file:
cat >> /etc/profile.d/30-jdk.sh << "EOF"
# Begin /etc/profile.d/30-jdk.sh

# Set JAVA_HOME directory
JAVA_HOME=/opt/jdk

# Adjust PATH
pathappend ${JAVA_HOME}/bin PATH

# Auto Java CLASSPATH
# Copy jar files to, or create symlinks in this directory
AUTO_CLASSPATH_DIR=/usr/lib/classpath
pathprepend . CLASSPATH
for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
pathappend $dir CLASSPATH
done

export JAVA_HOME CLASSPATH
unset AUTO_CLASSPATH_DIR
unset dir

# End /etc/profile.d/30-jdk.sh
EOF

Either log out and in or run the following command to load the new environment settings:
source /etc/profile

The Java plugin for firefox needs to be installed by way of symbolic link, just copying it will not work for some reason:

ln -sv /opt/jdk/jre/lib/i386/libnpjp2.so /opt/firefox/lib/firefox-3.6.8/plugins

Wednesday, 1 September 2010

LAP - AWeb

The final package I am going to install in the main build is a web browser for the Amiga. For the avoidance of doubt in the heads of imbeciles, there is no point in doing this if you did not or could not install the network drivers for your system.

Much like e-uae itself, the AWeb browser needs a toolkit to display stuff like buttons, menus and so on. Actually the toolkits we are going to install are used by a number of other applications, so they are useful in and of themselves. One thing which uses them is a replacement icon set, so we will install that as well just now. In addition, the makers of the web browser AWeb no longer supply copies of their software, so I had to resort to archive.org. Seems to work fine though.

umount -v /media/amiga
sudo mkdir /media/lfs 
sudo mount -v -t ext3 /dev/disk/by-label/amiga /media/lfs 
cd /media/lfs/sources/amiga

wget http://aminet.net/util/libs/mui38usr.lha
wget http://aminet.net/dev/gui/ClassAct2Demo.lha
wget http://aminet.net/util/wb/NewIcons46.lha
wget http://web.archive.org/web/20070102173257/http://aweb.sunsite.dk/files/full/AWeb_APL34_full_020.lha

Again, when you have booted to the Amiga you then want to move, or copy, the files from /sources/amiga to ~/amiga/shared/ so that the files are available to the emulated Amiga. Then boot your A1200HD machine.

The first bit of the toolkit we install is Mui, which sounds halfway been a pretentious Moi and a Hawaiian island. In actual fact it sounds like it is GTK for Workbench.
lha x Shared:mui38usr.lha ram:
Open this up in the same way as Picasso. In other words you double click on the ramdisk, then double click on the MUI directory, and finally double click on the icon called "Install-MUI". When asked to select a place to install MUI, click on show drives and select dh0: Installing to the root of dh0: is fine. You should choose to install all image sets. The example programs are not required.
Once it is installed, reboot the Amiga, and navigate to the system->mui folder and run the Mui program located there. When the program opens, hold down the right mouse button and go to the menu at the top of the screen – not the Mui program, but the very top of the desktop. There, select project, choose open, and select Stuntzi.prefs. Save your selection.

ClassAct is another toolkitty type thing which works alongside MUI. It may even be a rival to MUI in some areas of operation.
lha x Shared:classact2demo.lha ram:
Double click on the ram disk and then on "ClassAct" and then on "Install_Classes". The classes should be installed to the default location, which should be SYS:Classes. All other options are OK by default as well, so just 'Yes' and 'Proceed' your way through the install. If you select Novice instead of Intermediate user it will just fire straight through without asking you anything.

The two toolkits are actually the dependencies for a new icon set, so since we have installed the toolkit packages, we may as well now install a new icon set. We want to do this because the Workbench icons are designed to be viewed on an interlaced display. The result is that when you view them through the uaegfx: card they lose half their height and look a bit stupid.
lha x Shared:newicons46.lha ram: 
You then, again, double click on the ram disk, and then double click on "NewIconsV4". Then double click on "Install" and finally on "Install_NewIcons". We are not given the chance to install these as a novice, so go for intermediate. Select all check boxes that appear. You should get the opportunity to install a high end library. Take it.
The first install location should be System:Utilities. You should then be given the chance to update a disk or partition image. It should auto choose dh0:, but if not click on show drives and select dh0: and then proceed. Do the same for dh1:. I think this affects the drawer images IN that device as opposed to its icon on the desktop. I mostly think this because the next thing the install does is offer you the chance to change the desktop icons. Do this in the same way. It offers you different icons this time.
The next install options should be SYS:Storage - Proceed, then Help: - Proceed. When it gets to "include:" you need to step in. Change the install path to System:Utilities, by clicking on dh0:System, then scrolling down the list and choosing Utilities. The "Selected Drawer" box should now show "System:Utilities", and if it does click on Proceed. Next it should ask about the example source code and suggest installing it to Work:. You have not defined work: so choose to install it to System:Storage as a fallback, and then do exactly the same for the Autodoc material.
Then, after a reboot, go to System->Prefs->newiconsprefs, and check the boxes next to RTG Mode, no borders, and transparent.

Finally we come to Aweb which is a web browser for Amiga OS. It is, when compared with today's browsers, basic.
lha x Shared:AWeb_APL34_full_020.lha ram:
Start the install in exactly the same way as before. When you start the install it will suggest installing to the ram disk. This is a stupid idea. Instead, install to System:. When asked, you can confirm that you have more than 2Mb of ram. About 254Mb more in fact.
You then get a message telling you that plugins should be installed to AWeb_APL:, and not AWeb3:. Hmm, OK.
So, plugins then. From the open AWeb_APL_020 folder, double click on plugins. From there you should see three folders, which correspond to the jpeg, gif and png plugins. The procedure is really the same for each one. Avoid using the built in scripts. They are a pain in the arse, and only half work. Do it manually instead. Drop to a Shell and run:
copy ram:AWeb_APL_020/Plugins/awebjfif68020/awebjfif.awebplugin AWeb_APL:Storage
copy ram:AWeb_APL_020/Plugins/awebgif/awebgif.awebplugin AWeb_APL:Storage
copy ram:AWeb_APL_020/Plugins/awebpng/awebpng.awebplugin AWeb_APL:Storage
You should then double click the AWeb icon in the AWeb_APL folder. When the program loads, hold down the right mouse button to bring up the menu, and then go to Settings, and then Browser Settings. From the window that comes up (called AWeb browser settings) click on the IMAGE/GIF line under the 'Type' column. The click on the box at the bottom called 'Action', which brings up a drop down menu from which you choose "AWeb Plugin". Then click the icon next to the "Name" box (just under the arrows next to the box now showing "AWeb Plugin"). From the dialogue box that pops up select storage, select awebgif.awebplugin and hit OK. Now do the same for JPEG and PNG (which are just under GIF). Hey presto, your AWeb browser can now display images!

Wednesday, 4 August 2010

LAP - Documentation

It was after I first installed the alsa software, when I looked through the commands that I had used and realised that I had probably not installed all the documentation properly. You see, some text files had been installed but the actual documentation was to be in more sophisticated html files. We need another package to create those files, and I have decided that it would be a good idea to actually install that software.

You have probably realised that we have not installed any software which can actually read html files. Hmm. We'd probably best do that then. I have chosen lynx which is a text based browser and therefore will work without any graphical interface. Which we do not have just now.

The openssl package that I am going to install before lynx allows lynx to support web security - the padlock icon that you see in firefox and internet explorer in other words. We absolutely do not need that just to access the html documentation, but it may be useful in the future if we web-enable this installation. The bc package is another maths type package, like the ones needed for gcc. This is needed to test openssl, and with any security stuff, we want to make sure it works. Note that if you want [wget] to be able to download from secure sites, you need to reinstall it now - the same commands should work it will just automatically detect that we have installed OpenSSL.

This whole bc -> ssl -> lynx chain will arise time and time again with Linux From Scratch. These connections are known as dependencies. In other words, lynx is dependant on openssl to provide security and needs it to be installed first. Openssl is dependant on bc to test itself. Normally, Ubuntu, or other advances distributions handle all this sort of dependency stuff for you and tuck it away in the background. No such joy with LFS - we have to do it all by hand.

Again, I will set out all the commands with comments, but as they are a bit complicated I will also include them as an executable script. So what you end up doing is copying and pasting the commands which then create a script on the Amiga Key. Once you are in the LFS system you can just run that script.

Again, we need to download from the LiveCD:
umount -v /media/amiga
sudo mkdir /media/lfs
sudo mount -v -t ext3 /dev/disk/by-label/amiga /media/lfs
cd /media/lfs/sources
mkdir extras
chmod -v a+wt extras
cd extras
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.6.3.src.tar.gz
wget http://lynx.isc.org/current/lynx2.8.7rel.1.tar.bz2
wget http://www.openssl.org/source/openssl-0.9.8n.tar.gz
wget http://anduin.linuxfromscratch.org/files/BLFS/BLFS-ca-bundle-3.12.5.tar.bz2
wget http://www.linuxfromscratch.org/patches/blfs/svn/openssl-0.9.8n-fix_manpages-1.patch
wget http://ftp.gnu.org/gnu/bc/bc-1.06.tar.gz
And then reboot to the Amiga Key:

cd /sources/extras
tar -xzvf /sources/extras/bc-1.06.tar.gz
cd bc-1.06

There is a problem with this package speaking nicely to readline. We correct it with a [sed] command.

sed -i '/PROTO.*readline/d' bc/scan.l

The same applies to Flex:

sed -i '/flex -I8/s/8//' configure

We also need a missing header. I do not know what this is or why it is missing, but the following [sed] fixes it.
sed -i '/stdlib/a #include <string.h>' lib/number.c

Lastly, there can be a fault with the program which is fixed with this [sed]:
sed -i 's/program.*save/static &/' bc/load.c
./configure --prefix=/usr --with-readline

[with-readline] makes the compiled software aware that we have installed readline on our system.

make $CORES_TO_USE

We may as well run a check, which we do as follows:

echo "quit" | ./bc/bc -l Test/checklib.b
Percent Failed: 0
make install
cd ..
rm -rvf bc-1.06

tar -xzvf /sources/extras/openssl-0.9.8n.tar.gz
cd openssl-0.9.8n

Firstly we apply the patch we downloaded. BLFS is curiously reticent about telling us what this does, but the name of the patch does tend to give the game away.

patch -Np1 -i /sources/extras/openssl-0.9.8n-fix_manpages-1.patch

Next we need to install basic security certificates which are omitted from the source code package:

tar -vxf /sources/extras/BLFS-ca-bundle-3.12.5.tar.bz2
./config --prefix=/usr --openssldir=/etc/ssl shared zlib-dynamic

[openssldir] just specified the particular install directory for the configuration stuff - I am not sure where this would default to otherwise. [shared] once again relates to the libraries. [zlib-dynamic] makes openssl aware that we have installed zlib and it can use it.

make $CORES_TO_USE
make test
The test output looks very cool to start with and then descends into screeds and screeds of crap. There was no discernible success or failure message.
make MANDIR=/usr/share/man install
cp -v -r certs /etc/ssl
install -v -d -m755 /usr/share/doc/openssl-0.9.8n
cp -v -r       doc/{HOWTO,README,*.{txt,html,gif}} /usr/share/doc/openssl-0.9.8n

Most of that we have seen before. In addition to the installation of the documentation we also install the [cert]ificates to [/etc/ssl].

for pem in /etc/ssl/certs/*.pem
do
cat $pem
echo ""
done > /etc/ssl/ca-bundle.crt

Hmm that looks tricky. What this is doing is taking the contents of every [pem] file in the [/etc/ssl/certs] directory and sticking them together in one big file called [ca-bundle.crt]. Why, I have no idea. Apparently though, if we ever add any more [pem] files we are supposed to re-run that command.

cd ..
rm -rvf openssl-0.9.8n

tar -xjvf /sources/extras/lynx2.8.7rel.1.tar.bz2
cd lynx2-8-7

That is about the most annoyingly different directory name over archive name that I have found so far ... just as well I tested it before actually implementing it in the script.

./configure --prefix=/usr --sysconfdir=/etc/lynx --datadir=/usr/share/doc/lynx-2.8.7rel.1 --with-zlib --with-bzlib --with-screen=ncursesw --enable-locale-charset --with-ssl

Mostly self explanatory - we tell it about [zlib] and [bzlib] (bzip2), and [ncurses] (for the chubby letters). I think the [enable-locale-charset] tells it to use the same character set as we have configure for the terminal in the config files at the end of the main build.
make $CORES_TO_USE
make install-full
chgrp -v -R root /usr/share/doc/lynx-2.8.7rel.1/lynx_doc

The locale setting we used for the [configure] script is not reflected in the config file for the browser, so we need to fix that by the magic of [sed]:
sed -i 's/#\(LOCALE_CHARSET\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg

Apparently there is a built in editor in Lynx. I am not sure what this is for. In any event, it is prone to breaking if it sees something complicated, so we can tell it to use the nano editor that we have installed as follows:

sed -i 's/#\(DEFAULT_EDITOR\):/\1:nano/' /etc/lynx/lynx.cfg

We also probably want to save cookies between sessions, so that websites will remember us. Again this is not something that we will be using unless we set up an internet connection in due course. We need to change another setting in the [.cfg] file.

sed -i 's/#\(PERSISTENT_COOKIES\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg

It should be noted here that we could probably just have opened the [.cfg] file in nano and made the changes manually, but there is clearly a sed fanatic at work who has spent several years mastering their sed skills, and it would be rude to ignore the results.

cd ..
rm -rvf lynx2-8-7

There is literally nothing surprising about the commands to install doxygen - just watch out of the name of the unpacked directory:

tar -xzvf /sources/extras/doxygen-1.6.3.src.tar.gz
cd doxygen-1.6.3
./configure --prefix /usr --docdir /usr/share/doc/doxygen-1.6.3
make $CORES_TO_USE
make install
make install_docs
cd ..
rm -rvf doxygen-1.6.3

And for those intending to create a script to run all these from the LFS system itself, copy and paste this bad boy. Note that it does not run the tests because there is no point if the results just go flying past. There is also little point in automating an install if you then build in pauses to check test results.

sudo cat > install_docs.sh << "ARSE" 
cd /sources/extras
tar -xzvf /sources/extras/bc-1.06.tar.gz 
cd bc-1.06 
sed -i '/PROTO.*readline/d' bc/scan.l 
sed -i '/flex -I8/s/8//' configure 
sed -i '/stdlib/a #include <string.h>' lib/number.c 
sed -i 's/program.*save/static &/' bc/load.c 
./configure --prefix=/usr --with-readline 
make $CORES_TO_USE 
make install 
cd .. 
rm -rvf bc-1.06 
tar -xzvf /sources/extras/openssl-0.9.8n.tar.gz 
cd openssl-0.9.8n 
patch -Np1 -i /sources/extras/openssl-0.9.8n-fix_manpages-1.patch 
tar -vxf /sources/extras/BLFS-ca-bundle-3.12.5.tar.bz2 
./config --prefix=/usr --openssldir=/etc/ssl shared zlib-dynamic 
make $CORES_TO_USE 
make MANDIR=/usr/share/man install 
cp -v -r certs /etc/ssl 
install -v -d -m755 /usr/share/doc/openssl-0.9.8n 
cp -v -r       doc/{HOWTO,README,*.{txt,html,gif}} /usr/share/doc/openssl-0.9.8n 
for pem in /etc/ssl/certs/*.pem 
do 
cat $pem 
echo "" 
done > /etc/ssl/ca-bundle.crt 
cd .. 
rm -rvf openssl-0.9.8n 
tar -xjvf /sources/extras/lynx2.8.7rel.1.tar.bz2 
cd lynx2-8-7 
./configure --prefix=/usr --sysconfdir=/etc/lynx --datadir=/usr/share/doc/lynx-2.8.7rel.1 --with-zlib --with-bzlib --with-screen=ncursesw --enable-locale-charset --with-ssl 
make $CORES_TO_USE
make install-full 
chgrp -v -R root /usr/share/doc/lynx-2.8.7rel.1/lynx_doc 
sed -i 's/#\(LOCALE_CHARSET\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg 
sed -i 's/#\(DEFAULT_EDITOR\):/\1:nano/' /etc/lynx/lynx.cfg 
sed -i 's/#\(PERSISTENT_COOKIES\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg 
cd .. 
rm -rvf lynx2-8-7 
tar -xzvf /sources/extras/doxygen-1.6.3.src.tar.gz 
cd doxygen-1.6.3 
./configure --prefix /usr --docdir /usr/share/doc/doxygen-1.6.3 
make $CORES_TO_USE
make install 
make install_docs 
cd .. 
rm -rvf doxygen-1.6.3 
ARSE
chmod +x ./install_docs.sh
sudo mv ./install_docs.sh /media/lfs/root