Files
poky/meta/recipes-support/libcap/libcap_2.76.bb
Yi Zhao 982ef9ddeb libcap: upgrade 2.75 -> 2.76
ChangeLog:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.wqnp1zp1o8bm

Refresh local patch.

(From OE-Core rev: cf409e0c2d5e90af9ad7cbb389c37f5f3a7a4b4e)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-05-27 09:01:16 +01:00

71 lines
2.2 KiB
BlitzBasic

SUMMARY = "Library for getting/setting POSIX.1e capabilities"
DESCRIPTION = "A library providing the API to access POSIX capabilities. \
These allow giving various kinds of specific privileges to individual \
users, without giving them full root permissions."
HOMEPAGE = "http://sites.google.com/site/fullycapable/"
# The library is BSD | GPLv2, the PAM module is BSD | LGPLv2+
LICENSE = "(BSD-3-Clause | GPL-2.0-only) & (BSD-3-Clause | LGPL-2.0-or-later)"
LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \
file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50 \
"
DEPENDS = "hostperl-runtime-native gperf-native"
SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
SRC_URI:append:class-nativesdk = " \
file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \
"
SRC_URI[sha256sum] = "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f"
UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
inherit lib_package
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
EXTRA_OEMAKE = " \
${PACKAGECONFIG_CONFARGS} \
INDENT= \
lib='${baselib}' \
RAISE_SETFCAP=no \
DYNAMIC=yes \
USE_GPERF=yes \
"
do_compile() {
oe_runmake \
AR="${AR}" \
CC="${CC}" \
RANLIB="${RANLIB}" \
OBJCOPY="${OBJCOPY}"
}
do_install() {
oe_runmake install \
DESTDIR="${D}" \
prefix="${prefix}" \
SBINDIR="${sbindir}"
}
do_install:append() {
# Move the library to base_libdir
install -d ${D}${base_libdir}
if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
mv ${D}${libdir}/libcap* ${D}${base_libdir}
if [ -d ${D}${libdir}/security ]; then
mv ${D}${libdir}/security ${D}${base_libdir}
fi
fi
}
# pam files
FILES:${PN} += "${base_libdir}/security/*.so"
# The license of the main package depends on whether PAM is enabled or not
LICENSE:${PN} = "(BSD-3-Clause | GPL-2.0-only)${@bb.utils.contains('PACKAGECONFIG', 'pam', ' & (BSD-3-Clause | LGPL-2.0-or-later)', '', d)}"
LICENSE:${PN}-dev = "(BSD-3-Clause | GPL-2.0-only)"
BBCLASSEXTEND = "native nativesdk"