/[gentoo-x86]/eclass/rpm.eclass
Gentoo

Diff of /eclass/rpm.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.6
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.5 2003/06/22 16:29:32 liquidx Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.6 2003/06/22 16:31:23 liquidx Exp $
4 4
5# Author : Alastair Tse <liquidx@gentoo.org> (21 Jun 2003) 5# Author : Alastair Tse <liquidx@gentoo.org> (21 Jun 2003)
6# 6#
7# Convienence class for extracting RPMs 7# Convienence class for extracting RPMs
8# 8#
33 33
34USE_RPMOFFSET_ONLY=${USE_RPMOFFSET_ONLY-""} 34USE_RPMOFFSET_ONLY=${USE_RPMOFFSET_ONLY-""}
35 35
36newdepend "app-arch/rpm2targz" 36newdepend "app-arch/rpm2targz"
37 37
38# extracts the contents of the RPM in ${WORKDIR}
38rpm_unpack() { 39rpm_unpack() {
39 local rpmfile 40 local rpmfile
40 rpmfile=$1 41 rpmfile=$1
41 if [ -z "${rpmfile}" ]; then 42 if [ -z "${rpmfile}" ]; then
42 return 1 43 return 1
63 case "$ext" in 64 case "$ext" in
64 rpm) 65 rpm)
65 echo ">>> Unpacking ${x}" 66 echo ">>> Unpacking ${x}"
66 prefix=${x%.rpm} 67 prefix=${x%.rpm}
67 cd ${WORKDIR} 68 cd ${WORKDIR}
68 # convert rpm to tar.gz and then extract
69 rpm_unpack ${DISTDIR}/${x} || die "${myfail}" 69 rpm_unpack ${DISTDIR}/${x} || die "${myfail}"
70 70
71 # find all tar.gz files and extract for srpms 71 # find all tar.gz files and extract for srpms
72 if [ "${prefix##*.}" = "src" ]; then 72 if [ "${prefix##*.}" = "src" ]; then
73 OLD_DISTDIR=${DISTDIR} 73 OLD_DISTDIR=${DISTDIR}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20