blob: 0b79160d8f1928a4f319f97f1a2af989eab8183a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-tinyos/tos-make/tos-make-1.1.15.ebuild,v 1.1 2006/02/12 17:58:50 sanchan Exp $
inherit eutils
CVS_MONTH="Dec"
CVS_YEAR="2005"
MY_P="tinyos"
DESCRIPTION="The TinyOS Make System"
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="0"
KEYWORDS="~x86"
IUSE=""
DEPEND=">=dev-tinyos/tos-1.1.15"
RDEPEND=">=dev-tinyos/ncc-1.1.15
>=dev-tinyos/tos-scripts-1.1.15"
S=${WORKDIR}/${MY_P}-${PV}${CVS_MONTH}${CVS_YEAR}cvs/tools
pkg_setup() {
if [ -z "${TOSROOT}" ]
then
# best to make an assumption
export TOSDIR=/usr/src/tinyos-1.x/tos
fi
if [ ! -d "${TOSROOT}" ]
then
eerror "In order to compile nesc you have to set the"
eerror "\$TOSROOT environment properly."
eerror ""
eerror "You can achieve this by emerging >=dev-tinyos/tos-1.1.15"
eerror "or by exporting TOSDIR=\"path to your tinyos dir\""
die "Couldn't find a valid TinyOS home"
else
einfo "Building tos-make for ${TOSROOT}"
fi
}
src_compile() {
einfo "Nothing to compile"
}
src_install() {
dodoc make/README
insinto ${TOSROOT}/tools
doins -r make
local TOSMAKEROOT=${TOSROOT}/tools/make
fperms 755 ${TOSMAKEROOT}/hc08/MakeTelos.sh
fperms 755 ${TOSMAKEROOT}/hc08/TelosMangleAppC.pl
fperms 755 ${TOSMAKEROOT}/msp/netbsl
fperms 755 ${TOSMAKEROOT}/msp/set-mote-id
}
pkg_postinst() {
einfo "In order to use this, just add in your Makefile something like:"
einfo "TOSMAKE_PATH += \${YOUR_ADDITIONAL_RULES_DIRECTORY}"
einfo "MAKERULES = \${TOSROOT}/tools/make/Makerules\n"
ewarn "If you want to use TinyOS on real hardware you need a cross compiler."
ewarn "You should emerge sys-devel/crossdev and compile any toolchain you need"
ewarn "Example: for Mica2 and Mica2 Dot: crossdev --target avr"
ewarn "You also need >=dev-tinyos/tos-uisp-1.1.14 in order to flash your mote."
ewarn "You also need >=dev-java/ibm-sdk-bin-1.4.0 if you plan to use deluge."
ebeep 5
epause 5
}
|