forked from beatlemike/autopkg-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CiscoAnyConnect.pkg.recipe
190 lines (187 loc) · 4.75 KB
/
CiscoAnyConnect.pkg.recipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Creates a Cisco AnyConnect VPN-only package.</string>
<key>Identifier</key>
<string>com.github.beatlemike.pkg.CiscoAnyConnect</string>
<key>Input</key>
<dict>
<key>NAME</key>
<string>Cisco AnyConnect Secure Mobility Client</string>
<key>VPN_XML</key>
<string>CiscoAnyConnect.xml</string>
</dict>
<key>MinimumVersion</key>
<string>2.3</string>
<key>Process</key>
<array>
<dict>
<key>Processor</key>
<string>PackageRequired</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkgdirs</key>
<dict>
<key>Profiles</key>
<string>0755</string>
<key>Profiles/vpn</key>
<string>0755</string>
</dict>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
</dict>
<key>Processor</key>
<string>PkgRootCreator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkgdirs</key>
<dict/>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
</dict>
<key>Processor</key>
<string>PkgRootCreator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkg_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/AnyConnect.pkg</string>
<key>source_pkg</key>
<string>%PKG%/AnyConnect.pkg</string>
</dict>
<key>Processor</key>
<string>PkgCopier</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/unpack</string>
<key>flat_pkg_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/AnyConnect.pkg</string>
<key>purge_destination</key>
<true/>
</dict>
<key>Processor</key>
<string>FlatPkgUnpacker</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/Payload</string>
<key>pkg_payload_path</key>
<string>%RECIPE_CACHE_DIR%/unpack/vpn_module.pkg/Payload</string>
<key>purge_destination</key>
<true/>
</dict>
<key>Processor</key>
<string>PkgPayloadUnpacker</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>input_plist_path</key>
<string>%RECIPE_CACHE_DIR%/Payload/Applications/Cisco/Cisco AnyConnect Secure Mobility Client.app/Contents/Info.plist</string>
</dict>
<key>Processor</key>
<string>Versioner</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>choices_pkg_path</key>
<string>%pkg_path%</string>
<key>choices_xml_dest</key>
<string>%RECIPE_CACHE_DIR%/Scripts/choices.xml</string>
<key>desired_choices</key>
<array>
<string>choice_vpn</string>
</array>
</dict>
<key>Processor</key>
<string>com.github.grahampugh.recipes.commonprocessors/ChoicesXMLGenerator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/Profiles/vpn/%VPN_XML%</string>
<key>source_path</key>
<string>%RECIPE_DIR%/%VPN_XML%</string>
</dict>
<key>Processor</key>
<string>Copier</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>file_content</key>
<string>#!/bin/bash
## script to install and activate Cisco AnyConnect
DIR=$(dirname "$0")
/usr/sbin/installer -applyChoiceChangesXML "$DIR/choices.xml" -pkg "$DIR/AnyConnect.pkg" -target /
if (test $? = 0) then
echo "Cisco AnyConnect installed."
else
echo "ERROR: Cisco AnyConnect installation failed."
exit 1
fi
</string>
<key>file_mode</key>
<string>0755</string>
<key>file_path</key>
<string>%RECIPE_CACHE_DIR%/Scripts/postinstall</string>
</dict>
<key>Processor</key>
<string>FileCreator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkg_request</key>
<dict>
<key>chown</key>
<array/>
<key>id</key>
<string>ch.ethz.id.pkg.CiscoAnyConnect</string>
<key>pkgname</key>
<string>CiscoAnyConnect-%version%</string>
<key>pkgroot</key>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
<key>pkgtype</key>
<string>flat</string>
<key>scripts</key>
<string>Scripts</string>
<key>version</key>
<string>%version%</string>
</dict>
</dict>
<key>Processor</key>
<string>PkgCreator</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>path_list</key>
<array>
<string>%RECIPE_CACHE_DIR%/AnyConnect.pkg</string>
<string>%RECIPE_CACHE_DIR%/unpack</string>
<string>%RECIPE_CACHE_DIR%/Payload</string>
<string>%RECIPE_CACHE_DIR%/Scripts</string>
<string>%RECIPE_CACHE_DIR%/pkgroot</string>
</array>
</dict>
<key>Processor</key>
<string>PathDeleter</string>
</dict>
</array>
</dict>
</plist>