-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOracleJava8JDK.munki.recipe
192 lines (189 loc) · 6.09 KB
/
OracleJava8JDK.munki.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
191
192
<?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>Downloads latest release version of Oracle Java 8 JDK and imports into a Munki repository.</string>
<key>Identifier</key>
<string>com.github.mkuron.OracleJava8JDK.munki</string>
<key>Input</key>
<dict>
<key>NAME</key>
<string>OracleJava8JDK</string>
<key>MUNKI_REPO_SUBDIR</key>
<string>utility/Oracle</string>
<key>pkginfo</key>
<dict>
<key>catalogs</key>
<array>
<string>testing</string>
</array>
<key>category</key>
<string>Utility</string>
<key>developer</key>
<string>Oracle</string>
<key>description</key>
<string>The JDK is a development environment for building applications, applets, and components using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform.</string>
<key>display_name</key>
<string>Oracle Java 8 development kit</string>
<key>minimum_os_version</key>
<string>10.8.3</string>
<key>name</key>
<string>%NAME%</string>
<key>unattended_install</key>
<true/>
<key>unattended_uninstall</key>
<true/>
<key>supported_architectures</key>
<array>
<string>i386</string>
<string>x86_64</string>
</array>
</dict>
</dict>
<key>MinimumVersion</key>
<string>0.2.0</string>
<key>ParentRecipe</key>
<string>com.github.hansen-m.download.OracleJava8JDK</string>
<key>Process</key>
<array>
<!-- Get version, e.g. 1.8.0_xx -->
<dict>
<key>Processor</key>
<string>FlatPkgUnpacker</string>
<key>Arguments</key>
<dict>
<key>flat_pkg_path</key>
<string>%pathname%/*.pkg</string>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/unpack</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>FileFinder</string>
<key>Arguments</key>
<dict>
<key>pattern</key>
<string>%RECIPE_CACHE_DIR%/unpack/jdk*.pkg/Payload</string>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>PkgPayloadUnpacker</string>
<key>Arguments</key>
<dict>
<key>pkg_payload_path</key>
<string>%found_filename%</string>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/jdk</string>
<key>purge_destination</key>
<true/>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>PlistReader</string>
<key>Arguments</key>
<dict>
<key>info_path</key>
<string>%RECIPE_CACHE_DIR%/jdk/Contents/Info.plist</string>
<key>plist_keys</key>
<dict>
<key>CFBundleVersion</key>
<string>version</string>
</dict>
</dict>
</dict>
<!-- Get plugin version, e.g. 1.8.xx.yy -->
<dict>
<key>Processor</key>
<string>PkgPayloadUnpacker</string>
<key>Arguments</key>
<dict>
<key>pkg_payload_path</key>
<string>%RECIPE_CACHE_DIR%/unpack/javaappletplugin.pkg/Payload</string>
<key>destination_path</key>
<string>%RECIPE_CACHE_DIR%/plugin</string>
<key>purge_destination</key>
<true/>
</dict>
</dict>
<dict>
<key>Processor</key>
<string>PlistReader</string>
<key>Arguments</key>
<dict>
<key>info_path</key>
<string>%RECIPE_CACHE_DIR%/plugin/Contents/Info.plist</string>
<key>plist_keys</key>
<dict>
<key>CFBundleVersion</key>
<string>plugin_version</string>
</dict>
</dict>
</dict>
<!-- Import into Munki -->
<dict>
<key>Arguments</key>
<dict>
<key>additional_pkginfo</key>
<dict>
<key>version</key>
<string>%plugin_version%</string>
<key>postinstall_script</key>
<string>#!/bin/sh
JAVADIR=/Library/Application\ Support/Oracle/Java/Deployment
if [ ! -d "$JAVADIR" ]; then
/bin/mkdir -p "$JAVADIR"
fi
/bin/echo "deployment.macosx.check.update=false" > "$JAVADIR/deployment.properties"
launchctl unload /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
launchctl unload /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
rm -f /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
rm -f /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
</string>
<key>installs</key>
<array>
<dict>
<key>path</key>
<string>/Library/Java/JavaVirtualMachines/jdk%version%.jdk/Contents/Info.plist</string>
<key>type</key>
<string>file</string>
</dict>
<dict>
<key>CFBundleVersion</key>
<string>%plugin_version%</string>
<key>path</key>
<string>/Library/Internet Plug-Ins/JavaAppletPlugin.plugin</string>
<key>type</key>
<string>bundle</string>
<key>version_comparison_key</key>
<string>CFBundleVersion</string>
</dict>
<dict>
<key>path</key>
<string>/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/release</string>
<key>type</key>
<string>file</string>
</dict>
</array>
</dict>
</dict>
<key>Processor</key>
<string>MunkiPkginfoMerger</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>pkg_path</key>
<string>%pathname%</string>
<key>repo_subdirectory</key>
<string>%MUNKI_REPO_SUBDIR%</string>
</dict>
<key>Processor</key>
<string>MunkiImporter</string>
</dict>
</array>
</dict>
</plist>