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 | |
Bob Badour | d594958 | 2021-02-23 13:18:34 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_base_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_base_license"], |
| 22 | } |
| 23 | |
Kohsuke Yatoh | 5ef0ea1 | 2021-06-25 21:48:03 +0000 | [diff] [blame^] | 24 | // An existing module name is reused to avoid merge conflicts. |
| 25 | // TODO: fix the font and module name. |
| 26 | filegroup { |
| 27 | name: "NotoColorEmojiTtf", |
| 28 | srcs: ["NotoColorEmoji.ttf"], |
| 29 | } |
| 30 | |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 31 | filegroup { |
| 32 | name: "UpdatableSystemFontTestKeyPem", |
| 33 | srcs: ["UpdatableSystemFontTestKey.pem"], |
| 34 | } |
| 35 | |
| 36 | filegroup { |
| 37 | name: "UpdatableSystemFontTestCertPem", |
| 38 | srcs: ["UpdatableSystemFontTestCert.pem"], |
| 39 | } |
| 40 | |
| 41 | filegroup { |
| 42 | name: "UpdatableSystemFontTestCertDer", |
| 43 | srcs: ["UpdatableSystemFontTestCert.der"], |
| 44 | } |
| 45 | |
| 46 | genrule_defaults { |
| 47 | name: "updatable_system_font_increment_font_revision_default", |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | genrule { |
| 51 | name: "UpdatableSystemFontTestNotoColorEmojiV0Ttf", |
| 52 | srcs: [":NotoColorEmojiTtf"], |
| 53 | out: ["UpdatableSystemFontTestNotoColorEmojiV0.ttf"], |
| 54 | tools: ["update_font_metadata"], |
| 55 | cmd: "$(location update_font_metadata) " + |
| 56 | "--input=$(in) " + |
| 57 | "--output=$(out) " + |
| 58 | "--revision=0", |
| 59 | } |
| 60 | |
| 61 | genrule { |
| 62 | name: "UpdatableSystemFontTestNotoColorEmojiVPlus1Ttf", |
| 63 | srcs: [":NotoColorEmojiTtf"], |
| 64 | out: ["UpdatableSystemFontTestNotoColorEmojiVPlus1.ttf"], |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 65 | tools: ["update_font_metadata"], |
| 66 | cmd: "$(location update_font_metadata) " + |
| 67 | "--input=$(in) " + |
| 68 | "--output=$(out) " + |
| 69 | "--revision=+1", |
| 70 | } |
| 71 | |
| 72 | genrule { |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 73 | name: "UpdatableSystemFontTestNotoColorEmojiVPlus2Ttf", |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 74 | srcs: [":NotoColorEmojiTtf"], |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 75 | out: ["UpdatableSystemFontTestNotoColorEmojiVPlus2.ttf"], |
| 76 | tools: ["update_font_metadata"], |
| 77 | cmd: "$(location update_font_metadata) " + |
| 78 | "--input=$(in) " + |
| 79 | "--output=$(out) " + |
| 80 | "--revision=+2", |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | genrule_defaults { |
| 84 | name: "updatable_system_font_sig_gen_default", |
| 85 | tools: ["fsverity"], |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 86 | tool_files: [ |
| 87 | ":UpdatableSystemFontTestKeyPem", |
| 88 | ":UpdatableSystemFontTestCertPem", |
| 89 | ], |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 90 | cmd: "$(location fsverity) sign $(in) $(out) " + |
| 91 | "--key=$(location :UpdatableSystemFontTestKeyPem) " + |
| 92 | "--cert=$(location :UpdatableSystemFontTestCertPem) " + |
| 93 | "> /dev/null", |
| 94 | } |
| 95 | |
| 96 | genrule { |
| 97 | name: "UpdatableSystemFontTestNotoColorEmojiTtfFsvSig", |
| 98 | defaults: ["updatable_system_font_sig_gen_default"], |
| 99 | srcs: [":NotoColorEmojiTtf"], |
| 100 | out: ["UpdatableSystemFontTestNotoColorEmoji.ttf.fsv_sig"], |
| 101 | } |
| 102 | |
| 103 | genrule { |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 104 | name: "UpdatableSystemFontTestNotoColorEmojiV0TtfFsvSig", |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 105 | defaults: ["updatable_system_font_sig_gen_default"], |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 106 | srcs: [":UpdatableSystemFontTestNotoColorEmojiV0Ttf"], |
| 107 | out: ["UpdatableSystemFontTestNotoColorEmojiV0.ttf.fsv_sig"], |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | genrule { |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 111 | name: "UpdatableSystemFontTestNotoColorEmojiVPlus1TtfFsvSig", |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 112 | defaults: ["updatable_system_font_sig_gen_default"], |
Kohsuke Yatoh | bd636d8 | 2021-04-08 12:54:29 -0700 | [diff] [blame] | 113 | srcs: [":UpdatableSystemFontTestNotoColorEmojiVPlus1Ttf"], |
| 114 | out: ["UpdatableSystemFontTestNotoColorEmojiVPlus1.ttf.fsv_sig"], |
| 115 | } |
| 116 | |
| 117 | genrule { |
| 118 | name: "UpdatableSystemFontTestNotoColorEmojiVPlus2TtfFsvSig", |
| 119 | defaults: ["updatable_system_font_sig_gen_default"], |
| 120 | srcs: [":UpdatableSystemFontTestNotoColorEmojiVPlus2Ttf"], |
| 121 | out: ["UpdatableSystemFontTestNotoColorEmojiVPlus2.ttf.fsv_sig"], |
Kohsuke Yatoh | bc71822 | 2021-01-31 23:48:46 -0800 | [diff] [blame] | 122 | } |