# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ #This allow you to do: ECVS_SERVER="offline" emerge tos if [ -z "${ECVS_SERVER}" ] then ECVS_SERVER="cvs.sourceforge.net:/cvsroot/tinyos" fi #Since cvs eclass doesn't allow multiple modules, we should download everything. #ECVS_MODULE="tinyos-1.x/tos tinyos-1.x/doc" ECVS_MODULE="tinyos-1.x" ECVS_BRANCH="tos-1-1-13May2005cvs-release" ECVS_USER="anonymous" ECVS_CVS_COMMAND="cvs -z9" ECVS_CVS_OPTIONS="-dP" inherit cvs DESCRIPTION="TinyOS: an open-source OS designed for wireless embedded sensor networks" HOMEPAGE="http://www.tinyos.net/" SRC_URI="" LICENSE="Intel" SLOT="1" KEYWORDS="~x86" IUSE="doc" DEPEND="doc? ( sys-devel/m4 virtual/tetex dev-tex/latex2html )" #This is a source only library. It has no runtime. RDEPEND="" pkg_setup() { einfo "If you have already downloaded this package from the cvs" einfo "You can save a lot of time using the following command:" einfo "ECVS_SERVER=\"offline\" emerge tos" } src_compile() { if use doc then cd ${WORKDIR}/tinyos-1.x/doc make && make install-snapshots.html || die "Make error in tinyos-1.x/doc" else einfo "Nothing to compile." fi } src_install() { cd ${WORKDIR} for i in `find tinyos-1.x -name CVS`; do rm -rf ${i} done if [ `find tinyos-1.x ! -type d ! -type f -printf x` ] then die "non-regular files in apps or tos directory found!" fi dodir /opt/tinyos-1.x #NOTE: do not use fowners, as its not recursive ... einfo "Fixing permissions ..." # root group name doesn't exist on Mac OS X chown -R 0:0 tinyos-1.x \ && find tinyos-1.x -type d ! -perm 755 -exec chmod 755 \{\} \; \ && find tinyos-1.x -type f ! -perm 644 -exec chmod 644 \{\} \; \ || die "correcting file modes failed" mv tinyos-1.x/tos ${D}/opt/tinyos-1.x/tos if use doc then dodir /usr/share/doc/${PN}-${PVR} mv tinyos-1.x/doc ${D}/usr/share/doc/${PN}-${PVR} fi doenvd ${FILESDIR}/99tinyos }