Ubuntu – Can you get a Source RPM to build as a DEB

driverspackagingprintingrpm

The manufacturer of our printer (Canon) does provide Linux printer drivers for most its printers. However, they are all 32bit and only the newer printer drivers are available in both DEB and RPM. The older are only provided as RPM files.

I use 'alien' to convert the RPM files to the DEB format so I can install the drivers. However, lately it seemed Canon has screwed the new drivers for the Canon PIXMA iP3300 up a bit in the build process of the RPMs.

Although all printer-specific RPM packages are available, the cnijfilter-common package, containing the vital CUPS filter, is distributed as a Source RPM (*.src.rpm). Very useful to build your own drivers if you want to ('rpmbuild –rebuild cnijfilter-common-2.70-2.src.rpm'), but not so much when you run a Debian-based operating system.

My question is: is it easy to convert a Source RPM to something you can easily build as a DEB, or will I have to manually convert the Source RPM to something usable?

Best Answer

Yes, you can. Sort of. Unpack the rpm with rpm2cpio and cpio, unpack the sources, create a debian/ dir inside and use the contents of the .spec file to create debian/control, debian/changelog, debian/rules, debian/copyright. Some packaging knowledge is definitely required for that last step though.

Then again, if all you want is the sourcefilter, maco's advise will get you there much quicker :)