Well, it's been quite some time that people ask me about the sources of libgnomeprint for Maemo platform. I thought it would be a better idea if I wrote a post about it, like a HowTo. This way it can benefit everyone interested in porting applications, specially GNOME apps, that depends on this lib. With some few commands and we have the packages ready-to-install in Maemo platform. The packages were generated using Ubuntu Hoary.
- Set up the environment
First of all we need to create a new directory somewhere in our home to store the sources. For this example it was named 'projects'.
edulima@dosmtc19:~$ mkdir projects
edulima@dosmtc19:~$ cd projects
edulima@dosmtc19:~/projects$
- Find libgnomeprintui dependencies
For this task we use the following command outside scratchbox:
edulima@edulima:~/projects$ apt-cache depends libgnomeprintui2.2-0
libgnomeprintui2.2-0
Depends: libart-2.0-2
Depends: libatk1.0-0
Depends: libc6
Depends: libglib2.0-0
Depends: libgnomecanvas2-0
Depends: libgnomeprint2.2-0
Depends: libgnomeprintui2.2-common
Depends: libgtk2.0-0
Depends: libpango1.0-0
Depends: libxml2
Depends: zlib1g
edulima@edulima:~/projects$
The dependencies marked with a strike are the ones already installed in Maemo platform. One alternative to find out which are these packages is to execute some 'dpkg -S' commands inside scratchbox.
- Download the sources
Having the package dependency list, we use another 'apt' command:
edulima@dosmtc19:~/projects$ apt-get source libgnomeprintui2.2-0 > libgnomeprint2.2-0 libgnomecanvas2-0 libart-2.0-2
Reading package lists... Done
Building dependency tree... Done
... (after some time)
edulima@dosmtc19:~/projects$
- Copy the 'projects' directory inside scratchbox
An easy way to do this is to copy the directory to /tmp first, start scratchbox and then copy the directory from /tmp.
edulima@dosmtc19:~/projects$ cd ..
edulima@dosmtc19:~$ cp -r projects/ /tmp/
edulima@dosmtc19:~$ scratchbox
...
[sbox-1.1: ~] > cd projects
[sbox-1.1: ~/projects] >
- Build the packages
We have to follow the dependency order here. For this example, is the order is libart-lgpl-2.3.17, libgnomecanvas-2.10.0, libgnomeprint-2.10.3 and finally libgnomeprintui-2.10.2. Following this order, we just cd to each one of these directories and then type a 'dpkg-buildpackage' command, for example:
[sbox-1.1: ~/projects] > cd libart-lgpl-2.3.17
[sbox-1.1: ~/projects/libart-lgpl-2.3.17] > dpkg-buildpackage -rfakeroot -us -uc -D
...
Each package will be created inside the 'projects' directory.
- Finally, install the packages
After generating all the packages you can install them using the old and well known dpkg command:
[sbox-1.1: ~/projects] > fakeroot dpkg --install *.deb
That's it. If you are interested in gnomeprint packages but do not have much time to reproduce all the steps above, I have uploaded the packages I built for i386 and arm targets to my web space. Download them here.