OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 declare_args() { | 5 declare_args() { |
6 # Allow widevinecdmadapter to be built in Chromium. | 6 # Allow widevinecdmadapter to be built in Chromium. |
7 enable_widevine = false | 7 enable_widevine = false |
8 } | 8 } |
9 | |
10 template("widevine_sign_file") { | |
11 # For official builds, generate a signature file for |file| which will | |
12 # be used by Widevine. If |signature_file| is not specified, the signature | |
13 # file will be in the same directory as |file|. | |
14 action(target_name) { | |
15 forward_variables_from(invoker, | |
16 [ | |
17 "file", | |
18 "signature_file", | |
19 "deps", | |
20 ]) | |
21 assert(defined(file), "File to be signed must be specified.") | |
22 if (!defined(signature_file)) { | |
23 signature_file = "$file.sig" | |
24 } | |
25 | |
26 script = "//third_party/widevine/scripts/signature_generator.py" | |
27 sources = [ | |
28 "$file", | |
29 ] | |
30 outputs = [ | |
31 "$signature_file", | |
32 ] | |
33 args = [ | |
34 "--input_file", | |
35 rebase_path("$file", root_build_dir), | |
36 "--output_file", | |
37 rebase_path("$signature_file", root_build_dir), | |
38 ] | |
39 } | |
40 } | |
OLD | NEW |