#!/bin/sh -xe # check build environment prepare() { if [ "${TARGET_OS}" != "windows-32" ] && [ "${TARGET_OS}" != "windows-64" ] \ && ["${TARGET_OS}" != "ubuntu-32" ] && ["${TARGET_OS}" != "ubuntu-64" ] then exit 1 fi if [ "${TARGET_OS}" = "windows-32" ] || [ "${TARGET_OS}" = "windows-64" ] then # for Windows target (cross compiling) # we should use cross compiler from mingw-x package if [ "${TARGET_OS}" = "windows-32" ] then export PATH=/opt/mingw32/bin:$PATH export CROSS_PREFIX=i686-w64-mingw32 else export PATH=/opt/mingw64/bin:$PATH export CROSS_PREFIX=x86_64-w64-mingw32 fi # correct pc's prefix since windows install script is not run # on linux cd ${ROOTDIR}/lib/pkgconfig ${ROOTDIR}/correct_pc_prefix.sh cd ${ROOTDIR} # mingw-x doesn't have zlib, so we use our own. export EXTRA_CFLAGS=-I${ROOTDIR}/include export EXTRA_LDFLAGS=-L${ROOTDIR}/lib else # for linux target REQUIRED_PKG="ant python zlib1g-dev libglib2.0-dev libsdl1.2-dev \ libasound2-dev libx11-dev libv4l-dev libxcomposite-dev \ libpixman-1-dev libcurl4-gnutls-dev libcap-dev libattr1-dev" echo "Checking required packages before compling!!" for pkg in ${REQUIRED_PKG} do dpkg -s ${pkg} > /dev/null if [ "x$?" = "x0" ] then echo "checking ${pkg} ... OK" else echo "checking ${pkg} ... failure" exit 1 fi done fi } # clean clean() { echo "nothing to do" } # build build() { . $SRCDIR/package/build.common build_common } # install install() { . $SRCDIR/package/build.common install_common }