summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/meta/external-python-tarball.bb67
1 files changed, 4 insertions, 63 deletions
diff --git a/meta/recipes-core/meta/external-python-tarball.bb b/meta/recipes-core/meta/external-python-tarball.bb
index 2085acc223..2513cf68f7 100644
--- a/meta/recipes-core/meta/external-python-tarball.bb
+++ b/meta/recipes-core/meta/external-python-tarball.bb
@@ -3,17 +3,9 @@ LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ 3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
4 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 4 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5 5
6DEPENDS = "opkg-native opkg-utils-native virtual/fakeroot-native sed-native" 6PR = "r2"
7 7
8PR = "r1" 8TOOLCHAIN_TARGET_TASK ?= ""
9
10inherit meta
11
12SDK_DIR = "${WORKDIR}/sdk"
13SDK_OUTPUT = "${SDK_DIR}/image"
14SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
15
16IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
17 9
18TOOLCHAIN_HOST_TASK ?= "\ 10TOOLCHAIN_HOST_TASK ?= "\
19 nativesdk-python-core \ 11 nativesdk-python-core \
@@ -43,56 +35,5 @@ RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
43 35
44EXCLUDE_FROM_WORLD = "1" 36EXCLUDE_FROM_WORLD = "1"
45 37
46do_populate_sdk() { 38inherit meta
47 rm -rf ${SDK_OUTPUT} 39inherit populate_sdk
48 mkdir -p ${SDK_OUTPUT}
49 mkdir -p ${SDK_OUTPUT}${localstatedir}/lib/opkg/
50
51 rm -f ${IPKGCONF_TARGET}
52 touch ${IPKGCONF_TARGET}
53 rm -f ${IPKGCONF_SDK}
54 touch ${IPKGCONF_SDK}
55
56 package_update_index_ipk
57 package_generate_ipkg_conf
58
59 for arch in ${PACKAGE_ARCHS}; do
60 revipkgarchs="$arch $revipkgarchs"
61 done
62
63 ${IPKG_HOST} update
64 ${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK}
65
66 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg
67 mv ${SDK_OUTPUT}/var/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg/
68 rm -Rf ${SDK_OUTPUT}/var
69
70 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
71 install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
72
73 rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
74
75 # Link the ld.so.cache file into the hosts filesystem
76 ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
77
78 # Add version information
79 versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
80 touch $versionfile
81 echo 'Distro: ${DISTRO}' >> $versionfile
82 echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
83 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
84 echo 'Timestamp: ${DATETIME}' >> $versionfile
85
86 # Package it up
87 mkdir -p ${SDK_DEPLOY}
88 cd ${SDK_OUTPUT}
89 tar --owner=root --group=root -cj --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
90}
91
92do_populate_sdk[nostamp] = "1"
93do_populate_sdk[recrdeptask] = "do_package_write"
94addtask populate_sdk before do_build after do_install
95
96inherit blacklist
97
98PNBLACKLIST[external-python-tarball] = "${@base_contains('PACKAGE_CLASSES', 'package_ipk', '', 'This recipe requires \'package_ipk\' support to be enabled in PACKAGE_CLASSES.', d)}"