1SUMMARY = "Library for getting/setting POSIX.1e capabilities" 2DESCRIPTION = "A library providing the API to access POSIX capabilities. \ 3These allow giving various kinds of specific privileges to individual \ 4users, without giving them full root permissions." 5HOMEPAGE = "http://sites.google.com/site/fullycapable/" 6# no specific GPL version required 7LICENSE = "BSD-3-Clause | GPL-2.0-only" 8LIC_FILES_CHKSUM_PAM = "file://pam_cap/License;md5=905326f41d3d1f8df21943f9a4ed6b50" 9LIC_FILES_CHKSUM = "file://License;md5=2965a646645b72ecee859b43c592dcaa \ 10 ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${LIC_FILES_CHKSUM_PAM}', '', d)} \ 11 " 12 13DEPENDS = "hostperl-runtime-native gperf-native" 14 15SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ 16 file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ 17 file://0002-tests-do-not-run-target-executables.patch \ 18 " 19SRC_URI:append:class-nativesdk = " \ 20 file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ 21 " 22SRC_URI[sha256sum] = "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" 23 24UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" 25 26inherit lib_package 27 28PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" 29PACKAGECONFIG:class-native ??= "" 30 31PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" 32 33EXTRA_OEMAKE = " \ 34 INDENT= \ 35 lib='${baselib}' \ 36 RAISE_SETFCAP=no \ 37 DYNAMIC=yes \ 38 USE_GPERF=yes \ 39" 40 41EXTRA_OEMAKE:append:class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" 42 43do_compile() { 44 unset CFLAGS BUILD_CFLAGS 45 oe_runmake \ 46 ${PACKAGECONFIG_CONFARGS} \ 47 AR="${AR}" \ 48 CC="${CC}" \ 49 RANLIB="${RANLIB}" \ 50 OBJCOPY="${OBJCOPY}" \ 51 COPTS="${CFLAGS}" \ 52 BUILD_COPTS="${BUILD_CFLAGS}" 53} 54 55do_install() { 56 oe_runmake install \ 57 ${PACKAGECONFIG_CONFARGS} \ 58 DESTDIR="${D}" \ 59 prefix="${prefix}" \ 60 SBINDIR="${sbindir}" 61} 62 63do_install:append() { 64 # Move the library to base_libdir 65 install -d ${D}${base_libdir} 66 if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then 67 mv ${D}${libdir}/libcap* ${D}${base_libdir} 68 if [ -d ${D}${libdir}/security ]; then 69 mv ${D}${libdir}/security ${D}${base_libdir} 70 fi 71 fi 72} 73 74FILES:${PN}-dev += "${base_libdir}/*.so" 75 76# pam files 77FILES:${PN} += "${base_libdir}/security/*.so" 78 79BBCLASSEXTEND = "native nativesdk" 80