diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 88063cb..9880a1d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,6 +9,7 @@ description: | This snap uses classic confinement and carries the packaging toolchain it drives (dpkg-dev, git, mmdebstrap, lintian, quilt, ...) so it behaves the same on any Debian/Ubuntu host. +license: MIT OR GPL-2.0-only adopt-info: pkh-part confinement: classic @@ -83,6 +84,12 @@ parts: override-prime: | craftctl default ln -sfn fakeroot-sysv "${CRAFT_PRIME}/usr/bin/fakeroot" + # Ship the license texts with the binary: the MIT grant requires + # the notice to accompany copies, and GPL-2 requires the license + # text alongside distribution. + mkdir -p "${CRAFT_PRIME}/usr/share/doc/pkh" + cp "${CRAFT_PART_SRC}/LICENSE-MIT" "${CRAFT_PART_SRC}/LICENSE-GPL" \ + "${CRAFT_PRIME}/usr/share/doc/pkh/" # Classic-confined ELFs default to the host loader, which pins the # snap to hosts shipping at least the build environment's glibc, # and cannot see the libraries deduplicated against the base.