Packaging iPrint

According to Novell, an iPrint .deb package can be made using alien. The generated package doesn't build in Precise however. And whatever is built is dangerous to your system. But bear with me...

The alien-generated package just needs a few changes:

When all this is done, you get a package that builds and works. I cannot offer it here: it would contain software for which Novell owns the copyright. But I can offer the bits and pieces that allow you to recreate the package. To do so...

  1. Get the iPrint RPM

    I got from my iprint server an RPM novell-iprint-xclient.x86_64.rpm. Get the same, and unpack it using alien:

    user@pc:~/$ mkdir iprint
    user@pc:~/$ cd iprint
    user@pc:~/iprint$ alien -d --generate --scripts --keep-version --fixperms novell-iprint-xclient.x86_64.rpm

    This generates a directory novell-iprint-xclient-sl-6.503.20111114 Remove its subdir novell-iprint-xclient-sl-6.503.20111114/debian:

    user@pc:~/iprint$ mv novell-iprint-xclient-sl-6.503.20111114/debian ./debian-aside

  2. Fetch the tarball

    Fetch my tarball, and unpack it:

     user@pc:~/iprint$ wget -q http://jurjenbokma.com/ApprenticesNotes/download/novell-iprint-xclient-sl-6.503.20111114-deb.tgz
    user@pc:~/iprint$ tar zxvf novell-iprint-xclient-sl-6.503.20111114-deb.tgz
    pbuilder-hooks/A30-add-packages
    novell-iprint-xclient-sl-6.503.20111114/debian/
    novell-iprint-xclient-sl-6.503.20111114/debian/dirs
    novell-iprint-xclient-sl-6.503.20111114/debian/patches/
    novell-iprint-xclient-sl-6.503.20111114/debian/patches/rc-status-in-lsb.diff
    novell-iprint-xclient-sl-6.503.20111114/debian/patches/series
    novell-iprint-xclient-sl-6.503.20111114/debian/postinst
    novell-iprint-xclient-sl-6.503.20111114/debian/compat
    novell-iprint-xclient-sl-6.503.20111114/debian/changelog
    novell-iprint-xclient-sl-6.503.20111114/debian/rules
    novell-iprint-xclient-sl-6.503.20111114/debian/copyright
    novell-iprint-xclient-sl-6.503.20111114/debian/control
    novell-iprint-xclient-sl-6.503.20111114/debian/conffiles

    If the directory names are in your case as they are in this example, the tarball is unpacked straight into your dir novell-iprint-xclient-sl-6.503.20111114.
  3. Build the package

    Change directory into the package dir, substitute your own gpg key, and build using pbuilder:

    user@pc:~/iprint$ cd novell-iprint-xclient-sl-6.503.20111114
    user@pc:~/iprint/novell-iprint-xclient-sl-6.503.20111114$ DIST=precise pdebuild --debsign-k AAA01010 --debbuildopts '-sa'

This should get you a working package. If you don't have pbuilder setup and don't want to bother, you can also rm -rf pbuilder-hooks, and instead of using shlibdeps add the dependencies by hand in debian/control. These are the dependencies shlibdeps generates for me on Debian Wheezy:

libc6 (>= 2.3.4), libcups2 (>= 1.4.0), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.8.0), libnspr4 (>= 2:4.9-2~) | libnspr4-0d (>= 1.8.0.10), libstdc++6 (>= 4.1.1), libxml2 (>= 2.6.27), zlib1g (>= 1:1.1.4)

These are the ones for Ubuntu Precise:

libc6 (>= 2.3.4), libcups2 (>= 1.4.0), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.8.0), libnspr4 (>= 1.8.0.10), libstdc++6 (>= 4.1.1), libxml2 (>= 2.6.27), zlib1g (>= 1:1.1.4)

with these, you should be able to build with dpkg-buildpackage.