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

Diff of /eclass/rpm.eclass

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

Revision 1.1 Revision 1.2
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.1 2003/06/21 13:24:12 liquidx Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.2 2003/06/21 13:42:42 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#
20# Sometimes, pure rpm2targz will fail on certain RPMs (eg: scim-chinese) 20# Sometimes, pure rpm2targz will fail on certain RPMs (eg: scim-chinese)
21# because their code for detecting RPM header offset is not good enough. 21# because their code for detecting RPM header offset is not good enough.
22# In that case, you need to add app-arch/rpm to your DEPEND. rpm2targz 22# In that case, you need to add app-arch/rpm to your DEPEND. rpm2targz
23# will automatically find rpm2cpio and use it instead of its own rpmoffset. 23# will automatically find rpm2cpio and use it instead of its own rpmoffset.
24# 24#
25# Also, rpm2targz-8.0 behaves differently from rpm2targz-9.0. The newer 25# In addition, rpm2targz-8.0 behaves differently from rpm2targz-9.0. The newer
26# versions will autodetect rpm2cpio whereas 8.0 doesn't. Also, 9.0 will 26# versions will autodetect rpm2cpio whereas 8.0 doesn't.
27# detect if it is a source rpm and place files in ${prefix%.src} whereas 27#
28# 8.0 will just place them in the current directory. This eclass DEPENDS 28# Also, 9.0 wil# detect if it is a source rpm and place files in
29# on rpm2targz 9.0. 29# ${prefix%.src} whereas 8.0 will just place them in the current directory.
30# As of writing, the current rpm2targz-9.0 in portage has been patched to
31# remove this behaviour for backwards compatibility.
30 32
31ECLASS="rpm" 33ECLASS="rpm"
32INHERITED="$INHERITED $ECLASS" 34INHERITED="$INHERITED $ECLASS"
33 35
34newdepend ">=app-arch/rpm2targz-0.9" 36newdepend ">=app-arch/rpm2targz-0.9"
58 DISTDIR=${WORKDIR} 60 DISTDIR=${WORKDIR}
59 findopts="-name *.tar" 61 findopts="-name *.tar"
60 for t in *.tar.gz *.tgz *.tbz2 *.tar.bz2 *.zip *.ZIP; do 62 for t in *.tar.gz *.tgz *.tbz2 *.tar.bz2 *.zip *.ZIP; do
61 findopts="${findopts} -o -name ${t}" 63 findopts="${findopts} -o -name ${t}"
62 done 64 done
63 for t in $(find ${prefix%.src} ${findopts} | xargs); do 65 for t in $(find * ${findopts} | xargs); do
64 unpack ${t} 66 unpack ${t}
65 rm -f ${t} 67 rm -f ${t}
66 done 68 done
67 DISTDIR=${OLD_DISTDIR} 69 DISTDIR=${OLD_DISTDIR}
68 fi 70 fi

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20