[Slackbuilds-users] Xerox printer driver: deb or rpm for conversion?
B Watson
yalhcru at gmail.com
Mon Sep 3 22:29:26 UTC 2018
On 9/3/18, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> So, my question is which source (.dep or .rpm) would be the better
> choice
> to convert to a .tgz package? Both rpm2tgz and deb2tgz are installed, but
> I've no idea if both are equal.
I'm assuming your end goal is to create a SlackBuild for the driver,
and submit it to SBo...
As part of your research, download both packages and extract them. Compare
the contents (binaries, PPD files, whatever's inside). Chances are,
they're identical in both the rpm and deb packages, in which case you
choose whichever's easier to work with (or flip a coin).
When you get ready to make a SlackBuild for the driver, I'd recommend
not using either rpm2tgz or deb2tgz in the build script. A .deb package
is just an ar file containing a couple of .tar.gz (or possibly .tar.xz)
files, and deb2tgz is just a wrapper around ar and tar (also, deb2tgz
doesn't ship with Slackware, if that matters to you).
Example:
# $PKG because we're extracting directly to e.g. $PKG/usr/bin, $PKG/etc, etc.
cd $PKG
ar p $CWD/${PRGNAM}_${VERSION}_${ARCH}.deb data.tar.gz | tar xvfz -
...if 'data.tar.gz' doesn't work, it's likely data.tar.xz instead:
ar p $CWD/${PRGNAM}_${VERSION}_${ARCH}.deb data.tar.xz | tar xvfJ -
For an rpm package, best bet is to use rpm2cpio to extract it (which
does ship with Slackware). Example:
cd $PKG
rpm2cpio $CWD/$PRGNAM-$VERSION.$ARCH.rpm | cpio -idmv
...for either rpm or deb, the filename's version and architecture might
need to be diddled (e.g. if the version has a - in it, which isn't
allowed on Slackwre). Have a look at graphics/teighafileconverter and
development/hexinator for real-world examples.
More information about the SlackBuilds-users
mailing list