# Contributor: Carlo Landmeter # Maintainer: Kevin Daudt pkgname=spdx-licenses pkgver=3.21 pkgrel=0 pkgdesc="Various data formats for the SPDX License List" url="https://spdx.org/" arch="noarch" options="!check" # no test suite 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 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=" f271cf86b061262c8e4be8ff6ebaa98cf039f50489008880549fc6a07a0abd58626e7d388b8962b818ccaa05502fedb03fad83f2b8b0ae3dd8d6bc413067f60a license-list-data-3.21.tar.gz "