Merge pull request #128 from Ypnose/master
New package: rpmextract-1.0-1
This commit is contained in:
commit
f2c95869c1
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
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
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
if [ "$1" = "" -o ! -e "$1" ]; then
|
||||
echo "no package supplied" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
rpm2cpio $1 | bsdtar -xf -
|
|
@ -0,0 +1,24 @@
|
|||
# Template file for 'rpmextract'
|
||||
pkgname=rpmextract
|
||||
version=1.0
|
||||
revision=1
|
||||
short_desc="Script to convert or extract RPM archives (contains rpm2cpio)"
|
||||
maintainer="Ypnose <linuxienATlegtuxDOTorg>"
|
||||
license="GPL"
|
||||
homepage="http://www.archlinux.org"
|
||||
|
||||
nofetch=yes
|
||||
noextract=yes
|
||||
|
||||
do_install() {
|
||||
vinstall ${FILESDIR}/rpm2cpio 755 usr/bin
|
||||
vinstall ${FILESDIR}/rpmextract 755 usr/bin
|
||||
}
|
||||
|
||||
rpmextract_package() {
|
||||
depends="bash bsdtar coreutils"
|
||||
noarch="yes"
|
||||
pkg_install() {
|
||||
vmove usr
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue