diff options
author | Yury Usishchev <y.usishchev@samsung.com> | 2015-08-20 17:08:08 +0300 |
---|---|---|
committer | Yury Usishchev <y.usishchev@samsung.com> | 2015-08-20 17:08:33 +0300 |
commit | 66aa1161ed8a488f07352d6ded4dea8577de46c6 (patch) | |
tree | 87afb61f4525435c6a82740576b32bddffe1062d | |
parent | 822b1565f4c215e5ecbf269dfb33c28278fd01bc (diff) | |
download | qemu-accel-tizen_3.0.m1_mobile.tar.gz qemu-accel-tizen_3.0.m1_mobile.tar.bz2 qemu-accel-tizen_3.0.m1_mobile.zip |
Add python-cross package for python accelerationtizen_3.0.m2.a1_tv_releasetizen_3.0.m2.a1_mobile_releasetizen_3.0.m1_tv_releasetizen_3.0.m1_mobile_releasesubmit/tizen_common/20151026.085049submit/tizen_common/20151025.114336submit/tizen_common/20151025.112935submit/tizen_common/20151023.083358submit/tizen_common/20151015.190624submit/tizen/20150821.043747accepted/tizen/wearable/20150821.053256accepted/tizen/tv/20150821.053246accepted/tizen/mobile/20150821.053228tizen_3.0.m1_tvtizen_3.0.m1_mobile
Change-Id: I7b5616d773716491413d90fb71ff89203bfce788
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
-rw-r--r-- | packaging/baselibs.conf | 15 | ||||
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 41 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 41 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 41 |
4 files changed, 138 insertions, 0 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf index 4668884..0521acc 100644 --- a/packaging/baselibs.conf +++ b/packaging/baselibs.conf @@ -164,3 +164,18 @@ qemu-accel-aarch64 postun " $ACCEL_DIR/usr/lib/gcc/aarch64-tizen-linux/${GCCVER}/liblto_plugin.so" +/ config -/pkg-config$ + + +python-accel-armv7l + targettype cross-aarch64 block! + targettype 32bit block! + targettype cross-arm + autoreqprov off + +/ + +python-accel-aarch64 + targettype cross-arm block! + targettype 32bit block! + targettype cross-aarch64 + autoreqprov off + +/ diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index eca2b54..13c61bd 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools BuildRequires: cmake +BuildRequires: python +BuildRequires: python-xml Requires: coreutils Requires(post): update-alternatives Requires(postun): update-alternatives @@ -89,11 +91,24 @@ This package is used in %{emulated_arch_long} architecture builds using qemu to with native binaries. This should not be installed on systems, it is just intended for qemu environments. +%package -n python-accel-%{emulated_arch_long} +Version: %{version} +Release: %{release} +Summary: Binaries for python acceleration +License: GPL-2.0 +Group: Development/Cross Compilation + +%description -n python-accel-%{emulated_arch_long} +This package is used in qemu-accel to accelerate python. + %prep %build %install +# just like it is determided in python.spec +python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` + binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 LD="/lib/ld-linux.so.2" @@ -126,6 +141,8 @@ for executable in $LD \ /usr/bin/make \ /usr/bin/m4 \ /usr/bin/patch \ + %{_bindir}/python${python_version} \ + %{_libdir}/python${python_version}/lib-dynload/*.so \ /usr/bin/%{emulated_arch_triple_short}-{%{binaries_binutils_comma}} \ /usr/bin/eu-{addr2line,ar,elfcmp,elflint,findtextrel,ld,nm,objdump,ranlib,readelf,size,stack,strings,strip,unstrip} \ /usr/bin/xsltproc \ @@ -184,6 +201,23 @@ mkdir -p "%{buildroot}%{our_path}/usr/bin/" ln -sf ../usr/bin/bash "%{buildroot}%{our_path}/bin/sh" ln -sf ../../bin/bash "%{buildroot}%{our_path}/usr/bin/sh" +# create symlinks for python +mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig +cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{_libdir}/python${python_version}" +else + export PYTHONPATH+=":%{_libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}%{_bindir}/python${python_version}.orig "\$@" +EOF +chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} + +ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python +ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python + # binutils needs to be exposed in /usr/bin if [ ! -d %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin ] ; then mkdir -p %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin @@ -316,6 +350,13 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%exclude %{our_path}%{_bindir}/python* +%exclude %{our_path}%{_libdir}/python*/lib-dynload/*.so %ghost %{bfd_plugin_lto} +%files -n python-accel-%{emulated_arch_long} +%defattr(-,root,root) +%{our_path}%{_bindir}/python* +%{our_path}%{_libdir}/python*/lib-dynload/*.so + %changelog diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index f2aa79f..a9945c7 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools BuildRequires: cmake +BuildRequires: python +BuildRequires: python-xml Requires: coreutils Requires(post): update-alternatives Requires(postun): update-alternatives @@ -89,11 +91,24 @@ This package is used in %{emulated_arch_long} architecture builds using qemu to with native binaries. This should not be installed on systems, it is just intended for qemu environments. +%package -n python-accel-%{emulated_arch_long} +Version: %{version} +Release: %{release} +Summary: Binaries for python acceleration +License: GPL-2.0 +Group: Development/Cross Compilation + +%description -n python-accel-%{emulated_arch_long} +This package is used in qemu-accel to accelerate python. + %prep %build %install +# just like it is determided in python.spec +python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` + binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 LD="/lib/ld-linux.so.2" @@ -126,6 +141,8 @@ for executable in $LD \ /usr/bin/make \ /usr/bin/m4 \ /usr/bin/patch \ + %{_bindir}/python${python_version} \ + %{_libdir}/python${python_version}/lib-dynload/*.so \ /usr/bin/%{emulated_arch_triple_short}-{%{binaries_binutils_comma}} \ /usr/bin/eu-{addr2line,ar,elfcmp,elflint,findtextrel,ld,nm,objdump,ranlib,readelf,size,stack,strings,strip,unstrip} \ /usr/bin/xsltproc \ @@ -184,6 +201,23 @@ mkdir -p "%{buildroot}%{our_path}/usr/bin/" ln -sf ../usr/bin/bash "%{buildroot}%{our_path}/bin/sh" ln -sf ../../bin/bash "%{buildroot}%{our_path}/usr/bin/sh" +# create symlinks for python +mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig +cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{_libdir}/python${python_version}" +else + export PYTHONPATH+=":%{_libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}%{_bindir}/python${python_version}.orig "\$@" +EOF +chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} + +ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python +ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python + # binutils needs to be exposed in /usr/bin if [ ! -d %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin ] ; then mkdir -p %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin @@ -316,6 +350,13 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%exclude %{our_path}%{_bindir}/python* +%exclude %{our_path}%{_libdir}/python*/lib-dynload/*.so %ghost %{bfd_plugin_lto} +%files -n python-accel-%{emulated_arch_long} +%defattr(-,root,root) +%{our_path}%{_bindir}/python* +%{our_path}%{_libdir}/python*/lib-dynload/*.so + %changelog diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index 860c366..c957ee4 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -59,6 +59,8 @@ BuildRequires: qemu-linux-user BuildRequires: elfutils BuildRequires: libxslt-tools BuildRequires: cmake +BuildRequires: python +BuildRequires: python-xml Requires: coreutils Requires(post): update-alternatives Requires(postun): update-alternatives @@ -89,11 +91,24 @@ This package is used in %{emulated_arch_long} architecture builds using qemu to with native binaries. This should not be installed on systems, it is just intended for qemu environments. +%package -n python-accel-%{emulated_arch_long} +Version: %{version} +Release: %{release} +Summary: Binaries for python acceleration +License: GPL-2.0 +Group: Development/Cross Compilation + +%description -n python-accel-%{emulated_arch_long} +This package is used in qemu-accel to accelerate python. + %prep %build %install +# just like it is determided in python.spec +python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` + binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc %ifarch %ix86 LD="/lib/ld-linux.so.2" @@ -126,6 +141,8 @@ for executable in $LD \ /usr/bin/make \ /usr/bin/m4 \ /usr/bin/patch \ + %{_bindir}/python${python_version} \ + %{_libdir}/python${python_version}/lib-dynload/*.so \ /usr/bin/%{emulated_arch_triple_short}-{%{binaries_binutils_comma}} \ /usr/bin/eu-{addr2line,ar,elfcmp,elflint,findtextrel,ld,nm,objdump,ranlib,readelf,size,stack,strings,strip,unstrip} \ /usr/bin/xsltproc \ @@ -184,6 +201,23 @@ mkdir -p "%{buildroot}%{our_path}/usr/bin/" ln -sf ../usr/bin/bash "%{buildroot}%{our_path}/bin/sh" ln -sf ../../bin/bash "%{buildroot}%{our_path}/usr/bin/sh" +# create symlinks for python +mv %{buildroot}%{our_path}%{_bindir}/python${python_version} %{buildroot}%{our_path}%{_bindir}/python${python_version}.orig +cat > %{buildroot}%{our_path}%{_bindir}/python${python_version} << EOF +#!/bin/bash +if [ -z "\$PYTHONPATH" ]; then + export PYTHONPATH="%{_libdir}/python${python_version}" +else + export PYTHONPATH+=":%{_libdir}/python${python_version}" +fi +export PYTHONHOME="%{our_path}%{_prefix}" +%{our_path}%{_bindir}/python${python_version}.orig "\$@" +EOF +chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version} + +ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python +ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python + # binutils needs to be exposed in /usr/bin if [ ! -d %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin ] ; then mkdir -p %{buildroot}%{our_path}/usr/%{emulated_arch_triple_short}/bin @@ -316,6 +350,13 @@ ldconfig /usr/%{emulated_arch_triple_long}/include /emul /qemu +%exclude %{our_path}%{_bindir}/python* +%exclude %{our_path}%{_libdir}/python*/lib-dynload/*.so %ghost %{bfd_plugin_lto} +%files -n python-accel-%{emulated_arch_long} +%defattr(-,root,root) +%{our_path}%{_bindir}/python* +%{our_path}%{_libdir}/python*/lib-dynload/*.so + %changelog |