# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_V=${PV/_/} DESCRIPTION="This program parses crontab files and updates the time fields to track sun events given instructions in the comments." SRC_URI="http://www.drwren.com/ephem/${P}.tar.gz" HOMEPAGE="http://www.drwren.com/ephem/" LICENSE="GPL-2" SLOT="0" IUSE="" KEYWORDS="~amd64 ~ppc ~sparc x86" DEPEND="dev-perl/SOAP-Lite" S=${WORKDIR}/${P/_/} src_unpack() { unpack ${A} cd ${WORKDIR} } src_compile() { cd ${WORKDIR}/${P} epatch ${FILESDIR}/Makefile.patch epatch ${FILESDIR}/x10events.cc.patch epatch ${FILESDIR}/x10events.sh.patch einfo Discovering approximate latitude and longitude of this machine ${FILESDIR}/patch_location.pl ${WORKDIR}/${P} # Try to guess at local latitude and longitude LATITUDE=`egrep LAT= x10events.sh | sed 's/^.*=//'` LONGITUDE=`egrep LON= x10events.sh | sed 's/^.*=//'` einfo Using Latitude = ${LATITUDE} and Longitude = ${LONGITUDE} emake || die 'emake failed' } src_test() { make test || die "make test failed :(" } src_install() { # new user for x10 enewgroup x10 enewuser x10 -1 -1 /dev/null x10 # create dir structure diropts -m755 -o x10 -g x10 dodir /usr/bin make DESTDIR="${D}" install || die dodir /etc/cron.daily exeinto /etc/cron.daily newexe "${WORKDIR}/${P}/x10events.sh" ephemx10events.sh dodoc BUGS CHANGELOG COPYING ChangeLog FAQ README astrotwilight.txt civiltwilight.mat civiltwilight.txt riseset.mat riseset.txt sample.cron script.gnuplot sunup.bas }