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