Files
meta-openembedded/meta-oe/recipes-core/meta/distro-feed-configs.bb
Paul Barker 4578561792 distro-feed-configs: Make list of archs configurable
The list of architectures for which to emit feed configurations is now taken
from the DISTRO_FEED_ARCHS variable. The default value for this variable is the
list of architectures which was previously used. Thus in the default case
nothing is changed, but DISTRO_FEED_ARCHS can now be overridden in local.conf.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-12-31 16:35:35 +01:00

34 lines
1.2 KiB
BlitzBasic

SUMMARY = "Configuration files for online package repositories aka feeds"
PR = "r6"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
DISTRO_FEED_PREFIX ?= "remote"
DISTRO_FEED_URI ?= "http://my-distribution.example/remote-feed/"
DISTRO_FEED_ARCHS ?= "all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
do_compile() {
mkdir -p ${S}/${sysconfdir}/opkg
for feed in ${DISTRO_FEED_ARCHS}; do
echo "src/gz ${DISTRO_FEED_PREFIX}-${feed} ${DISTRO_FEED_URI}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf
done
}
do_install () {
install -d ${D}${sysconfdir}/opkg
install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
#def distro_feed_configs(d):
# import bb
# parchs = d.getVar( "PACKAGE_EXTRA_ARCHS", 1 ).split()
# march = d.getVar( "MACHINE_ARCH", 1 ).split()
# archs = [ "all" ] + parchs + march
# confs = [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in archs ]
# return " ".join( confs )
#
#CONFFILES_${PN} += '${@distro_feed_configs(d)}'
CONFFILES_${PN} += '${@ " ".join( [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in "all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".split() ] ) }'