sudo apt-get install calibre
Should deal with dependencies, but will install an OOD version. So then:
sudo python -c "import urllib2; exec urllib2.urlopen('http://status.calibre-ebook.com/linux_installer').read(); main()"
To update to the latest.
Sigil for ePub editing:
wget http://sigil.googlecode.com/files/Sigil-0.3.1-Linux-x86-Setup.bin
chmod +x Sigil-0.3.1-Linux-x86-Setup.bin
sudo ./Sigil-0.3.1-Linux-x86-Setup.bin
Open the ePub file in Sigil. If it doesn't open or has an error, convert the epub to itself, which will over write the existing epub - so back up first.
Then open the folder "Styles" under the Book Browser, and open the Stylesheet.css
In the style sheet, change all margin{left,right} to 0.
Control S to save. Then exit Sigil.
Friday, 31 December 2010
Friday, 24 December 2010
LFS - Openbox Configuration
I originally wrote the following before I put together the far more sensible popular dependencies post, which cut down the shit significantly. I leave this here therefore, as an example of the joys of dependency hell.
I decide I want to install the obconf program which lets me configure openbox from a gui, and obmenu which lets me configure openbox's menu from, drum roll, a gui. Shocker. So, lets start by having a look at the README in the latest version of obmenu:
OK, so we installed Python 2.6.4 for Firefox, so we just need the other two. Now, what about obconf. Great, there is nothing in the README file for obconf. However, if you go to the website for obconf here, you get this:
So, we have GTK and Openbox (it take a special kind of mind to decide to point out that the configuration software for openbox needs openbox to be installed). Not sure what this Glade thing is, but it echos the python-glade package needed for obconf. A ha! It is an interface designer. Interestingly, wikipedia has in in the same category of tools as MUI for the Amiga. The glade 2.x library is presumably the libglade package referred to in BLFS. Good news is we have previously installed both of its dependencies, libxml2 and GTK+2. Now, as far as I and Google can gather there is no such fucking thing as python-glade, so I am operating on the presumption that python-glade = Glade 2.x library = libglade.
Error, error, error and then I check the page and discover that one of the tests is supposed to fail. OK, hands up that was my fault.
So that should be all the dependencies sorted out for obconf. Next is obmenu. Let's start with pygtk. Its README file says this about dependencies:
So, we obviously have GCC, we also have Python. We also have GTK+2 higher than all version listed there, as well as GLib (remember this is G(nome)Lib not G(nu)Libc). We have just installed libglade, so we are good to go. Not going to bother with the optional stuff. Lets just do this PyGObject thingy. In turn, it requires gobject-introspection, although it doesn't tell you that in its README. gobject-introspection in turn requires libiffi, according to BLFS.
Actually installing gobject-introspection was a right pain in the arse. The one with instructions in BLFS at the time of writing (0.6.14) doesn't fucking work with pygobject 2.26.0 (which is the latest available at the time of writing), so I downloaded the latest version of this. Which doesn't fucking work with my version of Glib. Ah fuck. So it turns into a guessing game to find a version of gobject-introspection which works with my glib AND pygobject. Bastard. 0.9.5 works. Oh, hang on:
No it fucking doesn't. Right. Lets try to solve this from the other direction and find the version of pygobject that will fucking work with gobject-introspection 0.6.14. By the way, what the fuck is gobject-introspection. It sounds suspiciously like an arts student's 'kooky' first album.
It turns out that if you look at the publish date of 0.6.14 it is 3rd June 2010. If you then look at 2.21 of pygobject that was published on 12th July 2010. Hmmm. Probably too late. 2.20 was September 2009 so that will definitely work with 0.6.14. Good. Progress. I install 2.20.
Well it installed, but then when I came to the next step (pygtk), oh, holy fucking shitting bastard. When I then downloaded 2.22 of pygtk, its README file states, and I quote:
What do I have? I have 2.20 - look its right up there! But when ./configuring I got:
Cocksucker. So when it SAYS 2.12.1 or higher it actually means 2.21.3 or higher. Looks like some lazy bastard hasn't updated the README file doesn't it? After checking file dates ... if I drop back to 2.17 of pygtk that should sync with 2.20 of PyGObject that I have installed.
Oh, jesus fuck give me strength. YES IT FUCKING IS. I try 2.21 of pygtk and I get exactly the same fucking, manifestly false, bullshit statement. Right. Lets try 2.21.3 of pygobject since pygtk seems to desire that above all other things.
Man, that is cutting things pretty god damned fine. And does it fucking work? Does it fuck. Right, lets try exactly 2.16.1 of pygobject.
Now for pygtk 2.17 again ...
God fucking damn cunting it. PYCAIRO is supposed to be a fucking optional package.
Well, at fucking last. Lesson? PYCairo is NOT FUCKING OPTIONAL. Probably all the other versions of pygtk were stalling on this as well, so my install is now completely unnecessarily retarded. Bastard.
Amazingly obmenu installed and is functional after all that shite. On the other hand obconf does not fucking work because Startup Notification has not been installed - boo fucking hoo. Bastard arseholes. This wasn't mentioned anywhere in its README of course.
And, fucking hell, they both now work. That was not fun.
By way of summary, the follow packages turned out to be needed:
(GTK+2, Python, libxml2)
I decide I want to install the obconf program which lets me configure openbox from a gui, and obmenu which lets me configure openbox's menu from, drum roll, a gui. Shocker. So, lets start by having a look at the README in the latest version of obmenu:
REQUERIMENTS: python >= 2.3, pygtk, python-glade
OK, so we installed Python 2.6.4 for Firefox, so we just need the other two. Now, what about obconf. Great, there is nothing in the README file for obconf. However, if you go to the website for obconf here, you get this:
Compiling ObConf requires the following packages: GTK+ 2.x library and headers (development package) Glade 2.x library and headers (development package) Openbox 3.4 or above (the libraries development package if it is separate)
So, we have GTK and Openbox (it take a special kind of mind to decide to point out that the configuration software for openbox needs openbox to be installed). Not sure what this Glade thing is, but it echos the python-glade package needed for obconf. A ha! It is an interface designer. Interestingly, wikipedia has in in the same category of tools as MUI for the Amiga. The glade 2.x library is presumably the libglade package referred to in BLFS. Good news is we have previously installed both of its dependencies, libxml2 and GTK+2. Now, as far as I and Google can gather there is no such fucking thing as python-glade, so I am operating on the presumption that python-glade = Glade 2.x library = libglade.
wget http://ftp.gnome.org/pub/gnome/sources/libglade/2.6/libglade-2.6.4.tar.bz2 tar -jxvf libglade-2.6.4.tar.bz2 cd libglade-2.6.4 ./configure --prefix=/usr && make make check
Error, error, error and then I check the page and discover that one of the tests is supposed to fail. OK, hands up that was my fault.
make install cd .. rm -rvf libglade-2.6.4
So that should be all the dependencies sorted out for obconf. Next is obmenu. Let's start with pygtk. Its README file says this about dependencies:
Requirements ============ * C compiler (GCC and MSVC supported) * Python 2.3.5 or higher * PyGObject 2.12.1 or higher * Glib 2.8.0 or higher * GTK+ 2.8.0 or higher (optional) or GTK+ 2.10.0 or higher for 2.10 API GTK+ 2.12.0 or higher for 2.12 API GTK+ 2.14.0 or higher for 2.14 API GTK+ 2.16.0 or higher for 2.16 API * libglade 2.5.0 or higher (optional) * pycairo 1.0.2 or higher (optional) * numpy (optional)
So, we obviously have GCC, we also have Python. We also have GTK+2 higher than all version listed there, as well as GLib (remember this is G(nome)Lib not G(nu)Libc). We have just installed libglade, so we are good to go. Not going to bother with the optional stuff. Lets just do this PyGObject thingy. In turn, it requires gobject-introspection, although it doesn't tell you that in its README. gobject-introspection in turn requires libiffi, according to BLFS.
wget ftp://sourceware.org/pub/libffi/libffi-3.0.8.tar.gz tar -xzvf libffi-3.0.8.tar.gz cd libffi-3.0.8 ./configure --prefix=/usr && make make install cd .. rm -rvf libffi-3.0.8
Actually installing gobject-introspection was a right pain in the arse. The one with instructions in BLFS at the time of writing (0.6.14) doesn't fucking work with pygobject 2.26.0 (which is the latest available at the time of writing), so I downloaded the latest version of this. Which doesn't fucking work with my version of Glib. Ah fuck. So it turns into a guessing game to find a version of gobject-introspection which works with my glib AND pygobject. Bastard. 0.9.5 works. Oh, hang on:
subprocess.CalledProcessError: Command '['/bin/sh', '../../libtool', '--mode=link', '--tag=CC', '--silent', 'gcc', '-o', '/dev/shm/gobject-introspection-0.9.5/tests/scanner/tmp-introspect696b_W/Regress-1.0', '-L.', 'libregress.la', '../../girepository/libgirepository-1.0.la', '-pthread', '-lgio-2.0', '-lgobject-2.0', '-lgmodule-2.0', '-lgthread-2.0', '-lrt', '-lglib-2.0', '/dev/shm/gobject-introspection-0.9.5/tests/scanner/tmp-introspect696b_W/Regress-1.0.o']' returned non-zero exit status 1
No it fucking doesn't. Right. Lets try to solve this from the other direction and find the version of pygobject that will fucking work with gobject-introspection 0.6.14. By the way, what the fuck is gobject-introspection. It sounds suspiciously like an arts student's 'kooky' first album.
wget http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/0.6/gobject-introspection-0.6.14.tar.bz2 tar -xjvf gobject-introspection-0.6.14.tar.bz2 cd gobject-introspection-0.6.14 ./configure --prefix=/usr --disable-tests && make make check make install cd .. rm -rvf gobject-introspection-0.6.14
It turns out that if you look at the publish date of 0.6.14 it is 3rd June 2010. If you then look at 2.21 of pygobject that was published on 12th July 2010. Hmmm. Probably too late. 2.20 was September 2009 so that will definitely work with 0.6.14. Good. Progress. I install 2.20.
Well it installed, but then when I came to the next step (pygtk), oh, holy fucking shitting bastard. When I then downloaded 2.22 of pygtk, its README file states, and I quote:
PyGObject 2.12.1 or higher
What do I have? I have 2.20 - look its right up there! But when ./configuring I got:
checking for PYGOBJECT... configure: error: Package requirements (pygobject-2.0 >= 2.21.3) were not met:
Cocksucker. So when it SAYS 2.12.1 or higher it actually means 2.21.3 or higher. Looks like some lazy bastard hasn't updated the README file doesn't it? After checking file dates ... if I drop back to 2.17 of pygtk that should sync with 2.20 of PyGObject that I have installed.
checking for PYGOBJECT... configure: error: Package requirements (pygobject-2.0 >= 2.16.1) were not met: No package 'pygobject-2.0' found
Oh, jesus fuck give me strength. YES IT FUCKING IS. I try 2.21 of pygtk and I get exactly the same fucking, manifestly false, bullshit statement. Right. Lets try 2.21.3 of pygobject since pygtk seems to desire that above all other things.
checking for GLIB - version >= 2.22.4... yes (version 2.22.4)
Man, that is cutting things pretty god damned fine. And does it fucking work? Does it fuck. Right, lets try exactly 2.16.1 of pygobject.
wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.16/pygobject-2.16.1.tar.bz2 tar -xjvf pygobject-2.16.1.tar.bz2 cd pygobject-2.16.1 ./configure --prefix=/usr make make install cd .. rm -rvf pygobject-2.16.1
Now for pygtk 2.17 again ...
checking for PYCAIRO... no no not checking for gtk due to missing pycairo checking for GDK target... x11 configure: WARNING: Could not find a valid numpy installation, disabling. checking whether gcc understands -Wall... yes checking whether gcc understands -fno-strict-aliasing... yes checking whether gcc understands -std=c9x... yes configure: error: conditional "HAVE_GTK_2_16" was never defined. Usually this means the macro was only invoked conditionally.
God fucking damn cunting it. PYCAIRO is supposed to be a fucking optional package.
* pycairo 1.0.2 or higher (optional)See - OPTIONAL. Right.
wget http://cairographics.org/releases/py2cairo-1.8.10.tar.gz tar -xzvf py2cairo-1.8.10.tar.gz cd pycairo-1.8.10 ./configure --prefix=/usr make make install cd .. rm -rvf pycairo-1.8.10
wget http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/pygtk-2.17.0.tar.bz2 tar -xjvf pygtk-2.17.0.tar.bz2 cd pygtk-2.17.0 ./configure --prefix=/usr make make install cd .. rm -rvf pygtk-2.17.0
Well, at fucking last. Lesson? PYCairo is NOT FUCKING OPTIONAL. Probably all the other versions of pygtk were stalling on this as well, so my install is now completely unnecessarily retarded. Bastard.
wget http://prdownloads.sourceforge.net/obmenu/obmenu-1.0.tar.gz?download tar -xzvf obmenu-1.0.tar.gz cd obmenu-1.0 python setup.py install cd .. rm -rvf obmenu-1.0
Amazingly obmenu installed and is functional after all that shite. On the other hand obconf does not fucking work because Startup Notification has not been installed - boo fucking hoo. Bastard arseholes. This wasn't mentioned anywhere in its README of course.
wget http://ftp.gnome.org/pub/gnome/sources/startup-notification/0.9/startup-notification-0.9.tar.bz2 tar -xjvf startup-notification-0.9.tar.bz2 cd startup-notification-0.9 ./configure --prefix=/usr && make make install && install -v -m644 -D doc/startup-notification.txt /usr/share/doc/startup-notification-0.9/startup-notification.txt cd .. rm -rvf startup-notification-0.9
wget http://openbox.org/dist/obconf/obconf-2.0.3.tar.gz tar -xzvf obconf-2.0.3.tar.gz cd obconf-2.0.3 ./configure --prefix=/usr make make install cd .. rm -rvf obconf-2.0.3
And, fucking hell, they both now work. That was not fun.
By way of summary, the follow packages turned out to be needed:
(GTK+2, Python, libxml2)
obmenu <-- libglade <-- pygtk <-- pygobject <-- gobject-introspection <-- libffi <-- pycairo
obconf <-- libglade <-- startup-notification
Labels:
linux from scratch,
openbox,
post project,
praying for death
Friday, 17 December 2010
Copy USB Install to HDD
mke2fs -jv -L lfs /dev/sda?
mkdir /media/lfs
mount /dev/sda7 /media/lfs
cd /media/amiga
sudo cp -axv . /media/lfs
sudo chroot "/media/lfs" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin CORES_TO_USE=-j2 /bin/bash --login
grub --batch < /etc/grub.conf
OR
sudo mkdir /media/root
sudo mount -t ext3 /dev/sda? /media/root
sudo mount -t proc none /media/root/proc
sudo mount -o bind /dev /media/root/dev
sudo chroot /media/root /bin/bash
sudo grub
find /boot/grub/stage1
root (hd0,Y)
setup (hd0)
mkdir /media/lfs
mount /dev/sda7 /media/lfs
cd /media/amiga
sudo cp -axv . /media/lfs
sudo chroot "/media/lfs" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin CORES_TO_USE=-j2 /bin/bash --login
grub --batch < /etc/grub.conf
OR
sudo mkdir /media/root
sudo mount -t ext3 /dev/sda? /media/root
sudo mount -t proc none /media/root/proc
sudo mount -o bind /dev /media/root/dev
sudo chroot /media/root /bin/bash
sudo grub
find /boot/grub/stage1
root (hd0,Y)
setup (hd0)
Friday, 10 December 2010
Updated BLFS Packages - OpenOffice.org
mkdir /sources/ooo cd /sources/ooo wget http://ftp.gnu.org/gnu/gperf/gperf-3.0.4.tar.gz wget http://ftp.osuosl.org/pub/openoffice/stable/3.2.1/OOo_3.2.1_src_core.tar.bz2 wget http://ftp.osuosl.org/pub/openoffice/stable/3.2.1/OOo_3.2.1_src_system.tar.bz2 wget http://www.linuxfromscratch.org/patches/blfs/svn/OOo_3.2.1-build_with_db5-1.patch wget ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/1.1.14/seamonkey-1.1.14.source.tar.bz2 wget ftp://ftp.osuosl.org/pub/openoffice/stable/3.2.1/OOo_3.2.1_src_l10n.tar.bz2 wget ftp://ftp.osuosl.org/pub/openoffice/stable/3.2.1/OOo_3.2.1_src_extensions.tar.bz2
We need to install one dependency 'gperf':
tar -xzvf /sources/ooo/gperf-3.0.4.tar.gz cd gperf-3.0.4 ./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.0.4 && make make install && install -m644 -v doc/gperf.{dvi,ps,pdf,txt} /usr/share/doc/gperf-3.0.4 && pushd /usr/share/info && rm -v dir && for FILENAME in *; do install-info $FILENAME dir 2>/dev/null done && popd cd .. rm -rvf gperf-3.0.4
And now for OpenOffice.org which you just cannot install from a ramdisk on a 32bit machine.
cd /sources/ooo tar -xjvf OOo_3.2.1_src_system.tar.bz2 tar -xjvf OOo_3.2.1_src_core.tar.bz2 tar -xjvf OOo_3.2.1_src_extensions.tar.bz2 tar -xjvf OOo_3.2.1_src_l10n.tar.bz2 cd OOO320_m19 cp ../seamonkey-1.1.14.source.tar.bz2 moz/download/
Don't follow the instructions in BLFS, it gets the seamonkey filename wrong. Apparently OOo shits itself if you have certain environment variables set, so unset them and fire on a patch. In a rapidly developing theme the patch file name is also wrong on BLFS.
umask 0022 && unset LANG LC_ALL patch -Np1 -i ../OOo_3.2.1-build_with_db5-1.patch autoreconf
Now, set the configuration.
PKG_CONFIG=/usr/bin/pkg-config ./configure \ --enable-graphite \ --disable-lockdown \ --disable-binfilter \ --disable-fontooo \ --disable-cups \ --enable-fontconfig \ --disable-symbols \ --disable-gnome-vfs \ --disable-systray \ --disable-odk \ --disable-qadevooo \ --enable-cairo \ --disable-dbus \ --disable-gconf \ --enable-gio \ --disable-pam \ --without-afms \ --without-fonts \ --without-ppds \ --without-pam \ --with-system-stdlibs \ --with-system-libxml \ --with-system-libxslt \ --with-system-cairo \ --with-system-expat \ --with-system-zlib \ --with-system-jpeg \ --with-system-openssl \ --with-system-python \ --with-system-curl \ --with-system-freetype \ --with-jdk-home=/opt/jdk \ --with-java \ --with-ant-home=/opt/ant \ --with-perl-home=/usr \ --with-x \ --with-lang="en-GB" \ --with-dict=ENGB \ --with-package-format=native \ --with-vendor="Your name here" \ --with-use-shell=bash
Now compile this all with:
source LinuxX86Env.Set.sh && ./bootstrap && make $CORES_TO_USE
Then to install (several hours later):
pushd instsetoo_native/unxlng?6.pro/OpenOffice/native/install/en-US/linux-2.6-*/buildroot/opt && cp -r -v openoffice.org3 /opt/openoffice-3.2.1 && cp -r -v openoffice.org/* /opt/openoffice-3.2.1 && ln -sf basis3.2 /opt/openoffice-3.2.1/basis-link && popd
for appl in sbase scalc sdraw simpress smath soffice spadmin swriter do ln -v -sf /opt/openoffice-3.2.1/program/$appl /usr/bin done
pushd sysui/desktop/icons && install -v -m755 -d /usr/share/icons/{hicolor,locolor} && cp -r -v hicolor/* /usr/share/icons/hicolor && cp -r -v locolor/* /usr/share/icons/locolor && popd
install -v -d -m755 /usr/share/applications && pushd /opt/openoffice-3.2.1/share/xdg/ && for appl in *.desktop do sed -i '/Exec/d' $appl && echo "Exec=/usr/bin/s`echo $appl | sed 's/.desktop//'`" >> $appl && sed -i '/Icon/d' $appl && echo "Icon=`echo "ooo-${appl}3.2" | sed 's/\.desktop//'`" >> $appl done && sed -i 's@bin/sprinteradmin@bin/spadmin@' printeradmin.desktop && cp -v *.desktop /usr/share/applications && popd
update-desktop-database
cp -v dictionaries/unxlngi6.pro/bin/dict-*.oxt sdext/unxlngi6.pro/bin/*.oxt reportbuilder/unxlngi6.pro/bin/report-builder.oxt swext/unxlngi6.pro/bin/wiki-publisher.oxt /opt/openoffice-3.2.1/share/extension/install
for ext in /opt/openoffice-3.2.1/share/extension/install/*.oxt do /opt/openoffice-3.2.1/program/unopkg add --shared --verbose $ext done
ln -sv /opt/openoffice-3.2.1/program/libnpsoplugin.so ${FFPATH}/plugins
Thursday, 9 December 2010
Updated BLFS Packages - Firefox
First the stand alone Firefox dependency Yasm:
Now Firefox:
Be sure to check your install path and then change the text in the following command if needs be:
And now download and install the essential plugin flashplayer, and link the Java plugin.
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 cd .. rm -rvf yasm-0.8.0
Now Firefox:
cd /sources/extras wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/4.0b7/source/firefox-4.0b7.source.tar.bz2 cd /dev/shm tar -xjvf /sources/extras/firefox-4.0b7.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" #Or -j4 or -j8 or comment the whole thing out for single core. ac_add_options --prefix=/opt/firefox ac_add_options --enable-optimize ac_add_options --enable-system-cairo ac_add_options --enable-system-sqlite ac_add_options --enable-pango ac_add_options --with-system-nspr ac_add_options --with-system-nss 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*
Be sure to check your install path and then change the text in the following command if needs be:
cat >> /etc/profile.d/custom_variables.sh << "EOF" FFPATH=/opt/firefox/lib/firefox-4.0b7 EOF source /etc/profile cat >> /etc/ld.so.conf << "EOF" # Extra Path so Firefox's libraries can be used by Flash10 /opt/firefox/lib/firefox-4.0b7 # End of Extra Path. EOF
And now download and install the essential plugin flashplayer, and link the Java plugin.
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 ${FFPATH}/plugins cp -v libflashplayer.so ${FFPATH}/plugins ln -sv /opt/jdk/jre/lib/i386/libnpjp2.so ${FFPATH}/plugins
Wednesday, 8 December 2010
Updated BLFS Packages - Desktop
We are using a slightly different install procedure this time. We are starting with GTK, then installing the Dependencies, and then moving on to applications. I put Openbox and Slim under that category, so here we go with the streamlined install now that the dependencies are taken care of:
Remember to nano both /etc/slim.conf and /etc/inittab, and to change the settings therein confirm to the instructions here.
cd /sources/desktop wget http://download.berlios.de/slim/slim-1.3.2.tar.gz wget http://openbox.org/dist/openbox/openbox-3.4.11.1.tar.gz wget http://prdownloads.sourceforge.net/obmenu/obmenu-1.0.tar.gz wget http://openbox.org/dist/obconf/obconf-2.0.3.tar.gz cd /dev/shm tar -xzvf /sources/desktop/slim-1.3.2.tar.gz cd slim-1.3.2 sed -i -e "s:^MANDIR=.*:MANDIR=/usr/share/man:" -e "s:/usr/X11R6:/usr:" Makefile sed -i -e 's#X11R6/##g' -e 's#/usr/bin:##' -e 's/# daemon/daemon/' slim.conf make $CORES_TO_USE make install cat >> /etc/inittab << "EOF" x:5:respawn:/usr/bin/slim >& /dev/null EOF cd .. rm -rf slim-1.3.2 tar -xzvf /sources/desktop/openbox-3.4.11.1.tar.gz cd openbox-3.4.11.1 ./configure --prefix=/usr --sysconfdir=/etc --disable-session-management make $CORES_TO_USE make install cat > /root/.xinitrc << "EOF" # Begin .xinitrc file #xterm -g 80x20+0+0 & #xclock -g 100x100-0+0 & exec openbox-session EOF cd .. rm -rvf openbox-3.4.11.1 mkdir -p ~/.config/openbox cp /etc/xdg/openbox/*.* ~/.config/openbox cat > ~/.config/openbox/menu.xml << "EOF" <?xml version="1.0" encoding="UTF-8"?> <openbox_menu xmlns="http://openbox.org/3.4/menu"> <menu id="apps-editors-menu" label="Editors"> <item label="nano"> <action name="Execute"> <command>xterm -e /usr/bin/nano</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> </menu> <menu id="apps-term-menu" label="Terminals"> <item label="Xterm"> <action name="Execute"><command>xterm</command></action> </item> </menu> <menu id="apps-net-menu" label="Internet"> <item label="lynx"> <action name="Execute"> <command>xterm -e /usr/bin/lynx</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> </menu> <menu id="apps-multimedia-menu" label="Multimedia"> <item label="alsamixer"> <action name="Execute"> <command>xterm -e /usr/bin/alsamixer</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> </menu> <menu id="system-menu" label="System"> <item label="Openbox Configuration Manager"> <action name="Execute"> <command>obconf</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> <item label="Openbox Menu Editor"> <action name="Execute"> <execute>obmenu</execute> </action> </item> <separator /> <item label="Reconfigure Openbox"> <action name="Reconfigure" /> </item> </menu> <menu id="root-menu" label="Openbox 3"> <separator label="Applications" /> <menu id="apps-editors-menu"/> <menu id="apps-net-menu"/> <menu id="apps-multimedia-menu"/> <menu id="apps-term-menu"/> <separator label="System" /> <menu id="system-menu"/> <separator /> <item label="Log Out"> <action name="Exit"> <prompt>yes</prompt> </action> </item> </menu> </openbox_menu> EOF tar -xzvf /sources/desktop/obmenu-1.0.tar.gz cd obmenu-1.0 python setup.py install cd .. rm -rvf obmenu-1.0 tar -xzvf /sources/desktop/obconf-2.0.3.tar.gz cd obconf-2.0.3 ./configure --prefix=/usr make $CORES_TO_USE make install cd .. rm -rvf obconf-2.0.3
Remember to nano both /etc/slim.conf and /etc/inittab, and to change the settings therein confirm to the instructions here.
Tuesday, 7 December 2010
LFS - Popular Dependencies
I have installed a number of bits of software onto my bare LFS/X/GTK system now, and I have noticed that I have come across the same dependencies time and again. I have installed Firefox, OpenOffice and a number of smaller applications, all of which shared to an extent background software. So, for the next build, I thought it would be a good idea to stick all of that software into a blogpost so I have a record of the shared stuff, so I can install it all in a one-er and then get on with the applications themselves.
First of all, there are a few packages which crop up and I keep having to double check that I have installed them. I have, because they form part of the core system. They are:
Installed with LFS
zlib
libuuid
Installed Basics
zip
unzip
lzma
openssl
Installed with Xorg:
XML::Parser
Intltool
libpng (and yes I applied the patch to allow it to be used with Firefox)
Fontconfig
Pixman
Installed with GTK:
Cairo
Pango
PCRE
tiff
jpeg
I do not need to worry about those again, they are already installed. So what is not, and what is the best order to install these extras in? I think first of all we will install some programs that do not depend on any of the other packages we are about to dump into the system. SQLite is a database program and startup-notification makes the pointer do the hourglass thing while another program is starting up. For some programs, unbelievably this is actually a prerequisite.
I am going to stick all of these source files in a separate folder in sources - this is just to show that they are not part of the structure of LFS, and neither are they the Applications that I will end up running.
Lets move on to a biggie which is the Python language. A number of applications use this, as do some of the intermediate libraries.
Right, now it is time for some hot library action:
Still on the libraries front, we installed Glib, Cairo, Pango and GTK. Some applications need GTK to be able to speak C++ so we need to install the following crossover libraries (the libsigc++ is needed for glibmm). Note that this project has taken so long that I am now out of date with my version of glib. I had to update it before I could install glibmm. I also had to update gtk+2 and ATK, but not cairo or pango. I will write up a new GTK+2 installation post to bring the installation up to date.
The next set are modules which plug in to the Python and give it access to GTK.
Sticking with the previous theme, we also need to install some modules for Perl:
Now we need some applications which are regularly relied on:
And some C++ stuff which I am a little in the dark about.
Some security libraries (and a stand alone SQLite database to support them:
Lastly I am going to install some Java software including, stunningly, Java. Download the Java source from this link into the /sources/extras folder. Then run these commands:
JUnit is not, as you may be forgiven for assuming, a boy band. It is, instead, a small Java application that allows various tests to be run on other Java applications, such as Apache Ant which is a Java based alternative to [make] and OpenOffice.org, amongst others, is going to use it to compile.
First of all, there are a few packages which crop up and I keep having to double check that I have installed them. I have, because they form part of the core system. They are:
Installed with LFS
zlib
libuuid
Installed Basics
zip
unzip
lzma
openssl
Installed with Xorg:
XML::Parser
Intltool
libpng (and yes I applied the patch to allow it to be used with Firefox)
Fontconfig
Pixman
Installed with GTK:
Cairo
Pango
PCRE
tiff
jpeg
I do not need to worry about those again, they are already installed. So what is not, and what is the best order to install these extras in? I think first of all we will install some programs that do not depend on any of the other packages we are about to dump into the system. SQLite is a database program and startup-notification makes the pointer do the hourglass thing while another program is starting up. For some programs, unbelievably this is actually a prerequisite.
I am going to stick all of these source files in a separate folder in sources - this is just to show that they are not part of the structure of LFS, and neither are they the Applications that I will end up running.
mkdir /sources/dependencies cd /sources/dependencies wget http://ftp.gnome.org/pub/gnome/sources/startup-notification/0.9/startup-notification-0.9.tar.bz2 wget http://sqlite.org/sqlite-amalgamation-3.7.3.tar.gz cd /dev/shm tar -xjvf /sources/dependencies/startup-notification-0.9.tar.bz2 cd startup-notification-0.9 ./configure --prefix=/usr && make $CORES_TO_USE make install && install -v -m644 -D doc/startup-notification.txt /usr/share/doc/startup-notification-0.9/startup-notification.txt cd .. rm -rvf startup-notification-0.9 tar -xzvf /sources/dependencies/sqlite-amalgamation-3.7.3.tar.gz cd sqlite-3.7.3 CFLAGS="-g -O2 -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY=1" ./configure --prefix=/usr --enable-threadsafe --enable-readline --enable-dynamic-extensions && make $CORES_TO_USE make install cd .. rm -rvf sqlite-3.7.3
Lets move on to a biggie which is the Python language. A number of applications use this, as do some of the intermediate libraries.
cd /sources/dependencies 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 cd /dev/shm tar -xjvf /sources/dependencies/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/dependencies/Python-2.6.4-bdb_4.8-1.patch ./configure --prefix=/usr --enable-shared make $CORES_TO_USE 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/dependencies/python-2.6-docs-html.tar.bz2 cat >> /etc/profile.d/35-python.sh << "EOF" export PYTHONDOCS=/usr/share/doc/Python-2.6.4/html EOF cd .. rm -rvf Python-2.6.4
Right, now it is time for some hot library action:
cd /sources/dependencies wget http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2 wget http://xmlsoft.org/sources/libxml2-2.7.6.tar.gz wget http://xmlsoft.org/sources/libxslt-1.1.26.tar.gz wget ftp://sourceware.org/pub/libffi/libffi-3.0.8.tar.gz wget http://ftp.gnome.org/pub/gnome/sources/libglade/2.6/libglade-2.6.4.tar.bz2 cd /dev/shm tar -xjvf /sources/dependencies/libIDL-0.8.14.tar.bz2 cd libIDL-0.8.14 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf libIDL-0.8.14 tar -xzvf /sources/dependencies/libxml2-2.7.6.tar.gz cd libxml2-2.7.6 ./configure --prefix=/usr make $CORES_TO_USE make install cd .. rm -rvf libxml2-2.7.6 tar -xzvf /sources/dependencies/libxslt-1.1.26.tar.gz cd libxslt-1.1.26 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf libxslt-1.1.26 tar -xzvf /sources/dependencies/libffi-3.0.8.tar.gz cd libffi-3.0.8 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf libffi-3.0.8 tar -jxvf /sources/dependencies/libglade-2.6.4.tar.bz2 cd libglade-2.6.4 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf libglade-2.6.4
Still on the libraries front, we installed Glib, Cairo, Pango and GTK. Some applications need GTK to be able to speak C++ so we need to install the following crossover libraries (the libsigc++ is needed for glibmm). Note that this project has taken so long that I am now out of date with my version of glib. I had to update it before I could install glibmm. I also had to update gtk+2 and ATK, but not cairo or pango. I will write up a new GTK+2 installation post to bring the installation up to date.
cd /sources/dependencies wget http://cairographics.org/releases/cairomm-1.6.2.tar.gz wget http://ftp.gnome.org/pub/gnome/sources/libsigc++/2.2/libsigc++-2.2.8.tar.bz2 wget http://ftp.gnome.org/pub/gnome/sources/glibmm/2.24/glibmm-2.24.2.tar.bz2 wget http://ftp.gnome.org/pub/gnome/sources/pangomm/2.26/pangomm-2.26.2.tar.bz2 wget http://ftp.gnome.org/pub/gnome/sources/gtkmm/2.20/gtkmm-2.20.3.tar.bz2 cd /dev/shm tar -xzvf /sources/dependencies/cairomm-1.6.2.tar.gz cd cairomm-1.6.2 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf cairomm-1.6.2 tar -xjvf /sources/dependencies/libsigc++-2.2.8.tar.bz2 cd libsigc++-2.2.8 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf libsigc++-2.2.8 tar -xjvf /sources/dependencies/glibmm-2.24.2.tar.bz2 cd glibmm-2.24.2 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf glibmm-2.24.2 tar -xjvf /sources/dependencies/pangomm-2.26.2.tar.bz2 cd pangomm-2.26.2 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf pangomm-2.26.2 tar -xjvf /sources/dependencies/gtkmm-2.20.3.tar.bz2 cd gtkmm-2.20.3 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf gtkmm-2.20.3
The next set are modules which plug in to the Python and give it access to GTK.
cd /sources/dependencies wget http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/0.6/gobject-introspection-0.6.14.tar.bz2 wget http://ftp.gnome.org/pub/gnome/sources/pygobject/2.21/pygobject-2.21.3.tar.bz2 wget http://cairographics.org/releases/pycairo-1.8.8.tar.gz wget http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/pygtk-2.17.0.tar.bz2 wget http://downloads.sourceforge.net/pyxml/PyXML-0.8.4.tar.gz wget http://ftp.gnome.org/pub/gnome/sources/gtksourceview/2.10/gtksourceview-2.10.4.tar.bz2 wget http://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-2.10.1.tar.bz2 cd /dev/shm tar -xjvf /sources/dependencies/gobject-introspection-0.6.14.tar.bz2 cd gobject-introspection-0.6.14 ./configure --prefix=/usr --disable-tests && make $CORES_TO_USE make install cd .. rm -rvf gobject-introspection-0.6.14 tar -xjvf /sources/dependencies/pygobject-2.21.3.tar.bz2 cd pygobject-2.21.3 ./configure --prefix=/usr make $CORES_TO_USE make install cd .. rm -rvf pygobject-2.21.3 tar -xzvf /sources/dependencies/pycairo-1.8.8.tar.gz cd pycairo-1.8.8 ./configure --prefix=/usr make $CORES_TO_USE make install cd .. rm -rvf pycairo-1.8.8 tar -xjvf /sources/dependencies/pygtk-2.17.0.tar.bz2 cd pygtk-2.17.0 ./configure --prefix=/usr make $CORES_TO_USE make install cd .. rm -rvf pygtk-2.17.0 tar -xzvf /sources/dependencies/PyXML-0.8.4.tar.gz cd PyXML-0.8.4 python setup.py build python setup.py install && install -v -m644 doc/man/xmlproc_*.1 /usr/share/man/man1 && install -v -m755 -d /usr/share/doc/PyXML-0.8.4 && cp -v -R doc demo test /usr/share/doc/PyXML-0.8.4 && install -v -m644 README* /usr/share/doc/PyXML-0.8.4 cd .. rm -rvf PyXML-0.8.4 tar -xjvf /sources/dependencies/gtksourceview-2.10.4.tar.bz2 cd gtksourceview-2.10.4 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf gtksourceview-2.10.4 tar -xjvf /sources/dependencies/pygtksourceview-2.10.1.tar.bz2 cd pygtksourceview-2.10.1 ./configure --prefix=/usr --disable-docs && make $CORES_TO_USE make install cd .. rm -rvf pygtksourceview-2.10.1
Sticking with the previous theme, we also need to install some modules for Perl:
cd /sources/dependencies wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/Archive-Zip-1.20.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/IO-Compress-Base-2.005.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/Compress-Raw-Bzip2-2.005.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/IO-Compress-Bzip2-2.005.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/Compress-Raw-Zlib-2.005.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/IO-Compress-Zlib-2.005.tar.gz wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules/Compress-Zlib-2.005.tar.gz cd /dev/shm tar -xzvf /sources/dependencies/IO-Compress-Base-2.005.tar.gz cd IO-Compress-Base-2.005 perl Makefile.PL && make && make install cd .. rm -rvf IO-Compress-Base-2.005 tar -xzvf /sources/dependencies/Compress-Raw-Bzip2-2.005.tar.gz cd Compress-Raw-Bzip2-2.005 perl Makefile.PL && make && make install cd .. rm -rvf Compress-Raw-Bzip2-2.005 tar -xzvf /sources/dependencies/IO-Compress-Bzip2-2.005.tar.gz cd IO-Compress-Bzip2-2.005 perl Makefile.PL && make && make install cd .. rm -rvf IO-Compress-Bzip2-2.005 tar -xzvf /sources/dependencies/Compress-Raw-Zlib-2.005.tar.gz cd Compress-Raw-Zlib-2.005 sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|" -e "s|INCLUDE\s*= ./zlib-src|INCLUDE = /usr/include|" -e "s|LIB\s*= ./zlib-src|LIB = /usr/lib|" config.in perl Makefile.PL && make && make install cd .. rm -rvf Compress-Raw-Zlib-2.005 tar -xzvf /sources/dependencies/IO-Compress-Zlib-2.005.tar.gz cd IO-Compress-Zlib-2.005 perl Makefile.PL && make && make install cd .. rm -rvf IO-Compress-Zlib-2.005 tar -xzvf /sources/dependencies/Compress-Zlib-2.005.tar.gz cd Compress-Zlib-2.005 perl Makefile.PL && make && make install cd .. rm -rvf Compress-Zlib-2.005 tar -xzvf /sources/dependencies/Archive-Zip-1.20.tar.gz cd Archive-Zip-1.20 perl Makefile.PL && make && make install cd .. rm -rf Archive-Zip-1.20
Now we need some applications which are regularly relied on:
cd /sources/dependencies wget ftp://ftp.gnu.org/gnu/which/which-2.20.tar.gz wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2 cd /dev/shm tar -xzvf /sources/dependencies/which-2.20.tar.gz cd which-2.20 ./configure --prefix=/usr && make $CORES_TO_USE make install cd .. rm -rvf which-2.20 tar -xjvf /sources/dependencies/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 cd .. rm -rvf curl-7.20.0
And some C++ stuff which I am a little in the dark about.
cd /sources/dependencies wget http://downloads.sourceforge.net/boost/boost-jam-3.1.17.tgz wget http://downloads.sourceforge.net/boost/boost_1_37_0.tar.bz2 cd /dev/shm tar -xzvf /sources/dependencies/boost-jam-3.1.17.tgz cd boost-jam-3.1.17 ./build.sh cd bin.linux* && cp -v bjam /usr/bin cd .. rm -rvf boost-jam-3.1.17 tar -xjvf /sources/dependencies/boost_1_37_0.tar.bz2 cd boost_1_37_0 ./configure --prefix=/usr --with-toolset=gcc --with-bjam=/usr/bin/bjam && make $CORES_TO_USE make install && ln -sfnv boost-1_37/boost /usr/include/boost cd .. rm -rvf boost_1_37_0
Some security libraries (and a stand alone SQLite database to support them:
cd /sources/dependencies wget http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.6/src/nspr-4.8.6.tar.gz wget http://www.linuxfromscratch.org/patches/blfs/svn/nspr-4.8.6-pkgconfig-1.patch wget http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_4_RTM/src/nss-3.12.4.tar.gz wget http://svn.cross-lfs.org/svn/repos/patches/nss/nss-3.12.4-fixes-1.patch wget http://cross-lfs.org/~jciccone/nss-3.12-r5-config.in cd /dev/shm tar -xzvf /sources/dependencies/nspr-4.8.6.tar.gz cd nspr-4.8.6 patch -Np1 -i /sources/dependencies/nspr-4.8.6-pkgconfig-1.patch && cd mozilla/nsprpub && ./configure --prefix=/usr --with-mozilla --with-pthreads && make $CORES_TO_USE make install && cp -v -LR dist/include/nspr /usr/include && rm -v -f /usr/bin/{prerr.properties,compile-et.pl} cd ../../.. rm -rvf nspr-4.8.6 tar -xzvf /sources/dependencies/nss-3.12.4.tar.gz cd nss-3.12.4 patch -Np0 -i /sources/dependencies/nss-3.12.4-fixes-1.patch && sed -i 's@\$(MKSHLIB) -o@\$(MKSHLIB) \$(LDFLAGS) -o@g' mozilla/security/coreconf/rules.mk && for dir in mozilla/security/{coreconf,dbm,nss}; do make -C $dir BUILD_OPT=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 NSPR_INCLUDE_DIR=$(pkg-config --variable=includedir nspr) NSPR_LIB_DIR=$(pkg-config --variable=libdir nspr) FREEBL_NO_DEPEND=1 || break done for file in libsoftokn3.so libfreebl3.so libnss3.so libnssutil3.so libssl3.so libsmime3.so libnssckbi.so libnssdbm3.so; do install -m755 mozilla/dist/*.OBJ/lib/${file} /usr/lib done for file in libcrmf.a libnssb.a libnssckfw.a; do install -m644 mozilla/dist/*.OBJ/lib/${file} /usr/lib done for file in certutil cmsutil crlutil modutil pk12util signtool signver ssltap; do install -m755 mozilla/dist/*.OBJ/bin/${file} /usr/bin done install -m755 -d /usr/include/nss3 install -m644 mozilla/dist/public/nss/*.h /usr/include/nss3 && ln -sfv nss3 /usr/include/nss cat > /usr/lib/pkgconfig/nss.pc << "EOF" prefix=/usr exec_prefix=/usr/bin libdir=/usr/lib includedir=/usr/include/nss3 Name: NSS Description: Network Security Services Version: 3.12.4 Requires: sqlite3 nspr >= 4.8 Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3 Cflags: -I${includedir} EOF chmod 644 /usr/lib/pkgconfig/nss.pc ln -sfv nss.pc /usr/lib/pkgconfig/mozilla-nss.pc install -v -m755 /sources/dependencies/nss-3.12-r5-config.in /usr/bin/nss-config && sed -i -e "s/@MOD_MAJOR_VERSION@/3/" -e "s/@MOD_MINOR_VERSION@/12/" -e "s/@MOD_PATCH_VERSION@/3/" -e "s/@prefix@/\/usr/" /usr/bin/nss-config cd .. rm -rvf nss-3.12.4
Lastly I am going to install some Java software including, stunningly, Java. Download the Java source from this link into the /sources/extras folder. Then run these commands:
cd /dev/shm 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 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
JUnit is not, as you may be forgiven for assuming, a boy band. It is, instead, a small Java application that allows various tests to be run on other Java applications, such as Apache Ant which is a Java based alternative to [make] and OpenOffice.org, amongst others, is going to use it to compile.
cd /sources/dependencies wget http://downloads.sourceforge.net/junit/junit4.8.1.zip wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/a/apache-ant-1.8.1-src.tar.bz2 cd /dev/shm unzip /sources/dependencies/junit4.8.1.zip cd junit4.8.1 install -v -m755 -d /usr/share/{,doc/}junit-4.8.1 && chown -R root:root . && cp -v -R junit* org /usr/share/junit-4.8.1 && cp -v -R *.html *doc /usr/share/doc/junit-4.8.1 export CLASSPATH=$CLASSPATH:/usr/share/junit-4.8.1/junit-4.8.1.jar:/usr/share/junit-4.8.1 cd .. rm -rvf junit4.8.1 tar -jxvf /sources/dependencies/apache-ant-1.8.1-src.tar.bz2 cd apache-ant-1.8.1 sed -i 's|${dist.dir}/etc|/etc/ant|' build.xml && sed -i 's|/etc/ant.conf|/etc/ant/ant.conf|' src/script/ant && cp -v /usr/share/junit-4.8.1/junit-4.8.1.jar lib/optional/junit.jar ./build.sh -Ddist.dir=/opt/ant-1.8.1 dist && ln -v -sf /etc/ant /opt/ant-1.8.1/etc && ln -v -sf ant-1.8.1 /opt/ant cd .. rm -rvf apache-ant-1.8.1
Subscribe to:
Posts (Atom)