-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
27 lines (21 loc) · 825 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.DELETE_ON_ERROR:
TZDB_VERSION := tzdb-2024b
tzdb_data/src/generated/mod.rs: tmp/${TZDB_VERSION}/usr/share/zoneinfo/ tzdb.tar.lz.sha
cd make-tzdb && cargo r -- ../$(@D) ../$< ../tzdb.tar.lz.sha
cargo +nightly fmt -- \
$(@D)/by_name.rs \
$(@D)/mod.rs \
$(@D)/raw_tzdata.rs \
$(@D)/test_all_names.rs \
$(@D)/time_zone.rs \
$(@D)/tzdata.rs \
$(@D)/tz_names.rs
tmp/${TZDB_VERSION}/usr/share/zoneinfo/: tmp/${TZDB_VERSION}/
cd tmp/${TZDB_VERSION}/ && make PACKRATDATA=backzone PACKRATLIST=zone.tab TOPDIR="." install
tmp/${TZDB_VERSION}/: tmp/${TZDB_VERSION}.tar.lz
cd tmp/ && tar xf $(<F)
tmp/${TZDB_VERSION}.tar.lz: tzdb.tar.lz.sha | tmp/
sha512sum -c tzdb.tar.lz.sha || curl -s -o $@ https://data.iana.org/time-zones/releases/$(@F)
sha512sum -c tzdb.tar.lz.sha
tmp/:
mkdir -p $@