# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils perl-module #TODO: # an init script for s710d # possibility to run s710sh or s710d as normal user ? # fix perl module support # This program has a perl module called S710, which I cannot get to compile. # Its support is in consequence disabled in this ebuild. Feel free to fix # this and comment out the perl items. # stuck with version 0.18 of the perl module for now, as 0.19 is not out #PV2="0.18" DESCRIPTION="Utility to communicate with your Polar heartrate monitor through infrared port" HOMEPAGE="http://daveb.net/s710/" SRC_URI="${HOMEPAGE}/src/${P}.tar.gz" # perl? (${HOMEPAGE}/src/S710-${PV2}.tar.gz)" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="perl usb" DEPEND="virtual/libc >=media-libs/gd-1.8 media-libs/libpng usb? ( >=dev-libs/libusb-0.1.8 )" #perl? ( dev-lang/perl ) #PS="S710-${PV2}" directory for the perl module #SS="${WORKDIR}/${PS}" src_unpack() { unpack "${P}.tar.gz" #use perl && unpack "${PS}.tar.gz" commented this (kmh) } src_compile() { cd "${S}" echo "Your are running a ${KV} kernel." KV_MINOR="`KV_minor "${KV}"`" case "${KV_MINOR}" in 6) econf \ `use_with usb` \ --with-gd --with-png \ --with-filedir=/var/cache/s710 \ || die "Configuration failed!" ;; 4) econf \ `use_with usb` \ `use_enable usb-bulk-read usb` \ --with-gd --with-png \ --with-filedir=/var/cache/s710 \ || die "Configuration failed!" ;; 2) eerror "You can only use this package with 2.4 or 2.6 kernels." die ;; esac einfo "Compiling s710 now:" emake || die "Compilation failed!" #use perl && einfo \ #&& einfo "Compiling s710 perl module now:" \ #&& cd "${SS}" \ #&& perl-module_src_compile #|| die "Perl module compilation failed!" } src_install() { cd "${S}" einstall || die "Installation failed!" dodoc AUTHORS ChangeLog INSTALL NEWS README TODO dodir /var/cache/s710 #use perl && cd "${SS}" \ # && perl-module_src_install \ # && mv README README.perl \ # && dodoc README.perl echo "To communicate with your watch through infrared," echo "you could for example use:" echo "# s710sh -d ir /dev/ttyS1" echo "Your data will be stored in /var/cache/s710." }