# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ CVS_MONTH="Dec" CVS_YEAR="2005" MY_P="tinyos" DESCRIPTION="TinyOS: an open-source OS designed for wireless embedded sensor networks" HOMEPAGE="http://www.tinyos.net/" SRC_URI="http://www.tinyos.net/dist-1.1.0/tinyos/source/${MY_P}-${PV}${CVS_MONTH}${CVS_YEAR}cvs.tar.gz" LICENSE="Intel" SLOT="1" KEYWORDS="~x86" IUSE="doc examples" DEPEND="doc? ( sys-devel/m4 virtual/tetex dev-tex/latex2html )" #This is a source only library. It has no runtime. RDEPEND="" src_unpack() { unpack ${A} cd ${WORKDIR} mv ${MY_P}-${PV}${CVS_MONTH}${CVS_YEAR}cvs tinyos-1.x einfo "Updating tex sources from psfig to epsfig." cd ${WORKDIR}/tinyos-1.x/doc/schemadocsrc mv tinyschema.tex tinyschema.tex.orig sed -e "s:psfig:epsfig:" tinyschema.tex.orig > tinyschema.tex || die "Error while updating tex sources." } 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" cd ${WORKDIR}/tinyos-1.x/doc/tex make || die "Unable to make docs from tex sources" cd ${WORKDIR}/tinyos-1.x/doc/schemadocsrc make || die "Unable to make docs from tex sources" make tinyschema.html || die "Unable to make docs from tex sources" 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 /usr/src/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}/usr/src/tinyos-1.x/tos cd ${WORKDIR}/tinyos-1.x dodoc ChangeLog INTEL-LICENSE.txt if use doc then dohtml -A pdf,gif -r doc/* dodoc doc/*.txt fi cd ${WORKDIR} if use examples then mv tinyos-1.x/apps ${D}/usr/src/tinyos-1.x/apps fi doenvd ${FILESDIR}/99tinyos }