Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame^] | 1 | // Copyright (C) 2021 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | filegroup { |
| 16 | name: "UpdatableSystemFontTestKeyPem", |
| 17 | srcs: ["UpdatableSystemFontTestKey.pem"], |
| 18 | } |
| 19 | |
| 20 | filegroup { |
| 21 | name: "UpdatableSystemFontTestCertPem", |
| 22 | srcs: ["UpdatableSystemFontTestCert.pem"], |
| 23 | } |
| 24 | |
| 25 | filegroup { |
| 26 | name: "UpdatableSystemFontTestCertDer", |
| 27 | srcs: ["UpdatableSystemFontTestCert.der"], |
| 28 | } |
| 29 | |
| 30 | genrule_defaults { |
| 31 | name: "updatable_system_font_increment_font_revision_default", |
| 32 | tools: ["update_font_metadata"], |
| 33 | cmd: "$(location update_font_metadata) " + |
| 34 | "--input=$(in) " + |
| 35 | "--output=$(out) " + |
| 36 | "--revision=+1", |
| 37 | } |
| 38 | |
| 39 | genrule { |
| 40 | name: "UpdatableSystemFontTestNotoColorEmojiV1Ttf", |
| 41 | defaults: ["updatable_system_font_increment_font_revision_default"], |
| 42 | srcs: [":NotoColorEmojiTtf"], |
| 43 | out: ["UpdatableSystemFontTestNotoColorEmojiV1.ttf"], |
| 44 | } |
| 45 | |
| 46 | genrule { |
| 47 | name: "UpdatableSystemFontTestNotoColorEmojiV2Ttf", |
| 48 | defaults: ["updatable_system_font_increment_font_revision_default"], |
| 49 | srcs: [":UpdatableSystemFontTestNotoColorEmojiV1Ttf"], |
| 50 | out: ["UpdatableSystemFontTestNotoColorEmojiV2.ttf"], |
| 51 | } |
| 52 | |
| 53 | genrule_defaults { |
| 54 | name: "updatable_system_font_sig_gen_default", |
| 55 | tools: ["fsverity"], |
| 56 | tool_files: [":UpdatableSystemFontTestKeyPem", ":UpdatableSystemFontTestCertPem"], |
| 57 | cmd: "$(location fsverity) sign $(in) $(out) " + |
| 58 | "--key=$(location :UpdatableSystemFontTestKeyPem) " + |
| 59 | "--cert=$(location :UpdatableSystemFontTestCertPem) " + |
| 60 | "> /dev/null", |
| 61 | } |
| 62 | |
| 63 | genrule { |
| 64 | name: "UpdatableSystemFontTestNotoColorEmojiTtfFsvSig", |
| 65 | defaults: ["updatable_system_font_sig_gen_default"], |
| 66 | srcs: [":NotoColorEmojiTtf"], |
| 67 | out: ["UpdatableSystemFontTestNotoColorEmoji.ttf.fsv_sig"], |
| 68 | } |
| 69 | |
| 70 | genrule { |
| 71 | name: "UpdatableSystemFontTestNotoColorEmojiV1TtfFsvSig", |
| 72 | defaults: ["updatable_system_font_sig_gen_default"], |
| 73 | srcs: [":UpdatableSystemFontTestNotoColorEmojiV1Ttf"], |
| 74 | out: ["UpdatableSystemFontTestNotoColorEmojiV1.ttf.fsv_sig"], |
| 75 | } |
| 76 | |
| 77 | genrule { |
| 78 | name: "UpdatableSystemFontTestNotoColorEmojiV2TtfFsvSig", |
| 79 | defaults: ["updatable_system_font_sig_gen_default"], |
| 80 | srcs: [":UpdatableSystemFontTestNotoColorEmojiV2Ttf"], |
| 81 | out: ["UpdatableSystemFontTestNotoColorEmojiV2.ttf.fsv_sig"], |
| 82 | } |