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

RPM_V="2"

DESCRIPTION="DiskCheck is a small utility that monitors how much space is available on your hard drive. It checks your drive space every hour and takes action based on the specifications in a very simple config file.  When disks are nearing full capacity, mail will be sent to the system administrator warning him to take action."
HOMEPAGE="http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/"
SRC_URI="http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/${P}-${RPM_V}.src.rpm"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc ~alpha ~ia64 ~amd64 ~ppc64"
IUSE=""

DEPEND="virtual/python
	virtual/cron
	virtual/mta
	app-arch/rpm2targz"

src_unpack() {
	cd ${WORKDIR}
	rpm2targz ${DISTDIR}/${P}-${RPM_V}.src.rpm
	tar zxf ${P}-${RPM_V}.src.tar.gz
	tar zxf ${P}.tar.gz

	cd ${S}
}

src_compile() {
	einfo "No compile step needed"
}

src_install() {
	[ ! -e ${ROOT}/etc/diskcheck.conf ] && insinto /etc && doins ${S}/diskcheck.conf
	[ ! -e ${ROOT}/etc/cron.hourly/diskcheck ] && exeinto /etc/cron.hourly && doexe ${S}/diskcheck
}