# Copyright 2004-2006 BreakMyGentoo.net
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit multilib

DESCRIPTION="Native MySQL driver for OTP/erlang"
HOMEPAGE="http://www.erlang-projects.org/Public/projects/libraries/mysql_erlang_module/view"
SRC_URI="http://www.stacken.kth.se/projekt/yxa/${P}.tar.gz"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="dev-lang/erlang"
RDEPEND="${DEPEND}"

src_compile() {
	erlc ${PN}.erl || die "Could not compile mysql.erl"
}

src_install() {
	local ERL_LIBDIR=/usr/$(get_libdir)/erlang/lib
	
	dodir ${ERL_LIBDIR}/${P}/ebin
	insinto ${ERL_LIBDIR}/${P}/ebin
	doins ${PN}.beam

	dodir ${ERL_LIBDIR}/${P}/src
	insinto ${ERL_LIBDIR}/${P}/src
	doins ${PN}.erl
}