blob: 1e92d00790a59fe1ad063e96835df21acd588132 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001require libgpiod.inc
2
3LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0"
4LIC_FILES_CHKSUM = " \
5 file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://LICENSES/LGPL-2.1-or-later.txt;md5=4b54a1fd55a448865a0b32d41598759d \
7 file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f \
8"
9
10FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
11
12SRC_URI[sha256sum] = "fa4024a080121c958502f9a46a5bda44bea85e7a4dd7fcb3dead463b6fc4261c"
13
14# Enable all project features for ptest
15PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
16PACKAGECONFIG[gpioset-interactive] = "--enable-gpioset-interactive,--disable-gpioset-interactive,libedit"
17
18PACKAGES =+ "${PN}-ptest-dev"
19FILES:${PN}-tools += "${bindir}/gpionotify"
20FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*"
21FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h"
22
23RDEPENDS:${PN}-ptest += " \
24 bash \
25 ${@bb.utils.contains('PTEST_ENABLED', '1', 'shunit2', '', d)} \
26"
27RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim"
28
29do_install_ptest:append() {
30 install -m 0755 ${S}/tools/gpio-tools-test.bash ${D}${PTEST_PATH}/tests/
31 install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h
32}