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

# NOTE: for the time being this ebuild only makes the console version of
# the plextor-tool. This is because it should be used as a substitute for
# cdspeed, which doesn't work on all plextor drives (e.g. my SCSI PX-32TS).
#
# If you really need the gnome applet, feel free to include it in this ebuild.
# It should be possible though to build only the command line version!

#inherit eutils

DESCRIPTION="Tool to change the parameters of a Plextor CD-ROM drive"

MY_P="${PN}-${PV}.src"

HOMEPAGE="http://das.ist.org/~georg/"
SRC_URI="http://das.ist.org/~georg/files/${MY_P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"  # any other archs?

#IUSE="X gnome"   # maybe if we want the gnome-applet too...
IUSE=""

DEPEND=""
#RDEPEND=""

S=${WORKDIR}/${PN}

src_compile() {
	# No autoconf used in this source...
	cd src      # go in src directory
	
	#delete the files, we want to compile, in case they exist:
	rm -f plextor-tool.8.gz
	rm -f plextor-tool
	
	make plextor-tool.8.gz || eecho "make of plextor-tool.8.gz failed!"
	make plextor-tool || die "make of plextor-tool failed!"
	
	cd ..      # leave src directory again
}

src_install() {
	dodoc doc/COPYING doc/INSTALL.linux doc/NEWS doc/README
	dobin src/plextor-tool
	doman src/plextor-tool.8.gz
}
