Example
Assume we want to create recipe for icu
.
-
Generate source code information
touch meta-debian/recipes-debian/sources/icu.inc # Enable debian-source echo 'DEBIAN_SOURCE_ENABLED = "1"' >> <build-dir>/conf/local.conf # Force debian-source re-generate in case Sources.xz doesn't change echo 'DEBIAN_SRC_FORCE_REGEN = "1"' >> <build-dir>/conf/local.conf
-
Create recipe with name
icu_debian.bb
mkdir meta-debian/recipes-debian/icu vim meta-debian/recipes-debian/icu_debian.bb
-
Add
LICENSE
andLIC_FILES_CHKSUM
in recipeLICENSE = "ICU" LIC_FILES_CHKSUM = "file://LICENSE;md5=63752c57bd0b365c9af9f427ef79c819"
-
Handle Debian source code
inherit debian-package require recipes-debian/sources/icu.inc
Unlike other package,
icu
put buildable source in the sub-foldersource
. So we need to overwriteS
and updateLIC_FILES_CHKSUM
to a correct path.LICENSE = "ICU" LIC_FILES_CHKSUM = "file://../LICENSE;md5=63752c57bd0b365c9af9f427ef79c819" inherit debian-package require recipes-debian/sources/icu.inc S = "${DEBIAN_UNPACK_DIR}/source"
-
Reuse codes from
meta
Layermeta
already provideicu.inc
with setup for bitbake. Reuse it.require recipes-support/icu/icu.inc
If recipe wants to use patch from
meta
, it need to append FILESPATH to point toicu
patch directory.FILESPATH_append = ":${COREBASE}/meta/recipes-support/icu/icu" SRC_URI += "file://fix-install-manx.patch"
-
Configure and split packages For
icu
, all of configurations are put inicu.inc
and we already include it, so nothing left to do.
Final recipe
require recipes-support/icu/icu.inc
LICENSE = "ICU"
LIC_FILES_CHKSUM = "file://../LICENSE;md5=63752c57bd0b365c9af9f427ef79c819"
inherit debian-package
require recipes-debian/sources/icu.inc
FILESPATH_append = ":${COREBASE}/meta/recipes-support/icu/icu"
SRC_URI += "file://fix-install-manx.patch"
S = "${DEBIAN_UNPACK_DIR}/source"