$(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)
--- /dev/null
+#! /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 [<version> | <directory>]" >&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
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
--- /dev/null
+!^./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