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
15package {
16    default_team: "trendy_team_android_gpu",
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "frameworks_base_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["frameworks_base_license"],
23}
24
25filegroup {
26    name: "UpdatableSystemFontTest_NotoColorEmoji.ttf",
27    srcs: ["UpdatableSystemFontTest_NotoColorEmoji.ttf"],
28}
29
30filegroup {
31    name: "UpdatableSystemFontTest_NotoSerif-Regular.ttf",
32    srcs: ["UpdatableSystemFontTest_NotoSerif-Regular.ttf"],
33}
34
35filegroup {
36    name: "UpdatableSystemFontTest_NotoSerif-Bold.ttf",
37    srcs: ["UpdatableSystemFontTest_NotoSerif-Bold.ttf"],
38}
39
40filegroup {
41    name: "UpdatableSystemFontTestKeyPem",
42    srcs: ["UpdatableSystemFontTestKey.pem"],
43}
44
45filegroup {
46    name: "UpdatableSystemFontTestCertPem",
47    srcs: ["UpdatableSystemFontTestCert.pem"],
48}
49
50filegroup {
51    name: "UpdatableSystemFontTestCertDer",
52    srcs: ["UpdatableSystemFontTestCert.der"],
53}
54
55genrule {
56    name: "UpdatableSystemFontTest_NotoColorEmojiV0.ttf",
57    srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
58    out: ["UpdatableSystemFontTest_NotoColorEmojiV0.ttf"],
59    tools: ["update_font_metadata"],
60    cmd: "$(location update_font_metadata) " +
61        "--input=$(in) " +
62        "--output=$(out) " +
63        "--revision=0",
64}
65
66genrule {
67    name: "UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf",
68    srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
69    out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf"],
70    tools: ["update_font_metadata"],
71    cmd: "$(location update_font_metadata) " +
72        "--input=$(in) " +
73        "--output=$(out) " +
74        "--revision=+1",
75}
76
77genrule {
78    name: "UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf",
79    srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
80    out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf"],
81    tools: ["update_font_metadata"],
82    cmd: "$(location update_font_metadata) " +
83        "--input=$(in) " +
84        "--output=$(out) " +
85        "--revision=+2",
86}
87
88genrule_defaults {
89    name: "updatable_system_font_sig_gen_default",
90    tools: ["fsverity"],
91    tool_files: [
92        ":UpdatableSystemFontTestKeyPem",
93        ":UpdatableSystemFontTestCertPem",
94    ],
95    cmd: "$(location fsverity) sign $(in) $(out) " +
96        "--key=$(location :UpdatableSystemFontTestKeyPem) " +
97        "--cert=$(location :UpdatableSystemFontTestCertPem) " +
98        "> /dev/null",
99}
100
101genrule {
102    name: "UpdatableSystemFontTest_NotoColorEmoji.sig",
103    defaults: ["updatable_system_font_sig_gen_default"],
104    srcs: [":UpdatableSystemFontTest_NotoColorEmoji.ttf"],
105    out: ["UpdatableSystemFontTest_NotoColorEmoji.sig"],
106}
107
108genrule {
109    name: "UpdatableSystemFontTest_NotoColorEmojiV0.sig",
110    defaults: ["updatable_system_font_sig_gen_default"],
111    srcs: [":UpdatableSystemFontTest_NotoColorEmojiV0.ttf"],
112    out: ["UpdatableSystemFontTest_NotoColorEmojiV0.sig"],
113}
114
115genrule {
116    name: "UpdatableSystemFontTest_NotoColorEmojiVPlus1.sig",
117    defaults: ["updatable_system_font_sig_gen_default"],
118    srcs: [":UpdatableSystemFontTest_NotoColorEmojiVPlus1.ttf"],
119    out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus1.sig"],
120}
121
122genrule {
123    name: "UpdatableSystemFontTest_NotoColorEmojiVPlus2.sig",
124    defaults: ["updatable_system_font_sig_gen_default"],
125    srcs: [":UpdatableSystemFontTest_NotoColorEmojiVPlus2.ttf"],
126    out: ["UpdatableSystemFontTest_NotoColorEmojiVPlus2.sig"],
127}
128
129genrule {
130    name: "UpdatableSystemFontTest_NotoSerif-Regular.sig",
131    defaults: ["updatable_system_font_sig_gen_default"],
132    srcs: ["UpdatableSystemFontTest_NotoSerif-Regular.ttf"],
133    out: ["UpdatableSystemFontTest_NotoSerif-Regular.sig"],
134}
135
136genrule {
137    name: "UpdatableSystemFontTest_NotoSerif-Bold.sig",
138    defaults: ["updatable_system_font_sig_gen_default"],
139    srcs: ["UpdatableSystemFontTest_NotoSerif-Bold.ttf"],
140    out: ["UpdatableSystemFontTest_NotoSerif-Bold.sig"],
141}
142