/[gentoo-x86]/eclass/emul-linux-x86.eclass
Gentoo

Contents of /eclass/emul-linux-x86.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Nov 15 05:52:26 2007 UTC (6 years, 9 months ago) by kingtaco
Branch: MAIN
Changes since 1.3: +2 -2 lines
revbumps apply to ebuilds, not distfiles. SRC_URI changed from PVR to PV

1 kingtaco 1.1 # Copyright 1999-2007 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 kingtaco 1.4 # $Header: /var/cvsroot/gentoo-x86/eclass/emul-linux-x86.eclass,v 1.3 2007/11/14 17:31:04 kingtaco Exp $
4 kingtaco 1.1
5     #
6     # Original Author: Mike Doty <kingtaco@gentoo.org>
7     # Adapted from emul-libs.eclass
8     # Purpose: Providing a template for the app-emulation/emul-linux-* packages
9     #
10    
11     EXPORT_FUNCTIONS src_unpack src_install
12    
13 kingtaco 1.4 SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2"
14 kingtaco 1.1
15     DESCRIPTION="Provides precompiled 32bit libraries"
16     HOMEPAGE="http://amd64.gentoo.org/emul/content.xml"
17    
18     RESTRICT="strip"
19 kingtaco 1.3 S=${WORKDIR}
20 kingtaco 1.1
21     SLOT="0"
22     IUSE=""
23    
24     DEPEND=">=sys-apps/findutils-4.2.26"
25     RDEPEND=""
26    
27     emul-linux-x86_src_unpack() {
28     unpack ${A}
29     cd "${S}"
30    
31     ALLOWED=${ALLOWED:-^${S}/etc/env.d}
32     find "${S}" ! -type d ! -name '*.so*' | egrep -v "${ALLOWED}" | xargs -d $'\n' rm -f || die 'failed to remove everything but *.so*'
33     }
34    
35     emul-linux-x86_src_install() {
36     for dir in etc/env.d etc/revdep-rebuild ; do
37     if [[ -d "${S}"/${dir} ]] ; then
38     for f in "${S}"/${dir}/* ; do
39     mv -f "$f"{,-emul}
40     done
41     fi
42     done
43    
44     # remove void directories
45     find "${S}" -depth -type d -print0 | xargs -0 rmdir 2&>/dev/null
46    
47     cp -pPR "${S}"/* "${D}"/ || die "copying files failed!"
48     }

  ViewVC Help
Powered by ViewVC 1.1.20