diff options
Diffstat (limited to 'meta/recipes-support/libcap/libcap_2.31.bb')
-rw-r--r-- | meta/recipes-support/libcap/libcap_2.31.bb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap/libcap_2.31.bb b/meta/recipes-support/libcap/libcap_2.31.bb new file mode 100644 index 0000000000..97959c1025 --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.31.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SUMMARY = "Library for getting/setting POSIX.1e capabilities" | ||
2 | HOMEPAGE = "http://sites.google.com/site/fullycapable/" | ||
3 | |||
4 | # no specific GPL version required | ||
5 | LICENSE = "BSD | GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" | ||
7 | |||
8 | DEPENDS = "hostperl-runtime-native gperf-native" | ||
9 | |||
10 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \ | ||
11 | file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \ | ||
12 | file://0002-tests-do-not-run-target-executables.patch \ | ||
13 | file://0001-tests-do-not-statically-link-a-test.patch \ | ||
14 | " | ||
15 | SRC_URI[md5sum] = "52120c05dc797b01f5a7ae70f4335e96" | ||
16 | SRC_URI[sha256sum] = "c6088de41e1c97fa8047e2e7de0e4ee0cd13e6cc16538022230ae76727a87c46" | ||
17 | |||
18 | UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" | ||
19 | |||
20 | inherit lib_package | ||
21 | |||
22 | # do NOT pass target cflags to host compilations | ||
23 | # | ||
24 | do_configure() { | ||
25 | # libcap uses := for compilers, fortunately, it gives us a hint | ||
26 | # on what should be replaced with ?= | ||
27 | sed -e 's,:=,?=,g' -i Make.Rules | ||
28 | sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules | ||
29 | } | ||
30 | |||
31 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | ||
32 | PACKAGECONFIG_class-native ??= "" | ||
33 | |||
34 | PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" | ||
35 | |||
36 | EXTRA_OEMAKE = " \ | ||
37 | INDENT= \ | ||
38 | lib='${baselib}' \ | ||
39 | RAISE_SETFCAP=no \ | ||
40 | DYNAMIC=yes \ | ||
41 | BUILD_GPERF=yes \ | ||
42 | " | ||
43 | |||
44 | EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" | ||
45 | |||
46 | # these are present in the libcap defaults, so include in our CFLAGS too | ||
47 | CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" | ||
48 | |||
49 | do_compile() { | ||
50 | oe_runmake ${PACKAGECONFIG_CONFARGS} | ||
51 | } | ||
52 | |||
53 | do_install() { | ||
54 | oe_runmake install \ | ||
55 | ${PACKAGECONFIG_CONFARGS} \ | ||
56 | DESTDIR="${D}" \ | ||
57 | prefix="${prefix}" \ | ||
58 | SBINDIR="${sbindir}" | ||
59 | } | ||
60 | |||
61 | do_install_append() { | ||
62 | # Move the library to base_libdir | ||
63 | install -d ${D}${base_libdir} | ||
64 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then | ||
65 | mv ${D}${libdir}/libcap* ${D}${base_libdir} | ||
66 | if [ -d ${D}${libdir}/security ]; then | ||
67 | mv ${D}${libdir}/security ${D}${base_libdir} | ||
68 | fi | ||
69 | fi | ||
70 | } | ||
71 | |||
72 | FILES_${PN}-dev += "${base_libdir}/*.so" | ||
73 | |||
74 | # pam files | ||
75 | FILES_${PN} += "${base_libdir}/security/*.so" | ||
76 | |||
77 | BBCLASSEXTEND = "native nativesdk" | ||