# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-baselibs/emul-linux-x86-baselibs-1.0.ebuild,v 1.1 2003/10/04 22:00:09 brad_mssw Exp $

S=${WORKDIR}/${P}
DESCRIPTION="Base libraries for emulation of 32bit x86 on amd64/ia64"
SRC_URI="http://gentoo.mainstreetsoftworks.com/emul-linux-x86/emul-linux-x86-baselibs.tar.bz2"
HOMEPAGE=""

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64"

DEPEND="virtual/glibc"

src_unpack () {
	unpack ${A}
}

src_install() {
	cd ${WORKDIR}
	mkdir -p ${D}/emul/linux/x86
	mkdir -p ${D}/emul/linux/x86/lib
	mkdir -p ${D}/emul/linux/x86/usr/lib
	mkdir -p ${D}/lib
	mkdir -p ${D}/usr
	mkdir -p ${D}/etc/env.d
	cp -Rpvf ${WORKDIR}/* ${D}/emul/linux/x86
	ln -sf /emul/linux/x86/lib/ld-linux.so.2 ${D}/lib/ld-linux.so.2
	ln -sf /emul/linux/x86/lib ${D}/lib32
	ln -sf /emul/linux/x86/usr/lib ${D}/usr/lib32
	cp ${FILESDIR}/75emul-linux-x86-base ${D}/etc/env.d
}