update eclass
This commit is contained in:
parent
945f04315e
commit
37689a72ff
@ -1,99 +1,113 @@
|
|||||||
# Copyright 1999-2006 Gentoo Foundation
|
# Copyright 1999-2009 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.15 2006/06/27 06:49:09 vapier Exp $
|
# $Header: /var/cvsroot/gentoo-x86/eclass/rpm.eclass,v 1.20 2010/07/18 21:57:20 vapier Exp $
|
||||||
|
|
||||||
# Author : Alastair Tse <liquidx@gentoo.org> (21 Jun 2003)
|
# @ECLASS: rpm.eclass
|
||||||
#
|
# @MAINTAINER:
|
||||||
# Convienence class for extracting RPMs
|
# base-system@gentoo.org
|
||||||
#
|
# @BLURB: convenience class for extracting RPMs
|
||||||
# Basically, rpm_src_unpack does:
|
|
||||||
#
|
|
||||||
# 1. uses rpm_unpack to unpack a rpm file using rpmoffset and cpio
|
|
||||||
# 2. if it is a source rpm, it finds all .tar .tar.gz, .tgz, .tbz2, .tar.bz2,
|
|
||||||
# .zip, .ZIP and unpacks them using unpack() (with a little hackery)
|
|
||||||
# 3. deletes all the unpacked tarballs and zip files from ${WORKDIR}
|
|
||||||
#
|
|
||||||
# This ebuild now re-defines a utility function called rpm_unpack which
|
|
||||||
# basically does what rpm2targz does, except faster. It does not gzip the
|
|
||||||
# output tar again but directly extracts to ${WORKDIR}
|
|
||||||
#
|
|
||||||
# It will autodetect for rpm2cpio (included in app-arch/rpm) and if it exists
|
|
||||||
# it will use that instead of the less reliable rpmoffset. This means if a
|
|
||||||
# particular rpm cannot be read using rpmoffset, you just need to put :
|
|
||||||
#
|
|
||||||
# DEPEND="app-arch/rpm"
|
|
||||||
#
|
|
||||||
# in your ebuild and it will install and use rpm2cpio instead. If you wish
|
|
||||||
# to force your ebuild to use rpmoffset in the presence of rpm2cpio, define:
|
|
||||||
#
|
|
||||||
# USE_RPMOFFSET_ONLY="1"
|
|
||||||
|
|
||||||
|
inherit eutils
|
||||||
#USE_RPMOFFSET_ONLY=${USE_RPMOFFSET_ONLY-""}
|
|
||||||
|
|
||||||
DEPEND=">=app-arch/rpm5offset-9.0"
|
DEPEND=">=app-arch/rpm5offset-9.0"
|
||||||
|
|
||||||
# extracts the contents of the RPM in ${WORKDIR}
|
# @FUNCTION: rpm_unpack
|
||||||
|
# @USAGE: <rpms>
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Unpack the contents of the specified rpms like the unpack() function.
|
||||||
rpm5_unpack() {
|
rpm5_unpack() {
|
||||||
local rpmfile rpmoff decompcmd
|
[[ $# -eq 0 ]] && set -- ${A}
|
||||||
rpmfile=$1
|
local a rpmoff decompcmd
|
||||||
if [ -z "${rpmfile}" ]; then
|
for a in "$@" ; do
|
||||||
return 1
|
echo ">>> Unpacking ${a} to ${PWD}"
|
||||||
fi
|
if [[ ${a} == ./* ]] ; then
|
||||||
# if [ -x /usr/bin/rpm2cpio -a -z "${USE_RPMOFFSET_ONLY}" ]; then
|
: nothing to do -- path is local
|
||||||
# rpm2cpio ${rpmfile} | cpio -idmu --no-preserve-owner --quiet || return 1
|
elif [[ ${a} == ${DISTDIR}/* ]] ; then
|
||||||
# else
|
ewarn 'QA: do not use ${DISTDIR} with rpm_unpack -- it is added for you'
|
||||||
rpmoff=`rpm5offset < ${rpmfile}`
|
elif [[ ${a} == /* ]] ; then
|
||||||
|
ewarn 'QA: do not use full paths with rpm_unpack -- use ./ paths instead'
|
||||||
|
else
|
||||||
|
a="${DISTDIR}/${a}"
|
||||||
|
fi
|
||||||
|
# rpm2tar -O "${a}" | tar xf - || die "failure unpacking ${a}"
|
||||||
|
rpmoff=`rpm5offset < ${a}`
|
||||||
[ -z "${rpmoff}" ] && return 1
|
[ -z "${rpmoff}" ] && return 1
|
||||||
|
|
||||||
decompcmd="lzma -dc"
|
decompcmd="lzma -dc"
|
||||||
if [ -n "`dd if=${rpmfile} skip=${rpmoff} bs=1 count=3 2>/dev/null | file - | grep bzip2`" ]; then
|
if [ -n "`dd if=${a} skip=${rpmoff} bs=1 count=3 2>/dev/null | file - | grep bzip2`" ]; then
|
||||||
decompcmd="bzip2 -dc"
|
decompcmd="bzip2 -dc"
|
||||||
fi
|
fi
|
||||||
if [ -n "`dd if=${rpmfile} skip=${rpmoff} bs=1 count=3 2>/dev/null | file - | grep gzip`" ]; then
|
if [ -n "`dd if=${a} skip=${rpmoff} bs=1 count=3 2>/dev/null | file - | grep gzip`" ]; then
|
||||||
decompcmd="gzip -dc"
|
decompcmd="gzip -dc"
|
||||||
fi
|
fi
|
||||||
dd ibs=${rpmoff} skip=1 if=${rpmfile} 2> /dev/null \
|
|
||||||
|
dd ibs=${rpmoff} skip=1 if=${a} 2> /dev/null \
|
||||||
| ${decompcmd} \
|
| ${decompcmd} \
|
||||||
| cpio -idmu --no-preserve-owner --quiet || return 1
|
| cpio -idmu --no-preserve-owner --quiet || return 1
|
||||||
# fi
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: srcrpm_unpack
|
||||||
|
# @USAGE: <rpms>
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Unpack the contents of the specified rpms like the unpack() function as well
|
||||||
|
# as any archives that it might contain. Note that the secondary archive
|
||||||
|
# unpack isn't perfect in that it simply unpacks all archives in the working
|
||||||
|
# directory (with the assumption that there weren't any to start with).
|
||||||
|
srcrpm5_unpack() {
|
||||||
|
[[ $# -eq 0 ]] && set -- ${A}
|
||||||
|
rpm5_unpack "$@"
|
||||||
|
|
||||||
|
# no .src.rpm files, then nothing to do
|
||||||
|
[[ "$* " != *".src.rpm " ]] && return 0
|
||||||
|
|
||||||
|
eshopts_push -s nullglob
|
||||||
|
|
||||||
|
# unpack everything
|
||||||
|
local a
|
||||||
|
for a in *.tar.{gz,bz2} *.t{gz,bz2} *.zip *.ZIP ; do
|
||||||
|
unpack "./${a}"
|
||||||
|
rm -f "${a}"
|
||||||
|
done
|
||||||
|
|
||||||
|
eshopts_pop
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: rpm_src_unpack
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Automatically unpack all archives in ${A} including rpms. If one of the
|
||||||
|
# archives in a source rpm, then the sub archives will be unpacked as well.
|
||||||
rpm5_src_unpack() {
|
rpm5_src_unpack() {
|
||||||
local x prefix ext myfail OLD_DISTDIR
|
local a
|
||||||
|
for a in ${A} ; do
|
||||||
for x in ${A}; do
|
case ${a} in
|
||||||
myfail="failure unpacking ${x}"
|
*.rpm) srcrpm5_unpack "${a}" ;;
|
||||||
ext=${x##*.}
|
*) unpack "${a}" ;;
|
||||||
case "$ext" in
|
|
||||||
rpm)
|
|
||||||
echo ">>> Unpacking ${x} to ${WORKDIR}"
|
|
||||||
prefix=${x%.rpm}
|
|
||||||
cd ${WORKDIR}
|
|
||||||
rpm_unpack ${DISTDIR}/${x} || die "${myfail}"
|
|
||||||
|
|
||||||
# find all tar.gz files and extract for srpms
|
|
||||||
if [ "${prefix##*.}" = "src" ]; then
|
|
||||||
OLD_DISTDIR=${DISTDIR}
|
|
||||||
DISTDIR=${WORKDIR}
|
|
||||||
findopts="* -maxdepth 0 -name *.tar"
|
|
||||||
for t in *.tar.gz *.tgz *.tbz2 *.tar.bz2 *.zip *.ZIP; do
|
|
||||||
findopts="${findopts} -o -name ${t}"
|
|
||||||
done
|
|
||||||
for t in $(find ${findopts} | xargs); do
|
|
||||||
unpack ${t}
|
|
||||||
rm -f ${t}
|
|
||||||
done
|
|
||||||
DISTDIR=${OLD_DISTDIR}
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
unpack ${x}
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: rpm_spec_epatch
|
||||||
|
# @USAGE: [spec]
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Read the specified spec (defaults to ${PN}.spec) and attempt to apply
|
||||||
|
# all the patches listed in it. If the spec does funky things like moving
|
||||||
|
# files around, well this won't handle that.
|
||||||
|
rpm5_spec_epatch() {
|
||||||
|
local p spec=${1:-${PN}.spec}
|
||||||
|
local dir=${spec%/*}
|
||||||
|
grep '^%patch' "${spec}" | \
|
||||||
|
while read line ; do
|
||||||
|
set -- ${line}
|
||||||
|
p=$1
|
||||||
|
shift
|
||||||
|
EPATCH_OPTS="$*"
|
||||||
|
set -- $(grep "^P${p#%p}: " "${spec}")
|
||||||
|
shift
|
||||||
|
epatch "${dir:+${dir}/}$*"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT_FUNCTIONS src_unpack
|
EXPORT_FUNCTIONS src_unpack
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Novell®GroupWise® 7.0
|
Novell®GroupWise® 7.0
|
||||||
Novell Software License Agreement
|
Novell Software License Agreement
|
||||||
|
|
||||||
PLEASE READ THIS AGREEMENT CAREFULLY. BY INSTALLING OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD, TRANSFERRED, OR FURTHER DISTRIBUTED EXCEPT AS AUTHORIZED BY Novell.
|
PLEASE READ THIS AGREEMENT CAREFULLY. BY INSTALLING OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE WITH THESE TERMS, DO NOT DOWNLOAD, INSTALL OR USE THE SOFTWARE. THE SOFTWARE MAY NOT BE SOLD, TRANSFERRED, OR FURTHER DISTRIBUTED EXCEPT AS AUTHORIZED BY Novell.
|
||||||
@ -76,4 +76,4 @@ Other. The application of the United Nations Convention of Contracts for the In
|
|||||||
|
|
||||||
© 1993, 2000-2005 Novell, Inc. All Rights Reserved.
|
© 1993, 2000-2005 Novell, Inc. All Rights Reserved.
|
||||||
(052605)
|
(052605)
|
||||||
Novell and GroupWise are registered trademarks and eDirectory is a trademark of Novell, Inc. in the United States and other countries.
|
Novell and GroupWise are registered trademarks and eDirectory is a trademark of Novell, Inc. in the United States and other countries.
|
@ -1 +0,0 @@
|
|||||||
move net-mail/novell-groupwise-gwclient net-mail/novell-groupwise-client
|
|
@ -1,10 +0,0 @@
|
|||||||
move net-misc/novell-ncp net-misc/novell-ncpenc
|
|
||||||
move app-admin/novell-consoleone-advanced-snapin app-admin/novell-advanced-admin
|
|
||||||
move app-admin/novell-consoleone-ichain-snapin app-admin/novell-ichain-admin
|
|
||||||
move app-admin/novell-consoleone-ncs-snapin app-admin/novell-ncs-admin
|
|
||||||
move app-admin/novell-consoleone-nisnfs-snapin app-admin/novell-nisnfs-admin
|
|
||||||
move app-admin/novell-consoleone-nmas-method-snapin app-admin/novell-nmas-method-admin
|
|
||||||
move app-admin/novell-consoleone-nmas-snapin app-admin/novell-nmas-admin
|
|
||||||
move app-admin/novell-consoleone-radius-snapin app-admin/novell-radius-admin
|
|
||||||
move app-admin/novell-consoleone-rconsolej app-admin/novell-rconsolej
|
|
||||||
move app-admin/novell-consoleone-unix-account-management-snapin app-admin/novell-unix-admin
|
|
Loading…
Reference in New Issue
Block a user