summaryrefslogtreecommitdiff
path: root/.travis
diff options
context:
space:
mode:
authorBernd Zeimetz <bernd@bzed.de>2017-10-27 23:25:15 +0200
committerBernd Zeimetz <bernd@bzed.de>2017-10-27 23:25:15 +0200
commitf579cf1d3fbc32d33a8cbf3cd3737a5e5b143542 (patch)
tree737790378f61dacb035a9b7868d0bdae70b2b63a /.travis
parente5365307df9b7ce70751737b2fe20495aeb1dd5e (diff)
downloadgpsd-f579cf1d3fbc32d33a8cbf3cd3737a5e5b143542.tar.gz
Move travis build script into .travis.
For some additional tests I need to drop more files.
Diffstat (limited to '.travis')
-rw-r--r--.travis/build.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/.travis/build.sh b/.travis/build.sh
new file mode 100644
index 00000000..aae070b6
--- /dev/null
+++ b/.travis/build.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+set -e
+set -x
+
+export PATH=/usr/sbin:/usr/bin:/sbin:/bin
+
+eval "$(dpkg-buildflags --export=sh)"
+
+export DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+SCONSOPTS="$@ prefix=/usr"
+SCONSOPTS="${SCONSOPTS} systemd=yes"
+SCONSOPTS="${SCONSOPTS} nostrip=yes"
+SCONSOPTS="${SCONSOPTS} dbus_export=yes"
+SCONSOPTS="${SCONSOPTS} docdir=/usr/share/doc/gpsd"
+SCONSOPTS="${SCONSOPTS} libdir=/usr/lib/${DEB_HOST_MULTIARCH}"
+SCONSOPTS="${SCONSOPTS} gpsd_user=gpsd"
+SCONSOPTS="${SCONSOPTS} gpsd_group=dialout"
+SCONSOPTS="${SCONSOPTS} debug=yes"
+
+export SCONSOPTS
+
+export PYTHONS="$(pyversions -v -r '>= 2.3')"
+
+if [ "$PYTHONS" = "" ]; then
+ export PYTHONS="2"
+fi
+
+for py in $PYTHONS; do
+ python${py} /usr/bin/scons ${SCONSOPTS}
+ python${py}-dbg /usr/bin/scons ${SCONSOPTS}
+done
+
+/usr/bin/scons build-all www check
+