summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes-core/mlinux/mlinux-feed-configs.bb23
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-core/mlinux/mlinux-feed-configs.bb b/recipes-core/mlinux/mlinux-feed-configs.bb
new file mode 100644
index 0000000..2bd9bfc
--- /dev/null
+++ b/recipes-core/mlinux/mlinux-feed-configs.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Configuration files for online package repositories aka feeds"
+PR = "r0"
+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/"
+feeds="all ${TUNE_PKGARCH} ${MACHINE_ARCH}"
+
+do_compile() {
+ mkdir -p ${S}/${sysconfdir}/opkg
+ for feed in ${feeds}; 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}"
+
+CONFFILES_${PN} += '${@ " ".join( [ ( "${sysconfdir}/opkg/%s-feed.conf" % feed ) for feed in "${feeds}".split() ] ) }'