#!/bin/sh

. config/options

cd $BUILD/$1*

get_meta $1
export PYTHONXCPREFIX="$LIB_PREFIX"

cat >>src/revision.py<<EOF
"""
Freevo revision number
"""

__revision__ = '$PKG_VERSION'
EOF


python setup.py build --cross-compile
python setup.py install -O1 --skip-build --prefix /usr --root .install

mkdir -p .install/usr/bin
cp youtube-dl .install/usr/bin
chmod +x .install/usr/bin/youtube-dl
# freevo looks for .py files in several places, so we only get rid of the .pyo
find .install -name \*.pyo -exec rm -rf '{}' \;
