aboutsummaryrefslogtreecommitdiffstats
path: root/community/spdx-licenses
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2019-05-12 17:27:54 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-12 17:27:54 +0000
commit71dc49d262a5829e533350d9d6b8ad4a5f47ea25 (patch)
treef979376860c6368b94594efc320beb15908a7e4f /community/spdx-licenses
parentaf970a0ecfedee16d694eb88f5f93e1fd10ded22 (diff)
downloadaports-71dc49d262a5829e533350d9d6b8ad4a5f47ea25.tar.bz2
aports-71dc49d262a5829e533350d9d6b8ad4a5f47ea25.tar.xz
community/spdx-licenses: move from testing
Diffstat (limited to 'community/spdx-licenses')
-rw-r--r--community/spdx-licenses/APKBUILD46
1 files changed, 46 insertions, 0 deletions
diff --git a/community/spdx-licenses/APKBUILD b/community/spdx-licenses/APKBUILD
new file mode 100644
index 0000000000..e2879e8ead
--- /dev/null
+++ b/community/spdx-licenses/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
+pkgname=spdx-licenses
+pkgver=3.5
+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="4b4bcde554ee69e9e0703152a2d09e2a3c49314718d6b7e0847c0dff6a989d5d4684d152e899e8bbbb3ba2767ded027eacfe1eb6aecff945ef2c5aa933cfd2ec license-list-data-3.5.tar.gz"