From: R. Steve McKown Date: Mon, 7 Dec 2009 20:47:28 +0000 (-0700) Subject: The necessary mods to the source code necessary to build using our debian setup. X-Git-Tag: debian/2.0.2.2-1tinyos1~1 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=8153f1a2a1df6fc27499bbdeb435e21a2cc20541 The necessary mods to the source code necessary to build using our debian setup. --- diff --git a/debian/rules b/debian/rules index aaf03840..89ac2214 100755 --- a/debian/rules +++ b/debian/rules @@ -139,7 +139,7 @@ binary-arch: checkroot build install $(install_dir) $(dtmp)/$(srcpkg)/opt/tinyos chmod u+x tools/release/extractor tools/release/extractor $(dtmp)/$(srcpkg)/opt/tinyos/$(version) < \ - tools/release/tinyos.files >/dev/null + tools/release/tinyos.filter >/dev/null $(install_dir) $(dtmp)/$(srcpkg)/usr/share/lintian/overrides $(install_file) debian/$(srcmetapkg).lintian-overrides \ $(dtmp)/$(srcpkg)/usr/share/lintian/overrides/$(srcpkg) diff --git a/tinyos.sh b/tinyos.sh new file mode 100644 index 00000000..20814c4e --- /dev/null +++ b/tinyos.sh @@ -0,0 +1,43 @@ +#! /usr/bin/env bash +# Here we setup the environment +# variables needed by the tinyos +# make system + +TOSBASE=/opt/tinyos + +# $1 is a directory or tos version number +# returns a fully rooted and valid TOSROOT +getdir() +{ + if [ -d "$1" -a -d "$1/tos" ]; then + echo "$1" + elif [ -d "$TOSBASE/$1" -a -d "$TOSBASE/$1/tos" ]; then + echo "$TOSBASE/$1" + fi +} + +# Clear TOS environment +if [ -n "$TOSROOT" ]; then + CLASSPATH=$(echo $CLASSPATH | sed -e "s|:$TOSROOT/support/sdk/java||") +fi +unset TOSDIR MAKERULES + +# Set TOS environment +TOSROOT=$(getdir "$1") +if [ -z "$TOSROOT" ]; then + TOSROOT=$(cat ~/.tosrc 2>/dev/null) +fi + +if [ -z "$TOSROOT" ]; then + echo "No TinyOS source directory found. Usage:" >&2 + echo "source /opt/tinyos/tinyos.sh [ | ]" >&2 + export TOSROOT TOSDIR MAKERULES +else + echo "Setting up for TinyOS source in $TOSROOT" + echo "$TOSROOT" > ~/.tosrc + TOSDIR="$TOSROOT/tos" + CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java + MAKERULES="$TOSROOT/support/make/Makerules" + export TOSROOT TOSDIR CLASSPATH MAKERULES +fi +unset TOSBASE tmp diff --git a/tools/release/tinyos.files b/tools/release/tinyos.files index 746d68f7..8985c608 100644 --- a/tools/release/tinyos.files +++ b/tools/release/tinyos.files @@ -3,41 +3,5 @@ VERSION=2.0.2 cd ../.. rm -rf $NAME-$VERSION -tools/release/extractor $NAME-$VERSION <<'EOF' | gzip >../$NAME-$VERSION.tar.gz -!^./apps/tests/(eyesIFX|mica2|msp430|RadioStress|TestAlarm|TestAMOnOff|TestAMService|TestBroadcast|TestCollection|TestMultihopLqi|TestOscilloscopeLQI|TestPowerManager|TestPowerup|TestPrintf|TestRadioPM|TestScheduler|TestSerialBandwidth|TestSharedResource|TestSimTimers|TestSleep|TestTimerSync|TestTreeRouting|TestTrickleTimer) -!^/apps/(BlinkAlarm|BlinkMSP430|BlinkTask|BlinkToRadio|Test|TestADC|TestArbiter|TestCC2420|TestRadio|TestSPI|TestScheduler|TestSchedulerTemp|TestSerial) -!^./doc -!^./overall-todo.txt -!^./support/make/Makelocal -!^./support/make/btnode3.target -!^./tests -!^./tools -!^./tos/chips/Atmega128 -!^./tos/chips/cc2420_pm -!^./tos/chips/cc1000_pm -!^./tos/lib/adc -!^./tos/lib/ByteRadio -!^./tos/lib/deluge -!^./tos/lib/net/collection -!^./tos/lib/oski -!^./tos/platforms/btnode3 -!/.cvsignore -!/CVS/ -!/CVS$ -!~$ -!/build/ -!/build$ -!# -!.class$ -./RadioSenseToLeds/RadioSenseMsg.class -./MViz/MVizMsg.class -./tests/cc2420/TestPacketLink/TestPacketLink.class -./tests/cc2420/TestPacketLink/PacketLinkMsg.class -./tests/cc2420/TxThroughput/ThroughputMsg.class -./tests/cc2420/TxThroughput/TxThroughput.class -./tests/cc2420/LplBroadcastCountToLeds/RadioCountMsg.class -./tests/cc2420/RssiToSerial/SpecAnalyzer.class -./tests/cc2420/RssiToSerial/RssiSerialMsg.class -./RadioCountToLeds/RadioCountMsg.class -EOF +tools/release/extractor $NAME-$VERSION < tools/release/tinyos.filter | gzip >../$NAME-$VERSION.tar.gz rm -rf $NAME-$VERSION diff --git a/tools/release/tinyos.filter b/tools/release/tinyos.filter new file mode 100644 index 00000000..93b5de9f --- /dev/null +++ b/tools/release/tinyos.filter @@ -0,0 +1,44 @@ +!^./tinyos.sh +!^./tos.mk +!^./debian +!^./(patch|configure|build|install)-stamp +!^./apps/tests/(eyesIFX|mica2|msp430|RadioStress|TestAlarm|TestAMOnOff|TestAMService|TestBroadcast|TestCollection|TestMultihopLqi|TestOscilloscopeLQI|TestPowerManager|TestPowerup|TestPrintf|TestRadioPM|TestScheduler|TestSerialBandwidth|TestSharedResource|TestSimTimers|TestSleep|TestTimerSync|TestTreeRouting|TestTrickleTimer) +!^/apps/(BlinkAlarm|BlinkMSP430|BlinkTask|BlinkToRadio|Test|TestADC|TestArbiter|TestCC2420|TestRadio|TestSPI|TestScheduler|TestSchedulerTemp|TestSerial) +!^./doc +!^./overall-todo.txt +!^./support/make/Makelocal +!^./support/make/btnode3.target +!^./tests +!^./tools +!^./tos/chips/Atmega128 +!^./tos/chips/cc2420_pm +!^./tos/chips/cc1000_pm +!^./tos/lib/adc +!^./tos/lib/ByteRadio +!^./tos/lib/deluge +!^./tos/lib/net/collection +!^./tos/lib/oski +!^./tos/platforms/btnode3 +!/.cvsignore +!/CVS/ +!/CVS$ +!/.svn/ +!/.svn$ +!^./.git +!^./.gitignore +!^./.gbp.conf +!~$ +!/build/ +!/build$ +!# +!.class$ +./RadioSenseToLeds/RadioSenseMsg.class +./MViz/MVizMsg.class +./tests/cc2420/TestPacketLink/TestPacketLink.class +./tests/cc2420/TestPacketLink/PacketLinkMsg.class +./tests/cc2420/TxThroughput/ThroughputMsg.class +./tests/cc2420/TxThroughput/TxThroughput.class +./tests/cc2420/LplBroadcastCountToLeds/RadioCountMsg.class +./tests/cc2420/RssiToSerial/SpecAnalyzer.class +./tests/cc2420/RssiToSerial/RssiSerialMsg.class +./RadioCountToLeds/RadioCountMsg.class