Files
common/Makefile
Patrick McCarty 852b6e83c9 Refresh SPDX license list to latest (version 3.2)
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>
2018-08-29 17:19:34 -07:00

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