diff options
Diffstat (limited to 'meta-oe/recipes-core/meta/distro-feed-configs.bb')
-rw-r--r-- | meta-oe/recipes-core/meta/distro-feed-configs.bb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/meta/distro-feed-configs.bb b/meta-oe/recipes-core/meta/distro-feed-configs.bb new file mode 100644 index 000000000..4da2b1441 --- /dev/null +++ b/meta-oe/recipes-core/meta/distro-feed-configs.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | DESCRIPTION = "Configuration files for online package repositories aka feeds" | ||
2 | PR = "r1" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${TOPDIR}/meta-shr/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | DISTRO_FEED_PREFIX ?= "remote" | ||
7 | DISTRO_FEED_URI ?= "http://my-distribution.example/remote-feed/" | ||
8 | |||
9 | do_compile() { | ||
10 | mkdir -p ${S}/${sysconfdir}/opkg | ||
11 | for feed in all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}; do | ||
12 | echo "src/gz ${DISTRO_FEED_PREFIX}-${feed} ${DISTRO_FEED_URI}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf | ||
13 | done | ||
14 | } | ||
15 | do_install () { | ||
16 | install -d ${D}${sysconfdir}/opkg | ||
17 | install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/ | ||
18 | } | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | #def distro_feed_configs(d): | ||
23 | # import bb | ||
24 | # parchs = bb.data.getVar( "PACKAGE_EXTRA_ARCHS", d, 1 ).split() | ||
25 | # march = bb.data.getVar( "MACHINE_ARCH", d, 1 ).split() | ||
26 | # archs = [ "all" ] + parchs + march | ||
27 | # confs = [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in archs ] | ||
28 | # return " ".join( confs ) | ||
29 | # | ||
30 | #CONFFILES_${PN} += '${@distro_feed_configs(d)}' | ||
31 | |||
32 | CONFFILES_${PN} += '${@ " ".join( [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in "all ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".split() ] ) }' | ||