You are not logged in.
Pages: 1
Can someone post the PKGBUILD for rpmextract. I can't get it off the web site . When I click View CVS entries on http://www.archlinux.org/packages.php?id=6479, I get an internal server error.
I can't use ABS since I am away from my arch machine. I am trying to do some work offsite.
Thanks
Rob
Offline
PKGBUILD:
# $Id: PKGBUILD,v 1.1 2005/04/02 17:12:08 tpowa Exp $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
pkgname=rpmextract
pkgver=0
pkgrel=1
pkgdesc="This script extracts rpm archives"
source=(rpmextract.sh)
url="http://www.archlinux.org"
depends=('bash' 'gzip' 'bzip2' 'cpio')
build() {
install -D -m755 $startdir/src/rpmextract.sh $startdir/pkg/usr/bin/rpmextract.sh
}
md5sums=('532c5c877a8f25897e0e60852130bb6e')
rpmextract.sh:
#!/bin/sh
pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
leadsize=96
o=`expr $leadsize + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 * ( 256 * ( 256 * $2 + $3 ) + $4 ) + $5`
dl=`expr 256 * ( 256 * ( 256 * $6 + $7 ) + $8 ) + $9`
# echo "sig il: $il dl: $dl"
sigsize=`expr 8 + 16 * $il + $dl`
o=`expr $o + $sigsize + ( 8 - ( $sigsize % 8 ) ) % 8 + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 * ( 256 * ( 256 * $2 + $3 ) + $4 ) + $5`
dl=`expr 256 * ( 256 * ( 256 * $6 + $7 ) + $8 ) + $9`
# echo "hdr il: $il dl: $dl"
hdrsize=`expr 8 + 16 * $il + $dl`
o=`expr $o + $hdrsize`
dd if=$pkg ibs=$o skip=1 2>/dev/null | gunzip | cpio -idmuv || dd if=$pkg ibs=$o skip=1 2>/dev/null | bzip2 -d | cpio -idmuv
Offline
Thanks. For some reason the MD5sum check does not pass for the rpmextract.sh file. Did you add any spacing etc?
Rob
Offline
copy and paste (gvim) from /var/abs/extra/system/rpmextract
Offline
the indentation is different in the if statement
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
should be 4 spaces before echo and 3 spaces before exit
when I paste this and submit the spaces get stripped
Offline
Thanks. That did it. Now it passes the MD5 validation.
Rob
Offline
Pages: 1