From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 345381FF142 for ; Fri, 22 May 2026 10:34:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 229AA1B71; Fri, 22 May 2026 10:34:21 +0200 (CEST) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Subject: [PATCH proxmox-geojson-data v3 1/1] initial commit Date: Fri, 22 May 2026 10:34:01 +0200 Message-ID: <20260522083412.1223719-6-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260522083412.1223719-1-d.csapak@proxmox.com> References: <20260522083412.1223719-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 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 KAM_SHORT 0.001 Use of a URL Shortener for very short URL 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: HFGHAIFIYE4U2TF253RZFUTSMFPKSIQT X-Message-ID-Hash: HFGHAIFIYE4U2TF253RZFUTSMFPKSIQT X-MailFrom: d.csapak@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: 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=proxmox-geojson-data + +BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION_UPSTREAM) +ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz + +DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb +DSC=$(PACKAGE)_$(DEB_VERSION).dsc + +DESTDIR = +PREFIX = /usr +OUTDIR = $(PREFIX)/share/$(PACKAGE) + +all: world-map.json + +NE_REF := v5.1.2 +NE_DEST := assets +NE_BASE := https://raw.githubusercontent.com/nvkelso/natural-earth-vector/$(NE_REF) +NE_FILE := ne_110m_admin_0_countries +NE_FILES := \ + $(NE_FILE).shp \ + $(NE_FILE).shx \ + +NE_TARGETS := $(addprefix $(NE_DEST)/,$(NE_FILES)) + +SQL_COMMAND := "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_countries.shp -dialect sqlite -sql $(SQL_COMMAND) -lco COORDINATE_PRECISION=4 -nlt MULTILINESTRING + +install: world-map.json + install -dm0755 $(DESTDIR)$(OUTDIR) + install -m0644 world-map.json $(DESTDIR)$(OUTDIR) + + +$(BUILDDIR): + rm -rf $@ $@.tmp + mkdir -p $@.tmp/ + cp -a debian/ assets/ Makefile $@.tmp/ + echo "git clone git://git.proxmox.com/git/$(PACKAGE).git\\ngit checkout $$(git rev-parse HEAD)" \ + > $@.tmp/debian/SOURCE + mv $@.tmp $@ + +$(ORIG_SRC_TAR): $(BUILDDIR) + tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR) + +.PHONY: deb +deb: $(DEB) +$(DEB): $(BUILDDIR) + cd $(BUILDDIR)/; dpkg-buildpackage -b -uc -us + lintian $(DEB) + @echo $(DEB) + +.PHONY: dsc +dsc: $(BUILDDIR) + rm -rf $(DSC) $(BUILDDIR) + $(MAKE) $(DSC) + lintian $(DSC) + +$(DSC): $(BUILDDIR) $(ORIG_SRC_TAR) + cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d + +sbuild: $(DSC) + sbuild $(DSC) + +.PHONY: upload +upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) +upload: $(DEB) + tar cf - $(DEB) |ssh -X repoman@repo.proxmox.com -- upload --product pdm --dist $(UPLOAD_DIST) --arch $(DEB_HOST_ARCH) + +.PHONY: clean distclean +distclean: clean +clean: + rm -rf $(PACKAGE)-[0-9]*/ + rm -f *.deb *.changes *.dsc *.tar.* *.buildinfo *.build + +.PHONY: dinstall +dinstall: deb + dpkg -i $(DEB) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..12664a9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +proxmox-geojson-data (0.1) trixie; urgency=medium + + * Initial release. + + -- Proxmox Support Team Thu, 21 May 2026 09:46:18 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..9840882 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: proxmox-geojson-data +Section: admin +Priority: optional +Maintainer: Proxmox Support Team +Rules-Requires-Root: no +Build-Depends: debhelper-compat (= 13), + gdal-bin, +Standards-Version: 4.7.2 +Homepage: https://www.proxmox.com + +Package: proxmox-geojson-data +Architecture: all +Depends: ${misc:Depends}, +Description: GeoJSON data for Proxmox products + Includes GeoJSON used by Proxmox products, such as a worldmap for Proxmox + Datacenter Manager. Original data sourced from https://www.naturalearthdata.com/ diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..4199756 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://git.proxmox.com/?p=proxmox-geojson-data.git;a=summary +Upstream-Name: proxmox-geojson-data + +Files: + assets/* +Copyright: No copyright claimed. Released into the public domain by the authors. +License: public-domain + These files are in the public domain. + Free vector and raster map data @ naturalearthdata.com. + +Files: + debian/* + Makefile +Copyright: + 2026 Proxmox Support Team +License: AGPL-3.0-or-later + This program is free software: you can redistribute it and/or modify it under + the terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or (at your option) any + later version. + . + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + details. + . + You should have received a copy of the GNU Affero General Public License along + with this program. If not, see . diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- 2.47.3