From b0b6de5e6c61fe92452bf057d2f0677a3d1fec9b Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 20 Feb 2009 16:12:44 +0000 Subject: silbe patch to build alsaaudio on first launch --- (limited to 'bin/wrapper') diff --git a/bin/wrapper b/bin/wrapper new file mode 100755 index 0000000..0d92661 --- /dev/null +++ b/bin/wrapper @@ -0,0 +1,22 @@ +#!/bin/bash +set -e +instflag="${SUGAR_ACTIVITY_ROOT}/data/.installed" +cpu="$(uname -m)" +archsrcdir="${SUGAR_BUNDLE_PATH}/arch_src" +archbundledir="${SUGAR_BUNDLE_PATH}/arch_${cpu}" +archinstdir="${SUGAR_ACTIVITY_ROOT}/data/.arch_${cpu}" +pythonversion="$(python -V 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1-2)" + +if [ ! -e "${instflag}" ] ; then + curchecksum="$(find "${archsrcdir}" -type f -print0 | xargs -0 md5sum -- | md5sum)" + if [ "$cpu" = "unknown" -o ! -e "${archbundledir}" ] || [ "${curchecksum}" != "$(cat "${archbundledir}/checksum")" ] ; then + # unknown arch or no (current) precompiled binaries -> need to compile + compile-archspec "${archsrcdir}" "${archinstdir}" + fi + touch "${instflag}" +fi + +export LD_LIBRARY_PATH="${archinstdir}/lib:${archinstdir}/lib64:${LD_LIBRARY_PATH}" +export PYTHONPATH="${archinstdir}/lib/python${pythonversion}/site-packages:${PYTHONPATH}" + +exec "$@" -- cgit v0.9.1