File AppRun of Package freeorion

#!/usr/bin/env bash
set -e
[ -n "$DEBUG" ] && set -x

PYVER=3.6

export ARCH=$(uname -m)
export APPDIR="$(dirname "$(readlink -e "$0")")"
export PATH="${APPDIR}"/usr/bin/:"${APPDIR}"/usr/sbin/:"${APPDIR}"/usr/games/:"${APPDIR}"/bin/:"${APPDIR}"/sbin/:"${PATH}"
export CFLAGS=-I"${APPDIR}"/usr/include/
export LDFLAGS=-L"${APPDIR}"/usr/lib/
export LD_LIBRARY_PATH="${APPDIR}"/usr/lib/:"${APPDIR}"/usr/lib/i386-linux-gnu/:"${APPDIR}"/usr/lib/x86_64-linux-gnu/:"${APPDIR}"/usr/lib32/:"${APPDIR}"/usr/lib64/:"${APPDIR}"/lib/:"${APPDIR}"/lib/i386-linux-gnu/:"${APPDIR}"/lib/x86_64-linux-gnu/:"${APPDIR}"/lib32/:"${APPDIR}"/lib64/:"${LD_LIBRARY_PATH}"

export PYTHONPATH="${APPDIR}"/usr/lib/python$PYVER:"${APPDIR}"/usr/lib/python$PYVER/lib-dynload:"${APPDIR}"/usr/lib/python$PYVER/site-packages
export PYTHONHOME="${APPDIR}"/usr/lib64/python$PYVER

EXEC=$(grep -e '^Exec=.*' "${APPDIR}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)

exec "${EXEC}" $@
openSUSE Build Service is sponsored by