# Contributor: Carlo Landmeter # Maintainer: Kevin Daudt pkgname=spdx-licenses pkgver=3.7 pkgrel=0 pkgdesc="Various data formats for the SPDX License List" url="https://spdx.org/" arch="noarch" options="!check" license="CC-BY-3.0" source="license-list-data-$pkgver.tar.gz::https://github.com/spdx/license-list-data/archive/v$pkgver.tar.gz" builddir="$srcdir/license-list-data-$pkgver" subpackages="$pkgname-list" _types="html json rdfa rdfnt rdfturtle rdfxml template text" for type in $_types; do subpackages="$subpackages $pkgname-$type:_subpkg" done build() { cd "$builddir" } package() { mkdir -p "$pkgdir" } _subpkg() { local type=${subpkgname/$pkgname-/} pkgdesc="$pkgdesc ($type)" install_if="$pkgname" mkdir -p "$subpkgdir"/usr/share/spdx cp -r "$builddir"/$type "$subpkgdir"/usr/share/spdx/ } list() { pkgdesc="$pkgdesc (licence list)" mkdir -p "$subpkgdir"/usr/share/spdx local i; for i in $builddir/text/*.txt; do local license=${i##*/} echo ${license%.*} >> "$subpkgdir"/usr/share/spdx/license.lst done } sha512sums="24b017bc9b3188710bed1015c1fcd6920e13a44b68c9d6caca129cbf059abbe16d31ae24b7c1714a8273bf6da11105155b85ba4fb6efd93aa76dc4c10f832b12 license-list-data-3.7.tar.gz"