Compiling latest Calibre for Ubuntu 10.04

Update: Calibre 0.7.40 was released today but the same process can be applied.

While waiting for my Kindle 3G I am preparing my Ubuntu machine to handle it at its best. I read about Calibre which seems to be the best open-source ebook management software available so I visited http://calibre-ebook.com/ to give it a try. Unfortunately there are no packages for Ubuntu 10.04 Lucid so I had to install it from sources, and here are the steps that I needed for Calibre 0.7.38 (07 Jan, 2011):

1. Install dependencies (you might need other packages as well, what follows are the packages I needed on my machine):

sudo apt-get install libpoppler-dev libchm-dev libmagickwand-dev python-sip-dev python-qt4-dev libpoppler-qt4-dev

2. Install podofo >= 0.8.2 as it is needed for some PDF functionalities in Calibre. The package in Lucid repositories is 0.8.0 so we have to compile this from sources as well:

wget http://downloads.sourceforge.net/podofo/podofo-0.8.4.tar.gz?use_mirror=osdn -o podofo-0.8.4.tar.gz
tar zxf podofo-0.8.4.tar.gz
mkdir podofo-build
cd podofo-build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/podofo" ../podofo-0.8.4
make
make install

As you can see PoDoFo will be installed in your home dir, but you can choose to install in /usr, in this case the last command will have to include ‘sudo’.

3. If everything went OK so far we are ready to build Calibre:

wget -O- http://status.calibre-ebook.com/dist/src | tar xvz
cd calibre
export PODOFO_LIB_DIR=/home/<your user>/podofo/lib/
export PODOFO_INC_DIR=/home/<your user>/podofo/include/podofo
sudo python setup.py install

If you still see warnings about PoDoFo not being found (happened to me) seems like the install script is not reading the variable PODOFO_INC_DIR from the environment. I edited the file setup/buildenvironment,py, changing the lines:

podofo_inc = '/usr/include/podofo'
podofo_lib = '/usr/lib'

to

podofo_inc = '/home/<user>/podofo/include/podofo'
podofo_lib = '/home/<user>/podofo/lib'

and restart the install script.

If everything went well you should see a Calibre entry in the Applications->Office menu and two other entries in the Applications->Graphics menu.

calibre
calibre

If you have any problems with the instructions above let me know in the comments and I will try to help if I can.

Terminator, sau cum te poți juca eficient cu un terminal în Gnome

Nu stiu dacă v-am spus pe undeva că sunt un utilizator de Linux (în afară de aluzia din postul introductiv). Deci da, folosesc Linux atât acasă cât și la servici, cu mici excepții (legate de un prost management al ventilatoarelor pe un anumit model de laptop). Și mai mereu am nevoie să am mai multe terminale deschise fiecare rulând câte ceva, ceea ce duce la inevitabila problemă a găsirii unui anumit terminal.

Știu că soluții sunt mai multe (depinzând de nivelul de cunoștințe al fiecărui utilizator, și de comoditatea de a utiliza mouse-ul în detrimentul tastaturii). Acum vreau să vă povestesc despre Terminator, o aplicație care vă ajută să aveți în față în orice moment toate terminalele dorite câștigand astfel timp. Deși este în versiunea 0.12 (și marcată ca fiind în faza Alpha pe Freshmeat) mi s-a părut o aplicație stabilă ținând cont că m-am jucat destul de mult cu ea (aveam la un moment dat deschise 11 terminale). În plus are avantajul că este disponibilă ca pachet nativ pe cele mai populare distribuții ca Ubuntu, Fedora, Debian așa că un simplu

sudo apt-get install terminator

pe un Ubuntu 8.10 este suficient.

Mai jos aveți un screenshot de pe site-ul oficial

terminator-mad

Enjoy!