diff options
author | Paul Spooren <mail@aparcar.org> | 2023-05-09 21:39:58 +0200 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2023-05-09 23:56:49 +0200 |
commit | 218ce40cd738f3373438aab82467807a8707fb9c (patch) | |
tree | 836b0d988f29f54c5a5aa30f865b57772db23222 /package/Makefile | |
parent | 3da70c64697aa6ebe4e81b162523d68fcff97b32 (diff) | |
download | upstream-218ce40cd738f3373438aab82467807a8707fb9c.tar.gz upstream-218ce40cd738f3373438aab82467807a8707fb9c.tar.bz2 upstream-218ce40cd738f3373438aab82467807a8707fb9c.zip |
build: generate index.json
The index.json file lies next to Packages index files and contains a
json dict with the package architecture and a dict of package names and
versions.
This can be used for downstream project to know what packages in which
versions are available.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'package/Makefile')
-rw-r--r-- | package/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/Makefile b/package/Makefile index 209be34674..4b8df7f484 100644 --- a/package/Makefile +++ b/package/Makefile @@ -92,6 +92,10 @@ $(curdir)/index: FORCE $(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \ { echo ""; echo ""; } >> Packages;; \ esac; \ + echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \ + sed -n -e 's/^Package: \(.*\)$$/"\1":/p' -e 's/^Version: \(.*\)$$/"\1",/p' Packages | tr '\n' ' ' >> index.json; \ + echo '}}' >> index.json; \ + sed -i 's/, }}/}}/' index.json; \ gzip -9nc Packages > Packages.gz; \ ); done ifdef CONFIG_SIGNED_PACKAGES |