Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Library for getting/setting POSIX.1e capabilities" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 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." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | HOMEPAGE = "http://sites.google.com/site/fullycapable/" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 6 | # no specific GPL version required |
| 7 | LICENSE = "BSD | GPLv2" |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://License;md5=e2370ba375efe9e1a095c26d37e483b8" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 9 | |
| 10 | DEPENDS = "hostperl-runtime-native gperf-native" |
| 11 | |
| 12 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ |
| 13 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ |
| 14 | file://0002-tests-do-not-run-target-executables.patch \ |
| 15 | file://0001-tests-do-not-statically-link-a-test.patch \ |
| 16 | " |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 17 | SRC_URI[sha256sum] = "47a57b8bd238b84c93c921a9b4ff82337551dbcb0cca071316aadf3e23b19261" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | |
| 19 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" |
| 20 | |
| 21 | inherit lib_package |
| 22 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
| 24 | PACKAGECONFIG_class-native ??= "" |
| 25 | |
| 26 | PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" |
| 27 | |
| 28 | EXTRA_OEMAKE = " \ |
| 29 | INDENT= \ |
| 30 | lib='${baselib}' \ |
| 31 | RAISE_SETFCAP=no \ |
| 32 | DYNAMIC=yes \ |
| 33 | BUILD_GPERF=yes \ |
| 34 | " |
| 35 | |
| 36 | EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" |
| 37 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 38 | do_compile() { |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 39 | unset CFLAGS BUILD_CFLAGS |
| 40 | oe_runmake \ |
| 41 | ${PACKAGECONFIG_CONFARGS} \ |
| 42 | AR="${AR}" \ |
| 43 | CC="${CC}" \ |
| 44 | RANLIB="${RANLIB}" \ |
| 45 | COPTS="${CFLAGS}" \ |
| 46 | BUILD_COPTS="${BUILD_CFLAGS}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | do_install() { |
| 50 | oe_runmake install \ |
| 51 | ${PACKAGECONFIG_CONFARGS} \ |
| 52 | DESTDIR="${D}" \ |
| 53 | prefix="${prefix}" \ |
| 54 | SBINDIR="${sbindir}" |
| 55 | } |
| 56 | |
| 57 | do_install_append() { |
| 58 | # Move the library to base_libdir |
| 59 | install -d ${D}${base_libdir} |
| 60 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then |
| 61 | mv ${D}${libdir}/libcap* ${D}${base_libdir} |
| 62 | if [ -d ${D}${libdir}/security ]; then |
| 63 | mv ${D}${libdir}/security ${D}${base_libdir} |
| 64 | fi |
| 65 | fi |
| 66 | } |
| 67 | |
| 68 | FILES_${PN}-dev += "${base_libdir}/*.so" |
| 69 | |
| 70 | # pam files |
| 71 | FILES_${PN} += "${base_libdir}/security/*.so" |
| 72 | |
| 73 | BBCLASSEXTEND = "native nativesdk" |