Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
chromebrew
Commits
b8c534d4
Commit
b8c534d4
authored
Aug 07, 2017
by
Ed Reel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update openconnect from 7.06-1 to 7.08
parent
6826ac75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
packages/openconnect.rb
packages/openconnect.rb
+29
-31
No files found.
packages/openconnect.rb
View file @
b8c534d4
require
'package'
# @todo: provide vpnc-script (standalone), instructions for manual install:
#
# sudo su -
# mkdir /usr/local/etc/vpnc
# cd /usr/local/etc/vpnc
# wget http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/HEAD:/vpnc-script
# chmod a+x vpnc-script
# exit
# @todo: provide start-vpn script, instructions for manual connect:
# Usage (as root - run 'sudo su -'):
#
# Create 'tun0' tunnel interface:
#
# > ip tuntap add mode tun tun0
#
# Run openconnect on tun0 interface
#
# > openconnect -i tun0 vpn.example.com
# (Press Ctrl+C to exit)
#
# Shut down tun0 interface
#
# > ip tuntap del mode tun tun0
class
Openconnect
<
Package
version
'7.0
6-1
'
version
'7.0
8
'
description
'OpenConnect is an SSL VPN client initially created to support Cisco\'s AnyConnect SSL VPN.'
homepage
'http://www.infradead.org/openconnect/'
source_url
'ftp://ftp.infradead.org/pub/openconnect/openconnect-7.0
6
.tar.gz'
source_sha256
'
facf695368dc4537a6a30e2147be90b1d77ee3cb2d269eaef070b6d9ddab70f2
'
source_url
'ftp://ftp.infradead.org/pub/openconnect/openconnect-7.0
8
.tar.gz'
source_sha256
'
1c44ec1f37a6a025d1ca726b9555649417f1d31a46f747922b84099ace628a03
'
depends_on
'buildessential'
depends_on
'libxml2'
depends_on
'gnutls'
def
self
.
build
system
"./configure CFLAGS=
\"
-fPIC
\"
--with-vpnc-script=/usr/local/etc/vpnc/vpnc-script"
system
"make"
system
'./configure CFLAGS=" -fPIC" --with-vpnc-script=/usr/local/bin/vpnc-script'
system
'make'
end
def
self
.
install
system
"make"
,
"DESTDIR=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"mkdir -p
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
FileUtils
.
cd
(
"
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
)
do
system
"wget http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/HEAD:/vpnc-script"
system
"chmod +x vpnc-script"
system
"echo '#!/bin/bash' > vpnc-start"
system
"echo 'if test
\$
1; then' >> vpnc-start"
system
"echo ' sudo ip tuntap add mode tun tun0' >> vpnc-start"
system
"echo ' read -p
\"
VPN Username:
\"
USER' >> vpnc-start"
system
"echo ' read -s -p
\"
VPN Password:
\"
PASS' >> vpnc-start"
system
"echo ' echo
\"\$
PASS
\"
| openconnect --user=
\$
USER --interface=tun0 -b
\$
1
\&
' >> vpnc-start"
system
"echo 'else' >> vpnc-start"
system
"echo ' echo
\"
Usage: vpnc-start vpn.example.com
\"
' >> vpnc-start"
system
"echo 'fi' >> vpnc-start"
system
"chmod +x vpnc-start"
system
"echo '#!/bin/bash' > vpnc-stop"
system
"echo 'killall openconnect' >> vpnc-stop"
system
"echo 'sudo ip tuntap del mode tun tun0' >> vpnc-stop"
system
"chmod +x vpnc-stop"
end
puts
puts
"Added the following bash scripts:"
.
lightblue
puts
"vpnc-start - start vpn"
.
lightblue
puts
"vpnc-stop - stop vpn"
.
lightblue
puts
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment