xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-support/libseccomp/libseccomp_2.5.3.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "interface to seccomp filtering mechanism"
2*4882a593SmuzhiyunDESCRIPTION = "The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism: seccomp."
3*4882a593SmuzhiyunHOMEPAGE = "https://github.com/seccomp/libseccomp"
4*4882a593SmuzhiyunSECTION = "security"
5*4882a593SmuzhiyunLICENSE = "LGPL-2.1-only"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=7c13b3376cea0ce68d2d2da0a1b3a72c"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunDEPENDS += "gperf-native"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSRCREV = "57357d2741a3b3d3e8425889a6b79a130e0fa2f3"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSRC_URI = "git://github.com/seccomp/libseccomp.git;branch=release-2.5;protocol=https \
13*4882a593Smuzhiyun           file://run-ptest \
14*4882a593Smuzhiyun           "
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunS = "${WORKDIR}/git"
17*4882a593Smuzhiyun
18*4882a593Smuzhiyuninherit autotools-brokensep pkgconfig ptest features_check
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "seccomp"
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunPACKAGECONFIG ??= ""
23*4882a593SmuzhiyunPACKAGECONFIG[python] = "--enable-python, --disable-python, python3"
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunDISABLE_STATIC = ""
26*4882a593Smuzhiyun
27*4882a593Smuzhiyundo_compile_ptest() {
28*4882a593Smuzhiyun    oe_runmake -C tests check-build
29*4882a593Smuzhiyun}
30*4882a593Smuzhiyun
31*4882a593Smuzhiyundo_install_ptest() {
32*4882a593Smuzhiyun    install -d ${D}${PTEST_PATH}/tests
33*4882a593Smuzhiyun    install -d ${D}${PTEST_PATH}/tools
34*4882a593Smuzhiyun    for file in $(find tests/* -executable -type f); do
35*4882a593Smuzhiyun        install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
36*4882a593Smuzhiyun    done
37*4882a593Smuzhiyun    for file in $(find tests/*.tests -type f); do
38*4882a593Smuzhiyun        install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
39*4882a593Smuzhiyun    done
40*4882a593Smuzhiyun        for file in $(find tests/*.pfc -type f); do
41*4882a593Smuzhiyun        install -m 644 ${S}/${file} ${D}/${PTEST_PATH}/tests
42*4882a593Smuzhiyun    done
43*4882a593Smuzhiyun    install -m 644 ${S}/tests/valgrind_test.supp ${D}/${PTEST_PATH}/tests
44*4882a593Smuzhiyun    for file in $(find tools/* -executable -type f); do
45*4882a593Smuzhiyun        install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools
46*4882a593Smuzhiyun    done
47*4882a593Smuzhiyun    # Overwrite libtool wrappers with real executables
48*4882a593Smuzhiyun    for file in $(find tools/.libs/* -executable -type f); do
49*4882a593Smuzhiyun        install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools
50*4882a593Smuzhiyun    done
51*4882a593Smuzhiyun}
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunFILES:${PN} = "${bindir} ${libdir}/${BPN}.so*"
54*4882a593SmuzhiyunFILES:${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunRDEPENDS:${PN}-ptest = "coreutils bash"
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunPV = "2.5.3"
59