diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-02-05 11:36:10 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-02-05 11:36:10 -0500 |
commit | c72df0a2d18d57189e13749f52c65bb1d3e3a6eb (patch) | |
tree | d04dd11749e9fa3b684ce6d7d2e0aa0b3039c224 /recipes-extended/libvirt/libvirt-python.inc | |
parent | 75c11b0d022a2e382c2925276f18594acd1a4930 (diff) | |
download | meta-virtualization-c72df0a2d18d57189e13749f52c65bb1d3e3a6eb.tar.gz |
libvirt-python: update install and packaging
To work with oe-core master, we need to update the libvirt-python
FILES_* specification to properly pick up and package the support
libraries.
We can also follow the lead of distutils and use a common set of
install arguments for the configuration and install of our nested
libvirt-python support.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/libvirt/libvirt-python.inc')
-rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 8f553988..c630bbba 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
@@ -9,22 +9,28 @@ RDEPENDS_${PN}-python += "python" | |||
9 | PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" | 9 | PACKAGECONFIG_${PN}-python[xen] = ",,,xen-python" |
10 | 10 | ||
11 | PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python" | 11 | PACKAGES += "${PN}-python-staticdev ${PN}-python-dev ${PN}-python-dbg ${PN}-python" |
12 | |||
12 | FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" | 13 | FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" |
13 | FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" | 14 | FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" |
14 | FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | 15 | FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" |
15 | FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" | 16 | FILES_${PN}-python += "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" |
16 | 17 | ||
17 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 18 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" |
18 | SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}" | 19 | SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}" |
19 | 20 | ||
20 | SRC_URI[libvirt_python.md5sum] = "38158e5740be65f17eef9f99ffa5dadf" | 21 | SRC_URI[libvirt_python.md5sum] = "e1effd6007b2ebd5d024c6c3838456fb" |
21 | SRC_URI[libvirt_python.sha256sum] = "2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b" | 22 | SRC_URI[libvirt_python.sha256sum] = "bce558606b157d0717ee7bd6537d85dd4c0321c59b4235c967db7a3aad80e246" |
22 | 23 | ||
23 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | 24 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" |
24 | export LIBVIRT_CFLAGS = "-I${S}/include" | 25 | export LIBVIRT_CFLAGS = "-I${S}/include" |
25 | export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl" | 26 | export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl" |
26 | export LDFLAGS="-L${S}/src/.libs" | 27 | export LDFLAGS="-L${S}/src/.libs" |
27 | 28 | ||
29 | LIBVIRT_INSTALL_ARGS = "--root=${D} \ | ||
30 | --prefix=${prefix} \ | ||
31 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | ||
32 | --install-data=${datadir}" | ||
33 | |||
28 | python __anonymous () { | 34 | python __anonymous () { |
29 | pkgconfig = d.getVar('PACKAGECONFIG', True) | 35 | pkgconfig = d.getVar('PACKAGECONFIG', True) |
30 | if ('python') in pkgconfig.split(): | 36 | if ('python') in pkgconfig.split(): |
@@ -43,10 +49,9 @@ addtask do_compile_python before do_install after do_compile | |||
43 | 49 | ||
44 | do_install_python() { | 50 | do_install_python() { |
45 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then | 51 | if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then |
46 | cd ${WORKDIR}/libvirt-python-${PV} && \ | 52 | cd ${WORKDIR}/${PN}-python-${PV} && \ |
47 | ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install \ | 53 | ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install \ |
48 | --install-lib=${PYTHON_SITEPACKAGES_DIR} \ | 54 | --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} |
49 | --root=${WORKDIR}/image | ||
50 | fi | 55 | fi |
51 | } | 56 | } |
52 | addtask do_install_python before do_populate_sysroot after do_install | 57 | addtask do_install_python before do_populate_sysroot after do_install |