~ubuntu-branches/ubuntu/saucy/openvpn/saucy-proposed

« back to all changes in this revision

Viewing changes to domake-win

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2013-05-24 17:42:45 UTC
  • mfrom: (1.1.19) (10.2.22 sid)
  • Revision ID: package-import@ubuntu.com-20130524174245-g9y6wlforycufqy5
Tags: 2.3.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/openvpn.init.d:
    + Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    + Show per-VPN result messages.
    + Add "--script-security 2" by default for backwards compatabliity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# This is the master OpenVPN build script for Windows.
4
 
# This script will build OpenVPN, the TAP driver, and
5
 
# the installer from source, targeting x86 on Windows
6
 
# 2000 and higher, and x64 on Windows 2003 and higher.
7
 
# For quick start options, see pre-built notes below.
8
 
#
9
 
# Note that if you are only looking to build the
10
 
# openvpn user-space binaries (openvpn.exe
11
 
# and openvpnserv.exe) you can use the
12
 
# provided autoconf/automake build environment.
13
 
#
14
 
# If you are building from an expanded .tar.gz file,
15
 
# make sure to run "./doclean" before "./domake-win".
16
 
#
17
 
# See top-level build configuration and settings in:
18
 
#
19
 
#   version.m4
20
 
#   install-win32/settings.in
21
 
#
22
 
# Mandatory prerequisites:
23
 
#
24
 
# MinGW     -- for GNU C compiler
25
 
# MSYS      -- for bash
26
 
# msysDTK   -- for perl
27
 
# NSIS      -- for building installer
28
 
#
29
 
# The following additional prerequisites may be omitted
30
 
# when building in pre-built mode (see note below). 
31
 
#
32
 
# svn       -- for checking out source code (or TortoiseSVN)
33
 
# Windows Driver Kit (6001_17121_HyperV_WDK.iso) -- for building
34
 
#    TAP driver + tapinstall
35
 
#
36
 
# Required libraries (must be prebuilt)
37
 
#
38
 
# OpenSSL       -- define OPENSSL_DIR in settings.in
39
 
# LZO           -- define LZO_DIR in settings.in
40
 
# PKCS11-HELPER -- define PKCS11_HELPER_DIR
41
 
#
42
 
# Optional OpenVPN GUI binary (prebuilt)
43
 
#           -- define OPENVPN_GUI_DIR and OPENVPN_GUI in settings.in
44
 
#
45
 
# Required source code not included in OpenVPN SVN repository
46
 
# because of MS licensing restrictions:
47
 
#
48
 
# ../tapinstall -- This is based on 'devcon' which is found in the
49
 
#                  Windows Driver Kit (formerly known as DDK).
50
 
#                  Copy the 'devcon' source tree to ../tapinstall
51
 
#                  Edit 'sources' and modify TARGETNAME=tapinstall
52
 
 
53
 
# Note that all variables referenced here such as GENOUT,
54
 
# GENOUT_PREBUILT, and CLEAN are defined in install-win32/settings.in
55
 
 
56
 
# SPECIAL NOTES ON PRE-BUILT MODE
57
 
#   Setting up a complete tool chain to build OpenVPN and all
58
 
#   dependencies on Windows can be an onerous task, so the capability
59
 
#   is provided to reference a directory of pre-built components during
60
 
#   the build process.  When dependencies are missing to build a given
61
 
#   component (such as the TAP driver), the build script will auto-detect
62
 
#   this and use the pre-built version instead.  This would allow you, for
63
 
#   example, to build an OpenVPN installer with custom edits to
64
 
#   install-win32/settings.in, but then avoid needing to build all other
65
 
#   components (such as OpenSSL, LZO, Pkcs11-helper, TAP driver, Windows
66
 
#   service, etc.).  The procedure is as follows. First Download and expand
67
 
#   the pre-built binaries from:
68
 
#
69
 
#     http://openvpn.net/prebuilt/ (choose the most recent -prebuilt .tbz file)
70
 
#
71
 
#   After expanding the .tbz file, cd to the top level directory and
72
 
#   expand an OpenVPN source distribution taken from either the subversion
73
 
#   repository or a source .tar.gz file.  It's best to use an OpenVPN source
74
 
#   version that is the same or slightly later than the pre-built binaries
75
 
#   file.  So now you have a directory containing something that looks like
76
 
#   this:
77
 
#
78
 
#   gen-prebuilt     -> from prebuilt .tbz file
79
 
#   lzo-2.02         -> from prebuilt .tbz file
80
 
#   openssl-0.9.8i   -> from prebuilt .tbz file
81
 
#   pkcs11-helper    -> from prebuilt .tbz file
82
 
#   openvpn-2.1_rc13.tar.gz  -> downloaded from openvpn.net
83
 
#   openvpn-2.1_rc13 -> directory expanded from above file
84
 
#
85
 
#   Now cd to your expanded source tree (openvpn-2.1_rc13 in the
86
 
#   example above), make edits to install-win32/settings.in (or even
87
 
#   patch the OpenVPN source code directly), and run this script:
88
 
#
89
 
#       ./domake-win
90
 
#
91
 
#   If everything runs correctly, you should have a custom installer
92
 
#   written to ./gen/install
93
 
 
94
 
# First build the autodefs directory, containing C, sh, and NSIS versions
95
 
# of global settings, using install-win32/settings.in as source.
96
 
# These settings will then drive the rest of the build process. 
97
 
install-win32/winconfig
98
 
 
99
 
# clean all generated files
100
 
install-win32/doclean
101
 
 
102
 
# Load a pre-built GENOUT directory if GENOUT_PREBUILT is defined
103
 
# and the GENOUT directory is non-existing
104
 
install-win32/getprebuilt
105
 
 
106
 
# Each of the scripts below build, get, and/or possibly sign a different
107
 
# OpenVPN component, placing the generated files in GENOUT.  Each of these
108
 
# steps is fully indepedent, and can be executed in any order or omitted.
109
 
# The exception is the last script which gathers together all files from
110
 
# GENOUT and builds the installer.
111
 
 
112
 
# Make the OpenVPN user-space components (OpenVPN and service)
113
 
install-win32/makeopenvpn
114
 
 
115
 
# Make the OpenVPN TAP driver
116
 
install-win32/maketap
117
 
 
118
 
# Make the tapinstall utility, used to install the TAP driver
119
 
install-win32/maketapinstall
120
 
 
121
 
# Get the OpenSSL libraries from a pre-build OpenSSL tree
122
 
install-win32/getopenssl
123
 
 
124
 
# Get the PKCS-11 helper library from a pre-built OpenSSL tree
125
 
install-win32/getpkcs11helper
126
 
 
127
 
# Get the OpenVPN GUI (must be prebuilt)
128
 
install-win32/getgui
129
 
 
130
 
# Get the OpenVPN XML-based GUI (must be prebuilt)
131
 
install-win32/getxgui
132
 
 
133
 
# Produce the license text, install README, and sample config files
134
 
install-win32/maketext
135
 
 
136
 
# This final step builds the OpenVPN installer using generated
137
 
# files from GENOUT
138
 
install-win32/buildinstaller