experimental/eclass/7z.eclass

30 lines
546 B
Bash
Raw Normal View History

2007-09-01 18:41:11 +02:00
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: deb.eclass 596 2007-05-15 23:22:30Z hron $
inherit base
DEPEND="${DEPEND} app-arch/p7zip"
cab_src_unpack() {
for x in ${A}; do
ext=${x##*.}
case "${ext}" in
exe|cab)
echo ">>> Unpacking ${x} to ${WORKDIR}"
cab_unpack "${DISTDIR}/${x}"
;;
*)
unpack ${x}
;;
esac
done
}
cab_unpack() {
local dest=${WORKDIR}
[[ -n $2 ]] && dest=$2
cabextract -q -d ${dest} $1 2>&1
}
EXPORT_FUNCTIONS src_unpack