If you want the Slackware rpm2tgz + rpm2targz :
Package name = rpm2tgz
Just unpack it and use the the script 'rpm2targz'
Or use the command :
rpm2cpio <package.rpm> | cpio -idmv
There is also a script created by @ unSpawn : 'unPack.sh'
I modified it to unpack to the current directory ..
Code:
#!/bin/bash
# Purpose: Unpack RPM archives (unSpawn)
# Args: /path/to/archive
# Deps: Bash, GNU utils, RPM
rpmDetails() { for Q in changelog provides requires scripts triggers triggerscripts; do
rpm -q -p --${Q} "${f}" 2>&1 | grep -v NOKEY > "${Q}.log"; done; }
rpmUnpack() { f=$(readlink -f "${f}"); file "${f}"|grep -q "RPM.v" && \
{ d=$(basename "${f}" .rpm); d="./${d:=ERROR_$$}"; mkdir -p "${d}" && \
{ cd "${d}" && rpm2cpio "${f}" | cpio -idmv && rpmDetails "${f}"; }; }; }
for f in $@; do rpmUnpack "${f}"; done
exit 0
I keep the unPack.sh in /usr/local/bin/
.....