summaryrefslogtreecommitdiff
path: root/iana
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-04-06 10:24:41 +0300
committerkx <kx@radix.pro>2023-04-06 10:24:41 +0300
commit9bd871e51a3841a92f3dcaf25f132b1a596eb130 (patch)
tree4835973764f53f1e6573ff8f83ffe8933cf90c2d /iana
parentb3283496f6e75ff0180631f63fe0c6c63f64627e (diff)
downloadsources-9bd871e51a3841a92f3dcaf25f132b1a596eb130.tar.xz
IANA Time Zones
Diffstat (limited to 'iana')
-rw-r--r--iana/Makefile24
-rw-r--r--iana/tz/Makefile50
2 files changed, 74 insertions, 0 deletions
diff --git a/iana/Makefile b/iana/Makefile
new file mode 100644
index 0000000..cb20590
--- /dev/null
+++ b/iana/Makefile
@@ -0,0 +1,24 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := tz
+
+
+all-recursive downloads_clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; test -z "$$fail"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/iana/tz/Makefile b/iana/tz/Makefile
new file mode 100644
index 0000000..b0fe582
--- /dev/null
+++ b/iana/tz/Makefile
@@ -0,0 +1,50 @@
+#
+# Home:
+# ============
+# https://ftp.iana.org/tz/tz-link.html
+#
+
+# tzcode, tzdata: manualy downloaded from:
+#
+# tz_url = https://ftp.iana.org/tz/releases/ (latest is tz*2023c.tar.gz 03/28/2023)
+#
+# tzcode2022f.tar.gz
+# tzdata2022f.tar.gz
+#
+
+# NOTE:
+# Patterns like [a-f] are not supported by HTTP and we have to use FTP protocol:
+url = ftp://ftp.iana.org/tz/releases
+
+patterns = tz*2013[h-i].tar.gz
+patterns += tz*2014[i-j].tar.gz
+patterns += tz*2015[a-cg].tar.gz
+patterns += tz*2016[a-i].tar.gz
+patterns += tz*2017[a-c].tar.gz
+patterns += tz*2018[a-i].tar.gz
+patterns += tz*2019[a-c].tar.gz
+patterns += tz*2020[a-e].tar.gz
+patterns += tz*2021[a-e].tar.gz
+patterns += tz*2022[a-g].tar.gz
+patterns += tz*2023[a-c].tar.gz
+
+tarballs := $(wildcard *.tar.gz)
+sha1s := $(patsubst %.tar.gz,%.tar.gz.sha1sum,$(wildcard *.tar.gz))
+
+all: download
+
+.PHONY: download downloads_clean
+
+download:
+ @echo -e "\n======= Downloading source tarballs =======\n"
+ @for tarball in $(patterns) ; do \
+ wget -N $(url)/$$tarball ; \
+ done
+ @echo -e "\n======= End of downloading =======\n"
+ @for tarball in `ls *.tar.gz` ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)