mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-17 04:33:57 +02:00
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>
(cherry picked from commit 218ce40cd7
)
This commit is contained in:
parent
6a12ecbd6d
commit
491b784141
|
@ -92,6 +92,10 @@ $(curdir)/index: FORCE
|
||||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||||
{ echo ""; echo ""; } >> Packages;; \
|
{ echo ""; echo ""; } >> Packages;; \
|
||||||
esac; \
|
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; \
|
gzip -9nc Packages > Packages.gz; \
|
||||||
); done
|
); done
|
||||||
ifdef CONFIG_SIGNED_PACKAGES
|
ifdef CONFIG_SIGNED_PACKAGES
|
||||||
|
|
Loading…
Reference in New Issue
Block a user