diff --git a/packages/addons/addon-depends/librespot-depends/pyalsaaudio/package.mk b/packages/addons/addon-depends/librespot-depends/pyalsaaudio/package.mk new file mode 100644 index 0000000000..c0d21f1dd6 --- /dev/null +++ b/packages/addons/addon-depends/librespot-depends/pyalsaaudio/package.mk @@ -0,0 +1,38 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2017-present Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="pyalsaaudio" +PKG_VERSION="0.8.4" +PKG_LICENSE="PSF" +PKG_SITE="http://larsimmisch.github.io/pyalsaaudio/" +PKG_URL="https://files.pythonhosted.org/packages/source/${PKG_NAME:0:1}/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain Python distutilscross:host alsa-lib" +PKG_LONGDESC="ALSA bindings" + +make_target() { + export LDSHARED="$CC -shared" + export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" + python setup.py build --cross-compile +} + +makeinstall_target() { + python setup.py install --root=$INSTALL --prefix=/usr + find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";" + rm -rf $INSTALL/usr/lib/python*/site-packages/*.egg-info \ + $INSTALL/usr/lib/python*/site-packages/*/tests +}