summaryrefslogtreecommitdiff
path: root/recipes-core/mlinux/mlinux-feed-configs.bb
blob: 08895a098408a21b443ff1c6899c3522a6144900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
SUMMARY = "Configuration files for online package repositories aka feeds"
PR = "r3"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

feeds="all ${TUNE_PKGARCH} ${MACHINE_ARCH}"
feed_file="mlinux-feed.conf"

do_compile() {
    mkdir -p ${S}/${sysconfdir}/opkg
    rm -f ${S}/${sysconfdir}/opkg/${feed_file}
    for feed in ${feeds}; do
        echo "src/gz ${DISTRO_FEED_PREFIX}-${feed} ${DISTRO_FEED_URI}/${feed}" >> ${S}/${sysconfdir}/opkg/${feed_file}
    done
    # For ARMV7 there is another feed path without thumb
    case ${ARMPKGARCH} in
        armv7*)
            EXTRA="${ARMPKGARCH}${ARMPKGSFX_EABI}${ARMPKGSFX_FPU}"
            EXTRA2="${MACHINE_SOCARCH}"
            ;;
        *)
            EXTRA=""
            EXTRA2=""
            ;;
    esac
    if [ -n "${EXTRA}" ] ; then
        echo "src/gz ${DISTRO_FEED_PREFIX}-${EXTRA} ${DISTRO_FEED_URI}/${EXTRA}" >> ${S}/${sysconfdir}/opkg/${feed_file}
    fi
    if [ -n "${EXTRA2}" ] ; then
        echo "src/gz ${DISTRO_FEED_PREFIX}-${EXTRA2} ${DISTRO_FEED_URI}/${EXTRA2}" >> ${S}/${sysconfdir}/opkg/${feed_file}
    fi
}
do_install () {
    install -d ${D}${sysconfdir}/opkg
    install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
}

PACKAGE_ARCH = "${MACHINE_ARCH}"

CONFFILES_${PN} += "${sysconfdir}/opkg/${feed_file}"