Skip to content
Advertisement

Library installation with yocto recipe

have a bit of a problem creating a recipe for yocto. More specifically i have to install a library from git that normally installs like this:

./bootstrap
./configure --sysconfdir=/etc
make
sudo make install

My question is how can I add this to the recipe functions do_configure, do_compile, do_install. Haven’t found much information or examples online.

Update 1:

This is the library that i want to integrate into yocto https://github.com/NXPNFCLinux/linux_libnfc-nci

Advertisement

Answer

It’s just a regular autotools based library. The main issues, that someone ought to fix, are to make the build create versioned libraries and to add a LICENSE or COPYING file.

However, a quick recipe could look like:

SUMMARY = "Linux NFC stack for NCI based NXP NFC Controllers"
HOMEPAGE = ""
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/include/linux_nfc_api.h;endline=17;md5=42fdb99b3ff2c12f594b22a774cb7308"
SECTION = "libs"

SRC_URI = "git://github.com/NXPNFCLinux/linux_libnfc-nci.git"
SRCREV = "118ea118cecda55c1b6a87d151a77b04515687df"
PV = "2.0+git${SRCPV}"

S = "${WORKDIR}/git"

inherit autotools

FILES_${PN} += "${libdir}/libnfc_nci_linux-1.so"
# Make sure it isn’t in the dev package’s files list
FILES_SOLIBSDEV = "${libdir}/libnfc_nci_linux.so"

A versioned library would allow us to remove the last three lines.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement