mirror of
https://github.com/clearlinux/common.git
synced 2026-04-28 11:03:48 +00:00
Make the SPDX puller code more robust by reading from JSON sources rather than parsing HTML. Also, keep all deprecated license identifiers for now, since they are still present in the spdx list. Four identifiers were removed since the last refresh, but we are keeping them for backwards compatibility. The removed license IDs now reside in the licenses-extra file. At Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
26 lines
703 B
Makefile
26 lines
703 B
Makefile
|
|
all:
|
|
|
|
clean:
|
|
proper:
|
|
|
|
install:
|
|
if [ ! -f ../../Makefile ]; then echo "include projects/common/Makefile.toplevel" > ../../Makefile; fi
|
|
|
|
ifdef CLEAR_VER
|
|
BASE_URL := https://cdn.download.clearlinux.org/releases/${CLEAR_VER}/clear
|
|
else
|
|
BASE_URL := https://cdn.download.clearlinux.org/current
|
|
endif
|
|
|
|
update:
|
|
curl -f -o packages ${BASE_URL}/source/package-sources
|
|
cut -f1 packages | LC_ALL=C sort > packages.new && mv packages.new packages
|
|
|
|
.PHONY: spdx
|
|
spdx:
|
|
JSON=$$(mktemp); \
|
|
trap "rm $$JSON" EXIT; \
|
|
curl -f -S -s https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json > $$JSON || exit 1; \
|
|
jq -r '.licenses[] | .licenseId' < $$JSON | LC_COLLATE=C sort > licenses-spdx
|