summaryrefslogtreecommitdiffstats
path: root/meta/recipes-tbd
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-02 13:11:37 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-02 13:11:37 +0000
commitd45af98d0122ab72615ce8df019017926f7c84e0 (patch)
treed8423931d4b5f53184497f9d83c309e2f6287224 /meta/recipes-tbd
parent30feed75dfed81c03537ba63a94e7fe8949c042d (diff)
downloadpoky-d45af98d0122ab72615ce8df019017926f7c84e0.tar.gz
external-python-tarball: Add ability to generate an externally usable standalone python tarball
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-tbd')
-rw-r--r--meta/recipes-tbd/meta/external-python-tarball.bb87
1 files changed, 87 insertions, 0 deletions
diff --git a/meta/recipes-tbd/meta/external-python-tarball.bb b/meta/recipes-tbd/meta/external-python-tarball.bb
new file mode 100644
index 0000000000..a27213dc63
--- /dev/null
+++ b/meta/recipes-tbd/meta/external-python-tarball.bb
@@ -0,0 +1,87 @@
1DESCRIPTION = "Meta package for building a standalone python tarball"
2LICENSE = "MIT"
3DEPENDS = "opkg-native opkg-utils-native virtual/fakeroot-native sed-native"
4
5inherit meta
6
7SDK_DIR = "${WORKDIR}/sdk"
8SDK_OUTPUT = "${SDK_DIR}/image"
9SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
10
11IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
12
13TOOLCHAIN_HOST_TASK ?= "\
14 python-nativesdk-core \
15 python-nativesdk-textutils \
16 python-nativesdk-sqlite3 \
17 python-nativesdk-pickle \
18 python-nativesdk-logging \
19 python-nativesdk-elementtree \
20 python-nativesdk-curses \
21 python-nativesdk-compile \
22 python-nativesdk-compiler \
23 python-nativesdk-fcntl \
24 python-nativesdk-shell \
25 python-nativesdk-misc \
26 python-nativesdk-subprocess \
27 python-nativesdk-xmlrpc \
28 python-nativesdk-netclient \
29 python-nativesdk-netserver \
30 python-nativesdk-distutils"
31
32TOOLCHAIN_OUTPUTNAME ?= "python-nativesdk-standalone"
33
34RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
35
36EXCLUDE_FROM_WORLD = "1"
37
38do_populate_sdk() {
39 rm -rf ${SDK_OUTPUT}
40 mkdir -p ${SDK_OUTPUT}
41 mkdir -p ${SDK_OUTPUT}${localstatedir}/lib/opkg/
42
43 rm -f ${IPKGCONF_TARGET}
44 touch ${IPKGCONF_TARGET}
45 rm -f ${IPKGCONF_SDK}
46 touch ${IPKGCONF_SDK}
47
48 package_update_index_ipk
49 package_generate_ipkg_conf
50
51 for arch in ${PACKAGE_ARCHS}; do
52 revipkgarchs="$arch $revipkgarchs"
53 done
54
55 ${IPKG_HOST} update
56 ${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK}
57
58 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg
59 mv ${SDK_OUTPUT}/var/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg/
60 rm -Rf ${SDK_OUTPUT}/var
61
62 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
63 install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
64
65 rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
66
67 # Link the ld.so.cache file into the hosts filesystem
68 ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
69
70 # Add version information
71 versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
72 touch $versionfile
73 echo 'Distro: ${DISTRO}' >> $versionfile
74 echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
75 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
76 echo 'Timestamp: ${DATETIME}' >> $versionfile
77
78 # Package it up
79 mkdir -p ${SDK_DEPLOY}
80 cd ${SDK_OUTPUT}
81 ${FAKEROOT} tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
82}
83
84do_populate_sdk[nostamp] = "1"
85do_populate_sdk[recrdeptask] = "do_package_write"
86addtask populate_sdk before do_build after do_install
87