aboutsummaryrefslogtreecommitdiffstats
path: root/testing/spdx-licenses
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-01-02 09:12:21 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-01-02 09:12:58 +0000
commita9c8603b830642cd43dbd765fb81651221181764 (patch)
tree6e03510f03c0f2a24e2cdf0549fed38b4f47a034 /testing/spdx-licenses
parent42d319766b4e64ae0bfca2e809d95fa61817389b (diff)
downloadaports-a9c8603b830642cd43dbd765fb81651221181764.tar.bz2
aports-a9c8603b830642cd43dbd765fb81651221181764.tar.xz
testing/spdx-licenses: new aport
Diffstat (limited to 'testing/spdx-licenses')
-rw-r--r--testing/spdx-licenses/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/testing/spdx-licenses/APKBUILD b/testing/spdx-licenses/APKBUILD
new file mode 100644
index 0000000000..493587a122
--- /dev/null
+++ b/testing/spdx-licenses/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer:
+pkgname=spdx-licenses
+pkgver=3.0
+pkgrel=0
+pkgdesc="Various data formats for the SPDX License List"
+url="https://spdx.org/"
+arch="noarch"
+options="!check"
+license="unknown"
+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="4c54d80d45e03fb5fc50655858eea144812d1a039d626cf4799a9d78735f5762422aaf3c0a62635cff3b06809b20ca026bd7d703055f1656f2d8c7fdd01117a6 license-list-data-3.0.tar.gz"