First you have to rebuild and install gtk+ with installed libcups2-dev. Only the packages libgtk... are needed. Also install it in the sdk. Then edit the rules of leafpad and / or abiword. Rebuild them with enabled printing support. That's what I did. Now I can select my printer in the printing dialog. If you don't build leafpad or abiword against the new gtk libs, printing will not work.
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > dpkg -l libcups2-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-=================================-=================================-================================================================================== ii libcups2-dev 1.3.8-maemo12 Common UNIX Printing System(tm) - development files [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] >
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > fakeroot apt-get source libgtk2.0-0 Reading package lists... Done Building dependency tree... Done Need to get 17.0MB of source archives. Get:1 http://repository.maemo.org fremantle/sdk/free gtk+2.0 2:2.14.7-1maemo33+0m5 (dsc) [949B] Get:2 http://repository.maemo.org fremantle/sdk/free gtk+2.0 2:2.14.7-1maemo33+0m5 (tar) [17.0MB] Fetched 17.0MB in 16s (1000kB/s) dpkg-source: warning: extracting unsigned source package (./gtk+2.0_2.14.7-1maemo33+0m5.dsc) dpkg-source: extracting gtk+2.0 in gtk+2.0-2.14.7 dpkg-source: unpacking gtk+2.0_2.14.7-1maemo33+0m5.tar.gz [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > cd gtk+2.0-2.14.7/ [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > DEBEMAIL="COLIN Stephane <bigbob.fun@gmail.com>" dch -v 2:2.14.7-1maemo34+0m5 Add printing support ... [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > PYTHON=python2.5 dpkg-buildpackage -rfakeroot dpkg-buildpackage: source package is gtk+2.0 dpkg-buildpackage: source version is 2:2.14.7-1maemo34+0m5 dpkg-buildpackage: source changed by COLIN Stephane <bigbob.fun@gmail.com> dpkg-buildpackage: host architecture armel dpkg-buildpackage: source version without epoch 2.14.7-1maemo34+0m5 : Using Scratchbox tools to satisfy builddeps fakeroot debian/rules clean dh_testdir sed -e 's/@SONAME@/0/g' -e 's/@VERSION@/2.14.7/g' debian/control.in > debian/control ..... ..... checking for cups-config... /usr/bin/cups-config checking cups/cups.h usability... yes checking cups/cups.h presence... yes checking for cups/cups.h... yes ..... ..... dpkg-deb: building package `libgtk2.0-0' in `../libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgtk2.0-bin' in `../libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgtk2.0-dev' in `../libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgtk2.0-0-dbg' in `../libgtk2.0-0-dbg_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `gtk2.0-examples' in `../gtk2.0-examples_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgail18' in `../libgail18_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgail-common' in `../libgail-common_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgail-dev' in `../libgail-dev_2.14.7-1maemo34+0m5_armel.deb'. dpkg-deb: building package `libgail18-dbg' in `../libgail18-dbg_2.14.7-1maemo34+0m5_armel.deb'. signfile gtk+2.0_2.14.7-1maemo34+0m5.dsc gpg: skipped "COLIN Stephane <bigbob.fun@gmail.com>": secret key not available gpg: [stdin]: clearsign failed: secret key not available dpkg-genchanges dpkg-genchanges: including full source code in upload dpkg-buildpackage: full upload; Debian-native package (full source is included) (WARNING: Failed to sign .dsc and .changes file) [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] >
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0/gtk+2.0-2.14.7] > cd .. [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] > fakeroot dpkg -i libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb (Reading database ... 69034 files and directories currently installed.) Preparing to replace libgtk2.0-0 2:2.14.7-1maemo33+0m5 (using libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb) ... Unpacking replacement libgtk2.0-0 ... Preparing to replace libgtk2.0-bin 2:2.14.7-1maemo33+0m5 (using libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb) ... Unpacking replacement libgtk2.0-bin ... Preparing to replace libgtk2.0-common 2:2.14.7-1maemo33+0m5 (using libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb) ... Unpacking replacement libgtk2.0-common ... Preparing to replace libgtk2.0-dev 2:2.14.7-1maemo33+0m5 (using libgtk2.0-dev_2.14.7-1maemo34+0m5_armel.deb) ... Unpacking replacement libgtk2.0-dev ... Setting up libgtk2.0-common (2.14.7-1maemo34+0m5) ... Setting up libgtk2.0-0 (2.14.7-1maemo34+0m5) ... Generating /usr/share/themes/alpha/gtk-2.0/gtkrc.cache Generating /usr/share/themes/devel/gtk-2.0/gtkrc.cache Generating /usr/share/themes/Raleigh/gtk-2.0/gtkrc.cache Generating /usr/share/themes/default/gtk-2.0/gtkrc.cache Generating /usr/share/themes/Emacs/gtk-2.0-key/gtkrc.cache Generating /usr/share/themes/Default/gtk-2.0-key/gtkrc.cache Generating /usr/share/themes/devel/gtk-2.0/gtkrc.input_method.cache Done! Setting up libgtk2.0-bin (2.14.7-1maemo34+0m5) ... You don't have immodules directory for version 2.4.0. Use default version instead. Updating the IM modules list for GTK+-2.14.0...find: /usr/lib/gtk-2.0/2.14.0/immodules: No such file or directory done. You don't have gdk-pixbuf loaders directory for version 2.14.0. Use default version instead. Updating the gdk-pixbuf loaders list for GTK+-2.14.0...done. Setting up libgtk2.0-dev (2.14.7-1maemo34+0m5) ... [sbox-FREMANTLE_ARMEL: ~/tmp/Building/libgtk2.0-0] >
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > fakeroot apt-get source leafpad Reading package lists... Done Building dependency tree... Done Need to get 564kB of source archives. Get:1 http://repository.maemo.org fremantle/free leafpad 0.8.17le-0maemo1 (dsc) [769B] Get:2 http://repository.maemo.org fremantle/free leafpad 0.8.17le-0maemo1 (tar) [563kB] Fetched 564kB in 0s (695kB/s) gpg: Signature made Fri Nov 13 22:08:46 2009 CET using DSA key ID B11FFF2F gpg: Can't check signature: public key not found dpkg-source: extracting leafpad in leafpad-0.8.17le dpkg-source: unpacking leafpad_0.8.17le-0maemo1.tar.gz [sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > cd leafpad-0.8.17le/ [sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > DEBEMAIL="COLIN Stephane <colin.stephane@ovi.com>" dch -v 0.8.17le-0maemo2 Add printing support ... HERE, before the next step, I edit debian/rules and remove the parameter '--disable-print' !!! [sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > PYTHON=python2.5 dpkg-buildpackage -rfakeroot dpkg-buildpackage: source package is leafpad dpkg-buildpackage: source version is 0.8.17le-0maemo2 dpkg-buildpackage: source changed by COLIN Stephane <colin.stephane@ovi.com> dpkg-buildpackage: host architecture armel dpkg-buildpackage: source version without epoch 0.8.17le-0maemo2 : Using Scratchbox tools to satisfy builddeps ..... ..... dpkg-deb: building package `leafpad' in `../leafpad_0.8.17le-0maemo2_armel.deb'. dpkg-deb: ignoring 4 warnings about the control file(s) signfile leafpad_0.8.17le-0maemo2.dsc gpg: skipped "COLIN Stephane <colin.stephane@ovi.com>": secret key not available gpg: [stdin]: clearsign failed: secret key not available dpkg-genchanges dpkg-genchanges: warning: unknown information field `Xb-Maemo-Icon-26' in input data in package's section of control info file dpkg-genchanges: warning: unknown information field `Xb-Maemo-Display-Name' in input data in package's section of control info file dpkg-genchanges: including full source code in upload dpkg-buildpackage: full upload; Debian-native package (full source is included) (WARNING: Failed to sign .dsc and .changes file) [sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] >
[sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad/leafpad-0.8.17le] > cd .. [sbox-FREMANTLE_ARMEL: ~/tmp/Building/leafpad] > for file in $(ls *.deb) ; do maemo-optify-deb "$file"; done leafpad: optified 44 entries, saving about 377 kB. warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Bugtracker' warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Maemo-Display-Name' warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Maemo-Icon-26' warning, `leafpad_0.8.17le-0maemo2_armel/DEBIAN/control' contains user-defined field `Xsbc-Original-Maintainer' dpkg-deb: building package `leafpad' in `leafpad_0.8.17le-0maemo2_armel.deb'. dpkg-deb: ignoring 4 warnings about the control file(s)
-bash-2.05b# dpkg -i libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb (Reading database ... 38036 files and directories currently installed.) Preparing to replace libgtk2.0-0 2:2.14.7-1maemo33+0m5 (using libgtk2.0-0_2.14.7-1maemo34+0m5_armel.deb) ... Unpacking replacement libgtk2.0-0 ... Preparing to replace libgtk2.0-bin 2:2.14.7-1maemo33+0m5 (using libgtk2.0-bin_2.14.7-1maemo34+0m5_armel.deb) ... Unpacking replacement libgtk2.0-bin ... Preparing to replace libgtk2.0-common 2:2.14.7-1maemo33+0m5 (using libgtk2.0-common_2.14.7-1maemo34+0m5_all.deb) ... Unpacking replacement libgtk2.0-common ... Setting up libgtk2.0-bin (2:2.14.7-1maemo34+0m5) ... You don't have immodules directory for version 2.4.0. Use default version instead. Updating the IM modules list for GTK+-2.14.0...find: /usr/lib/gtk-2.0/2.14.0/immodules: No such file or directory done. You don't have gdk-pixbuf loaders directory for version 2.14.0. Use default version instead. Updating the gdk-pixbuf loaders list for GTK+-2.14.0...done. Setting up libgtk2.0-common (2:2.14.7-1maemo34+0m5) ... Setting up libgtk2.0-0 (2:2.14.7-1maemo34+0m5) ... Generating /usr/share/themes/beta/gtk-2.0/gtkrc.cache Generating /usr/share/themes/alpha/gtk-2.0/gtkrc.cache Generating /usr/share/themes/bigbob/gtk-2.0/gtkrc.cache Generating /usr/share/themes/Raleigh/gtk-2.0/gtkrc.cache Generating /usr/share/themes/default/gtk-2.0/gtkrc.cache Generating /usr/share/themes/Emacs/gtk-2.0-key/gtkrc.cache Generating /usr/share/themes/Default/gtk-2.0-key/gtkrc.cache Done! -bash-2.05b# dpkg -i leafpad_0.8.17le-0maemo2_armel.deb (Reading database ... 38036 files and directories currently installed.) Preparing to replace leafpad 0.8.17le-0maemo2 (using leafpad_0.8.17le-0maemo2_armel.deb) ... Unpacking replacement leafpad ... Setting up leafpad (0.8.17le-0maemo2) ... -bash-2.05b#