summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-12-09 17:25:51 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-12-19 22:51:36 (EST)
commit981af15f206c5791218256d6a663961b5a94e315 (patch)
tree2ae80ffa82c1878f0618674c5a5ec3a5f767084e
parenta67dfb67fc5ff7596d8103216dbe8c1dafdbfa4b (diff)
Revert "source.mk: Remove (BusyBox lzip support is broken apparently)"
This reverts commit e2f8112ed95c899578396d00a49c5d30de7ffa2a.
-rwxr-xr-xbuild2
-rw-r--r--source.mk26
2 files changed, 28 insertions, 0 deletions
diff --git a/build b/build
index 4bc43d5..b77adc9 100755
--- a/build
+++ b/build
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include ../source.mk
+
TABLES = \
africa \
antarctica \
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..4e32c18
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,26 @@
+# The merged tzdb archive now has a top-level directory as opkbuild requires.
+
+upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.lz
+upstream_url_base = http://data.iana.org/time-zones/releases
+upstream_url = $(upstream_url_base)/$(upstream_archive)
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.lz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ '7E37 92A9 D8AC F7D6 33BC 1588 ED97 E90E 62AA 7E34'
+
+$(source_archive):
+ wget -c '$(upstream_url)' '$(upstream_url).asc'
+ install -m 0700 -d gnupghome/
+ [ -e ../keyring.gpg ] || \
+ $(gpg) --keyserver hkp://pool.sks-keyservers.net \
+ --recv-keys $(keys); \
+ rm -f ../keyring.gpg~; \
+ if ! $(gpg) --verify '$(upstream_archive).asc'; then \
+ rm -Rf gnupghome/; \
+ exit 1; \
+ fi
+ rm -Rf gnupghome/
+ mv '$(upstream_archive)' '$(source_archive)'
+
+source: $(source_archive)