blob: 09ee9dbb06c5ca4b118c6335c7485c21ca3f55c3 [file] [log] [blame]
Patrice Arrudaf22126f2019-05-13 10:35:06 -07001// Copyright (C) 2019 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 Badoura8ca3442021-02-03 18:16:54 -080015package {
16 default_applicable_licenses: ["system_timezone_output_data_iana_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'filegroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// http://go/android-license-faq
33license {
34 name: "system_timezone_output_data_iana_license",
35 visibility: [":__subpackages__"],
36 license_kinds: [
37 "SPDX-license-identifier-BSD",
38 "legacy_unencumbered",
39 ],
40 license_text: [
41 "NOTICE",
42 ],
43}
44
Neil Fuller0f002802020-10-28 10:09:01 +000045// Build rules related to the tzdata file.
46// tzdata is a binary file used by bionic functions like mktime / localtime and
47// Android's implementation of java.util.TimeZone, ZoneInfoDb. Both these users
48// look for the file in multiple locations. Also see the com.android.tzdata
49// APEX definition.
50
51// The on-device version of the tzdata file in /system/usr/share/zoneinfo/
52// This is the ultimate fallback for bionic for situations where the
53// tzdata APEX is not mounted. For example, bionic in initd. It is also
54// referenced by old copies of bionic that may be statically linked
55// via the NDK. It is no longer used by ZoneInfoDb.
Patrice Arrudaf22126f2019-05-13 10:35:06 -070056prebuilt_usr_share {
57 name: "tzdata",
58 src: "tzdata",
59 sub_dir: "zoneinfo",
60}
61
Neil Fuller0f002802020-10-28 10:09:01 +000062// The host version of the tzdata file equivalent to the definition above.
63// Used by bionic on host; bionic is being increasingly used on host for tooling.
Patrice Arrudaf22126f2019-05-13 10:35:06 -070064prebuilt_usr_share_host {
65 name: "tzdata_host",
66 src: "tzdata",
67 filename_from_src: true,
68 sub_dir: "zoneinfo",
69 target: {
70 darwin: {
71 enabled: false,
72 },
73 },
74}
75
76// Module definition producing a tzdata prebuilt file in
Neil Fuller6b84e742019-06-07 14:19:18 +010077// /system/etc/tzdata_module/etc/tz for standalone ART testing purposes.
78// This is a temporary change needed until the ART Buildbot and Golem both
79// fully support the Runtime APEX (see b/121117762). This module should never
80// be shipped by default (i.e. should never be part of `PRODUCT_PACKAGE`.)
Neil Fuller0cb71802019-06-06 16:47:11 +010081
82// TODO(b/121117762, b/129332183): Remove this module definition when
83// the ART Buildbot and Golem have full support for the Time Zone Data APEX.
84prebuilt_etc {
85 name: "tzdata-art-test-tzdata",
86 src: "tzdata",
87 filename_from_src: true,
88 sub_dir: "tzdata_module/etc/tz",
89}