BSD-3-Clause license requires a custom license in /usr/share/licenses/libcap

Task Info (Flyspray)
Opened By Phillip Pearson (myelin)
Task ID 80250
Type Bug Report
Project Arch Linux
Category Packages: Core
Version None
OS All
Opened 2023-11-13 21:44:48 UTC
Status Assigned
Assignee David Runge (dvzrv)
Assignee Felix Yan (felixonmars)
Assignee Levente Polyak (anthraxx)

Details

libcap includes BSD-3-Clause in its license string since 2da36741

This is a custom-ish license that isn't present in /usr/share/licenses/spdx because it contains a copyright notice, so it needs the package to copy its license into /usr/share/licenses/$PKGNAME.

An example package that does this is alsa-ucm-conf -- https://gitlab.archlinux.org/archlinux/packaging/packages/alsa-ucm-conf/-/blob/main/PKGBUILD?ref_type=heads

It looks like the file you want is libcap-2.69/License from https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.gz -- which interestingly doesn't appear to match the BSD-3-Clause text from https://github.com/spdx/license-list-XML/blob/main/src/BSD-3-Clause.xml

IIUC PKGBUILD probably needs this in package():

install -vDm 644 $pkgname-$pkgver/License -t "$pkgdir/usr/share/licenses/$pkgname"