Move the db generation into the priv directory

This commit is contained in:
Jesse Gumm 2022-12-09 15:25:37 -06:00
parent 3127dcddfb
commit 95c44085d9
3 changed files with 3 additions and 0 deletions

17
priv/db/Makefile Normal file
View file

@ -0,0 +1,17 @@
TZDIR=tzdata
TZ_FILES=$(addprefix $(TZDIR)/, africa antarctica asia australasia backward etcetera europe northamerica southamerica)
tzout: DATE := $(shell date +%F)
tzout: $(TZ_FILES)
TZ_VERSION=`perl -n -e 'm/^VERSION\s*=\s*(\S+)/ and print $$1;' $(TZDIR)/Makefile`; \
./tz-erl --version $$TZ_VERSION --date $(DATE) -o $@ $^
$(TZ_FILES): $(TZDIR)
$(TZDIR): tzdata-latest.tar.gz
mkdir $(TZDIR) && cd $(TZDIR) && tar xzf ../$<
tzdata-latest.tar.gz:
curl -O "ftp://ftp.iana.org/tz/tzdata-latest.tar.gz"