summaryrefslogtreecommitdiff
path: root/packaging/qemu-accel-armv7hl.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/qemu-accel-armv7hl.spec')
-rw-r--r--packaging/qemu-accel-armv7hl.spec54
1 files changed, 27 insertions, 27 deletions
diff --git a/packaging/qemu-accel-armv7hl.spec b/packaging/qemu-accel-armv7hl.spec
index d208d65..22d0300 100644
--- a/packaging/qemu-accel-armv7hl.spec
+++ b/packaging/qemu-accel-armv7hl.spec
@@ -125,7 +125,7 @@ gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'`
gcc_install_dir="$(%{target_arch}-gcc -print-file-name=)"
# just like it is determided in python.spec
-python_version=`python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3`
+host_python="python$(python --version 2>&1 | sed -ne '1s/.* //p' | head -c 3)"
binaries="%{_libdir}/libnsl.so.1 %{_libdir}/libnss_compat.so.2" # loaded via dlopen by glibc
%ifarch %ix86
@@ -207,9 +207,9 @@ prepare_package_list clang \
%{_bindir}/{clang-*,clang++,opt,lli,llc,llvm-*}
prepare_package_list python \
- %{_bindir}/python${python_version} \
- %{_libdir}/python${python_version}/lib-dynload/*.so \
- %{_libdir}/python${python_version}/site-packages/*/*.so
+ %{_bindir}/${host_python} \
+ %{_libdir}/${host_python}/lib-dynload/*.so \
+ %{_libdir}/${host_python}/site-packages/*/*.so
## dump list of binaries and list of packages
echo "### Binaries accelerated ###"
@@ -328,47 +328,47 @@ for binary in ar as ld{,.bfd,.gold} nm obj{copy,dump} ranlib strip; do
done
# 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
+mv %{buildroot}%{our_path}%{_bindir}/${host_python} %{buildroot}%{our_path}%{_bindir}/${host_python}-orig
+cat > %{buildroot}%{our_path}%{_bindir}/${host_python} << EOF
#!/bin/bash
if [ -z "\$PYTHONPATH" ]; then
- export PYTHONPATH="%{libdir}/python${python_version}"
+ export PYTHONPATH="%{libdir}/${host_python}"
else
- export PYTHONPATH+=":%{libdir}/python${python_version}"
+ export PYTHONPATH+=":%{libdir}/${host_python}"
fi
export PYTHONHOME="%{our_path}%{_prefix}"
-%{our_path}%{_bindir}/python${python_version}-orig "\$@"
+%{our_path}%{_bindir}/${host_python}-orig "\$@"
EOF
-chmod +x %{buildroot}%{our_path}%{_bindir}/python${python_version}
+chmod +x %{buildroot}%{our_path}%{_bindir}/${host_python}
-ln -s python${python_version} %{buildroot}%{our_path}%{_bindir}/python
-ln -s python${python_version} %{buildroot}%{our_path}%{_libdir}/python
+ln -s ${host_python} %{buildroot}%{our_path}%{_bindir}/python
+ln -s ${host_python} %{buildroot}%{our_path}%{_libdir}/python
#create symlinks for Scons
-mkdir -p %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages
-ln -sf %{libdir}/python${python_version}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/python${python_version}/site-packages/SCons
+mkdir -p %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages
+ln -sf %{libdir}/${host_python}/site-packages/SCons %{buildroot}%{our_path}%{libdir}/${host_python}/site-packages/SCons
# rpmlint acceleration
mkdir -p %{buildroot}%{our_path}/opt/testing/bin
-ln -s %{our_path}%{_bindir}/python${python_version}-orig %{buildroot}%{our_path}/opt/testing/bin/
-cat > %{buildroot}%{our_path}/opt/testing/bin/python${python_version} << EOF
+ln -s %{our_path}%{_bindir}/${host_python}-orig %{buildroot}%{our_path}/opt/testing/bin/
+cat > %{buildroot}%{our_path}/opt/testing/bin/${host_python} << EOF
#!/bin/bash
if [ -z "\$PYTHONPATH" ]; then
- export PYTHONPATH="%{libdir}/python${python_version}"
+ export PYTHONPATH="%{libdir}/${host_python}"
else
- export PYTHONPATH+=":%{libdir}/python${python_version}"
+ export PYTHONPATH+=":%{libdir}/${host_python}"
fi
export PYTHONHOME="%{our_path}%{_prefix}"
-%{our_path}/opt/testing/bin/python${python_version}-orig "\$@"
+%{our_path}/opt/testing/bin/${host_python}-orig "\$@"
EOF
-chmod +x %{buildroot}%{our_path}/opt/testing/bin/python${python_version}
-ln -s python${python_version} %{buildroot}%{our_path}/opt/testing/bin/python
-
-mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/
-mkdir -p %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/
-cp %{_libdir}/python${python_version}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/site-packages/rpm/
-cp %{_libdir}/python${python_version}/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/
-cp %{_libdir}/python${python_version}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/python${python_version}/encodings/
+chmod +x %{buildroot}%{our_path}/opt/testing/bin/${host_python}
+ln -s ${host_python} %{buildroot}%{our_path}/opt/testing/bin/python
+
+mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/
+mkdir -p %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/
+cp %{_libdir}/${host_python}/site-packages/rpm/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/site-packages/rpm/
+cp %{_libdir}/${host_python}/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/
+cp %{_libdir}/${host_python}/encodings/*.py %{buildroot}%{our_path}%{_libdir}/${host_python}/encodings/
find %{buildroot} -name 'python*' | sed -e 's|%{buildroot}%{our_path}||' | tee -a python.list
# rename gcc binaries