summaryrefslogtreecommitdiff
path: root/pkg/osx/build_tuntaposx
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-08-22 14:10:50 -0400
committerMicah Anderson <micah@riseup.net>2013-08-22 14:10:50 -0400
commit6bae67c3e7c66af9e8ce1605070f7e92f247f0cb (patch)
tree64dc7e2588cc5c17fdb6c801877792f83cfcecf3 /pkg/osx/build_tuntaposx
parent00efccabb1eb6c3597282bc0e095cf2026f75a3b (diff)
parent00d98a47c60764475d97df1c2eb847e20a77cae5 (diff)
Merge tag '0.3.0' into debian
Tag bitmask version 0.3.0 Conflicts: .coveragerc .tx/config NEWS.rst setup.cfg src/leap/base/checks.py src/leap/base/exceptions.py src/leap/base/tests/test_checks.py src/leap/eip/checks.py src/leap/gui/firstrun/login.py src/leap/gui/locale_rc.py src/leap/util/polkit.py tests/test_qt_environment.py tox.ini
Diffstat (limited to 'pkg/osx/build_tuntaposx')
-rwxr-xr-xpkg/osx/build_tuntaposx45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkg/osx/build_tuntaposx b/pkg/osx/build_tuntaposx
new file mode 100755
index 00000000..10bb7c9c
--- /dev/null
+++ b/pkg/osx/build_tuntaposx
@@ -0,0 +1,45 @@
+#!/bin/zsh
+#
+# Copyright (C) 2012 ...
+#
+
+REPO="https://github.com/bbits/tuntaposx.git"
+
+autoload colors; colors
+# standard output message routines
+# it's always useful to wrap them, in case we change behaviour later
+notice() { if [[ $QUIET == 0 ]]; then print "$fg_bold[green][*]$fg_no_bold[default] $1" >&2; fi }
+error() { if [[ $QUIET == 0 ]]; then print "$fg[red][!]$fg[default] $1" >&2; fi }
+func() { if [[ $DEBUG == 1 ]]; then print "$fg[blue][D]$fg[default] $1" >&2; fi }
+act() {
+ if [[ $QUIET == 0 ]]; then
+ if [ "$1" = "-n" ]; then
+ print -n "$fg_bold[white] . $fg_no_bold[default] $2" >&2;
+ else
+ print "$fg_bold[white] . $fg_no_bold[default] $1" >&2;
+ fi
+ fi
+}
+
+{ test "$1" = "clean" } && {
+ notice "Cleaning up all tuntaposx build"
+ rm -rf tuntaposx
+ act "Done."
+ return 0
+}
+
+build_tuntap() {
+ test -d tuntaposx || git clone $REPO
+ notice "Cloning tuntaposx sources"
+ cd tuntaposx/tuntap
+ notice "Building tuntaposx"
+ make
+ mkdir -p ../../dist/tun.kext
+ cp -r tun.kext/* ../../dist/tun.kext
+ mkdir -p ../../dist/tuntaposx/StartupItems
+ cp -r startup_item/tun ../../dist/tuntaposx/StartupItems
+ cd ../..
+}
+
+act "Building tuntap"
+build_tuntap