diff options
Diffstat (limited to 'meta/recipes-support/libcap/libcap_2.24.bb')
| -rw-r--r-- | meta/recipes-support/libcap/libcap_2.24.bb | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap/libcap_2.24.bb b/meta/recipes-support/libcap/libcap_2.24.bb new file mode 100644 index 0000000000..75cf5d415d --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.24.bb | |||
| @@ -0,0 +1,72 @@ | |||
| 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 = "perl-native-runtime" | ||
| 9 | |||
| 10 | SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz" | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80" | ||
| 13 | SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65" | ||
| 14 | |||
| 15 | inherit lib_package | ||
| 16 | |||
| 17 | # do NOT pass target cflags to host compilations | ||
| 18 | # | ||
| 19 | do_configure() { | ||
| 20 | # libcap uses := for compilers, fortunately, it gives us a hint | ||
| 21 | # on what should be replaced with ?= | ||
| 22 | sed -e 's,:=,?=,g' -i Make.Rules | ||
| 23 | sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules | ||
| 24 | |||
| 25 | # disable gperf detection | ||
| 26 | sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile | ||
| 27 | } | ||
| 28 | |||
| 29 | PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
| 30 | PACKAGECONFIG_class-native ??= "" | ||
| 31 | |||
| 32 | PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr" | ||
| 33 | PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam" | ||
| 34 | |||
| 35 | EXTRA_OEMAKE += " \ | ||
| 36 | INDENT= \ | ||
| 37 | lib=${@os.path.basename('${libdir}')} \ | ||
| 38 | RAISE_SETFCAP=no \ | ||
| 39 | " | ||
| 40 | |||
| 41 | EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" | ||
| 42 | |||
| 43 | do_compile() { | ||
| 44 | oe_runmake ${EXTRA_OECONF} | ||
| 45 | } | ||
| 46 | |||
| 47 | do_install() { | ||
| 48 | oe_runmake install \ | ||
| 49 | ${EXTRA_OECONF} \ | ||
| 50 | DESTDIR="${D}" \ | ||
| 51 | prefix="${prefix}" \ | ||
| 52 | SBINDIR="${D}${sbindir}" | ||
| 53 | } | ||
| 54 | |||
| 55 | do_install_append() { | ||
| 56 | # Move the library to base_libdir | ||
| 57 | install -d ${D}${base_libdir} | ||
| 58 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then | ||
| 59 | mv ${D}${libdir}/libcap* ${D}${base_libdir} | ||
| 60 | if [ -d ${D}${libdir}/security ]; then | ||
| 61 | mv ${D}${libdir}/security ${D}${base_libdir} | ||
| 62 | fi | ||
| 63 | fi | ||
| 64 | } | ||
| 65 | |||
| 66 | FILES_${PN}-dev += "${base_libdir}/*.so" | ||
| 67 | |||
| 68 | # pam files | ||
| 69 | FILES_${PN} += "${base_libdir}/security/*.so" | ||
| 70 | FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so" | ||
| 71 | |||
| 72 | BBCLASSEXTEND = "native nativesdk" | ||
