#!/bin/bash # --------------------------------------------------------------------------------------------------------------------- # check dependencies if ! which debootstrap > /dev/null; then echo "debootstrap not found, please install it" exit 1 fi # --------------------------------------------------------------------------------------------------------------------- # stop on error set -e # --------------------------------------------------------------------------------------------------------------------- # cd to correct path cd $(dirname $0) # --------------------------------------------------------------------------------------------------------------------- # set variables source common.env CHROOT_CARLA_DIR="/tmp/carla-src" PKG_FOLDER="Carla_2.0-beta6-linux" export MAKE_ARGS="${MAKE_ARGS} SKIP_ZYN_SYNTH=true" # --------------------------------------------------------------------------------------------------------------------- # function to remove old stuff cleanup() { rm -rf ${TARGETDIR}/chroot32/ rm -rf ${TARGETDIR}/chroot64/ } # --------------------------------------------------------------------------------------------------------------------- # create chroots if [ ! -d ${TARGETDIR}/chroot32 ]; then sudo debootstrap --arch=i386 lucid ${TARGETDIR}/chroot32 http://old-releases.ubuntu.com/ubuntu/ fi if [ ! -d ${TARGETDIR}/chroot64 ]; then sudo debootstrap --arch=amd64 lucid ${TARGETDIR}/chroot64 http://old-releases.ubuntu.com/ubuntu/ fi # --------------------------------------------------------------------------------------------------------------------- # setup chroots chroot_setup() { CHROOT_DIR=${TARGETDIR}/chroot${ARCH} cat < /etc/apt/sources.list apt-get update touch /tmp/setup-repo-list fi if [ ! -f /tmp/setup-repo-upgrade ]; then apt-get dist-upgrade touch /tmp/setup-repo-upgrade fi if [ ! -f /tmp/setup-repo-packages ]; then apt-get install -y build-essential libglib2.0-dev uuid-dev git-core apt-get install -y autoconf libtool apt-get install -y bison flex libxml-libxml-perl libxml-parser-perl apt-get install -y libgl1-mesa-dev libglu1-mesa-dev apt-get clean rm /usr/lib/libuuid.so touch /tmp/setup-repo-packages fi if [ ! -d ${CHROOT_CARLA_DIR} ]; then git clone git://github.com/falkTX/Carla --depth=1 ${CHROOT_CARLA_DIR} chmod -R 777 ${CHROOT_CARLA_DIR}/data/linux/ fi cd ${CHROOT_CARLA_DIR} git checkout . git pull # might be updated by git pull chmod 777 data/linux/*.sh chmod 777 data/linux/common.env EOF } export ARCH=32 chroot_setup export ARCH=64 chroot_setup # --------------------------------------------------------------------------------------------------------------------- # build base libs chroot_build_deps() { CHROOT_DIR=${TARGETDIR}/chroot${ARCH} cp build-deps.sh common.env ${CHROOT_DIR}${CHROOT_CARLA_DIR}/data/linux/ cat < Carla chmod +x Carla rm -rf carla carla.zip mv build-carla-control carla-control zip --symlinks -r -9 carla-control.zip carla-control cat data/windows/unzipfx-carla-control/unzipfx2cat carla-control.zip > CarlaControl chmod +x CarlaControl rm -rf carla-control carla-control.zip rm -rf ${PKG_FOLDER}${ARCH} mkdir ${PKG_FOLDER}${ARCH} cp data/linux/README ${PKG_FOLDER}${ARCH}/ mv Carla CarlaControl build-lv2/*.lv2 build-vst/*.vst ${PKG_FOLDER}${ARCH}/ tar cJf ${PKG_FOLDER}${ARCH}.tar.xz ${PKG_FOLDER}${ARCH} mv ${PKG_FOLDER}${ARCH}.tar.xz /tmp/ rmdir build-lv2 build-vst EOF } export ARCH=32 chroot_pack_carla export ARCH=64 chroot_pack_carla # ---------------------------------------------------------------------------------------------------------------------