diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-support/libcap/libcap.inc | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/libcap/libcap.inc')
-rw-r--r-- | meta/recipes-support/libcap/libcap.inc | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc new file mode 100644 index 0000000000..fef700a629 --- /dev/null +++ b/meta/recipes-support/libcap/libcap.inc | |||
@@ -0,0 +1,68 @@ | |||
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 = "attr perl-native-runtime" | ||
9 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
10 | # attr and pam are disabled by EXTRA_OEMAKE_class-native | ||
11 | DEPENDS_class-native = "perl-native-runtime" | ||
12 | |||
13 | SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \ | ||
14 | file://fix-CAP_LAST_CAP.patch" | ||
15 | |||
16 | PR = "r1" | ||
17 | |||
18 | inherit lib_package | ||
19 | |||
20 | # do NOT pass target cflags to host compilations | ||
21 | # | ||
22 | do_configure() { | ||
23 | # libcap uses := for compilers, fortunately, it gives us a hint | ||
24 | # on what should be replaced with ?= | ||
25 | sed -e 's,:=,?=,g' -i Make.Rules | ||
26 | sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules | ||
27 | |||
28 | # disable gperf detection | ||
29 | sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile | ||
30 | } | ||
31 | |||
32 | EXTRA_OEMAKE = " \ | ||
33 | LIBATTR=yes \ | ||
34 | PAM_CAP=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} \ | ||
35 | INDENT= SYSTEM_HEADERS=${STAGING_INCDIR} RAISE_SETFCAP=no \ | ||
36 | lib=${@os.path.basename('${libdir}')} \ | ||
37 | " | ||
38 | EXTRA_OEMAKE_class-native = " \ | ||
39 | LIBATTR=no \ | ||
40 | PAM_CAP=no \ | ||
41 | INDENT= \ | ||
42 | lib=${@os.path.basename('${libdir}')} \ | ||
43 | " | ||
44 | |||
45 | do_compile() { | ||
46 | oe_runmake | ||
47 | } | ||
48 | |||
49 | do_install() { | ||
50 | oe_runmake install DESTDIR="${D}" prefix="${prefix}" SBINDIR="${D}${sbindir}" | ||
51 | } | ||
52 | |||
53 | do_install_append() { | ||
54 | # Move the library to base_libdir | ||
55 | install -d ${D}${base_libdir} | ||
56 | if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then | ||
57 | mv ${D}${libdir}/* ${D}${base_libdir} | ||
58 | rmdir ${D}${libdir} | ||
59 | fi | ||
60 | } | ||
61 | |||
62 | FILES_${PN}-dev += "${base_libdir}/*.so" | ||
63 | |||
64 | # pam files | ||
65 | FILES_${PN} += "${base_libdir}/security/*.so" | ||
66 | FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so" | ||
67 | |||
68 | BBCLASSEXTEND = "native" | ||