From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 2995C1FF142 for ; Fri, 22 May 2026 15:30:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B99DEC022; Fri, 22 May 2026 15:30:37 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 22 May 2026 15:30:34 +0200 Message-Id: Subject: Re: [PATCH proxmox-geojson-data v3 1/1] initial commit To: "Dominik Csapak" , X-Mailer: aerc 0.20.0 References: <20260522083412.1223719-1-d.csapak@proxmox.com> <20260522083412.1223719-6-d.csapak@proxmox.com> In-Reply-To: <20260522083412.1223719-6-d.csapak@proxmox.com> From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779456615652 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.113 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 7EFBNBGD2OEXG4HTDLFXY2G4XHVNGLM2 X-Message-ID-Hash: 7EFBNBGD2OEXG4HTDLFXY2G4XHVNGLM2 X-MailFrom: s.sterz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri May 22, 2026 at 10:34 AM CEST, Dominik Csapak wrote: > includes a make target to download the source shp/shx file and the > make targets for building the geojson file and package. > > Suggested-by: Thomas Lamprecht > Signed-off-by: Dominik Csapak > --- > Makefile | 92 ++++++++++++++++++++++++++++++++++++++++++++ > debian/changelog | 5 +++ > debian/control | 16 ++++++++ > debian/copyright | 29 ++++++++++++++ > debian/rules | 4 ++ > debian/source/format | 1 + > 6 files changed, 147 insertions(+) > create mode 100644 Makefile > create mode 100644 debian/changelog > create mode 100644 debian/control > create mode 100644 debian/copyright > create mode 100755 debian/rules > create mode 100644 debian/source/format > > diff --git a/Makefile b/Makefile > new file mode 100644 > index 0000000..8a5cf9d > --- /dev/null > +++ b/Makefile > @@ -0,0 +1,92 @@ > +include /usr/share/dpkg/default.mk > + > +PACKAGE=3Dproxmox-geojson-data > + > +BUILDDIR ?=3D $(PACKAGE)-$(DEB_VERSION_UPSTREAM) > +ORIG_SRC_TAR=3D$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz > + > +DEB=3D$(PACKAGE)_$(DEB_VERSION)_all.deb > +DSC=3D$(PACKAGE)_$(DEB_VERSION).dsc > + > +DESTDIR =3D > +PREFIX =3D /usr > +OUTDIR =3D $(PREFIX)/share/$(PACKAGE) > + this is missing a `.PHONY: all` > +all: world-map.json > + > +NE_REF :=3D v5.1.2 > +NE_DEST :=3D assets > +NE_BASE :=3D https://raw.githubusercontent.com/nvkelso/natural-earth-ve= ctor/$(NE_REF) > +NE_FILE :=3D ne_110m_admin_0_countries > +NE_FILES :=3D \ > + $(NE_FILE).shp \ > + $(NE_FILE).shx \ > + > +NE_TARGETS :=3D $(addprefix $(NE_DEST)/,$(NE_FILES)) > + > +SQL_COMMAND :=3D "SELECT 'land' AS kind, ST_Union(geometry) AS geometry = FROM $(NE_FILE) UNION ALL SELECT 'borders' AS kind, ST_Collect(ST_Boundary(= geometry)) AS geometry FROM $(NE_FILE)" > + > +.PHONY: natural-earth natural-earth-clean > +natural-earth: $(NE_TARGETS) > + > +$(NE_DEST)/%: | $(NE_DEST) > + curl -fsSL --retry 3 -o $@ $(NE_BASE)/110m_cultural/$* > + > +$(NE_DEST): > + mkdir -p $@ > + > +natural-earth-clean: > + rm -f $(NE_TARGETS) > + > +world-map.json: $(NE_TARGETS) > + ogr2ogr -f "GeoJSON" world-map.json $(NE_DEST)/ne_110m_admin_0_countrie= s.shp -dialect sqlite -sql $(SQL_COMMAND) -lco COORDINATE_PRECISION=3D4 -nl= t MULTILINESTRING > + > +install: world-map.json > + install -dm0755 $(DESTDIR)$(OUTDIR) > + install -m0644 world-map.json $(DESTDIR)$(OUTDIR) > + > + > +$(BUILDDIR): `$(NE_DEST)` should be a prerequisite here; otherwise building this without running `all` first will fail on a git-clean repository > + rm -rf $@ $@.tmp > + mkdir -p $@.tmp/ > + cp -a debian/ assets/ Makefile $@.tmp/ maybe `assets/` should be `$(NE_DEST)` > + echo "git clone git://git.proxmox.com/git/$(PACKAGE).git\\ngit checkout= $$(git rev-parse HEAD)" \ > + > $@.tmp/debian/SOURCE > + mv $@.tmp $@ -->8 snip 8<--