#how-to extracts rpm packages contents
export ins=foo-bar.rpm
rpm2cpio $ins | cpio -idv
#how-to extract *.tar.gz
gzip -dc foo-bar.tar.gz | tar xvf –
cd foo-bar-dir
# how-to extract tar.gz packages in the cwd
export file=foo-bar.tar.gz
# gotcha xovf - switch order matters !!!
gzip -dc $file| tar -xovf -
#how-to build binaries as a non-root
./configure --prefix=$HOME && make && make install