# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils eutils flag-o-matic DESCRIPTION="Natural Language Toolkit data files" SRC_URI="http://prdownloads.sourceforge.net/nltk/${P}.zip" HOMEPAGE="http://nltk.org/" LICENSE="OPL CCPL-Attribution-2.5 " SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="" DEPEND="app-arch/unzip" RDEPEND="${DEPEND}" src_unpack() { unpack ${A} } src_compile() { return } src_install() { dodir /usr/share/nltk_data cp -R "${WORKDIR}/nltk_data" "${D}/usr/share/" || die "Install failed!" if [ -e "${D}/usr/share/nltk_data/corpora/wordnet.zip" ] then unzip "${D}/usr/share/nltk_data/corpora/wordnet.zip" -d "${D}/usr/share/nltk_data/corpora/" fi return } pkg_postinst() { einfo "Make sure your NLTK_DATA environment variable is pointing the right place:" einfo " export NLTK_DATA=/usr/share/nltk_data" }