# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

SLOT="0"
LICENSE="GPL"
KEYWORDS="~x86"
DESCRIPTION="GPRename is a complete batch renamer for files and directories."
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
HOMEPAGE="http://gprename.sourceforge.net"
IUSE=""

DEPEND="dev-lang/perl
        dev-perl/gtk2-perl
        dev-perl/glib-perl
        sys-devel/gettext
        dev-perl/Locale-gettext
        dev-perl/libintl-perl"

src_unpack() {
	unpack "${A}"
	cd "${S}"
	sed -i -e 's/PREFIX=\/usr\/local/PREFIX=\/usr/g' Makefile || die "Installation failed with sed!"
	sed -i -e 's/DESTDIR=\/usr\/local/DESTDIR=\/usr/g' Makefile || die "Installation failed with sed!"
}

src_install() {
	emake PREFIX="${D}usr" DESTDIR="${D}usr" install || die "Installation failed with emake!"
#	emake install || die "Installation failed with emake!"
	einfo "make install completed."
	dodoc README || die "Installation failed with dodoc!"
}