#Build Snapcast Clone the Snapcast repository. To do this, you need git. For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install git For Arch derivates: $ pacman -S git Clone Snapcast: $ git clone https://github.com/badaix/snapcast.git this creates a directory `snapcast`, in the following referred to as ``. Next clone the external submodules: $ cd /externals $ git submodule update --init --recursive ##Linux (Native) Install the build tools and required libs: For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install build-essential $ sudo apt-get install libasound2-dev libvorbisidec-dev libvorbis-dev libflac-dev alsa-utils libavahi-client-dev avahi-daemon Compilation requires gcc 4.8 or higher, so it's highly recommended to use Debian (Respbian) Jessie. For Arch derivates: $ pacman -S base-devel $ pacman -S alsa-lib avahi libvorbis flac alsa-utils ###Build Snapclient and Snapserver `cd` into the Snapcast src-root directory: $ cd $ make Install Snapclient and/or Snapserver: $ sudo make installserver $ sudo make installclient This will copy the client and/or server binary to `/usr/sbin` and update init.d/systemd to start the client/server as a daemon. ###Build Snapclient `cd` into the Snapclient src-root directory: $ cd /client $ make Install Snapclient $ sudo make install This will copy the client binary to `/usr/sbin` and update init.d/systemd to start the client as a daemon. ###Build Snapserver `cd` into the Snapserver src-root directory: $ cd /server $ make Install Snapserver $ sudo make install This will copy the server binary to `/usr/sbin` and update init.d/systemd to start the server as a daemon. ##Android (Cross compile) Cross compilation for Android is done with the [Android NDK](http://developer.android.com/tools/sdk/ndk/index.html) on a Linux host machine. ###Android NDK setup http://developer.android.com/ndk/guides/standalone_toolchain.html 1. Download NDK: `http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin` 2. Extract to: `/SOME/LOCAL/PATH/android-ndk-r10e` 3. Setup toolchain somewhere in your home dir (``): ```` $ cd /SOME/LOCAL/PATH/android-ndk-r10e/build/tools $ ./make-standalone-toolchain.sh --arch=arm --platform=android-14 --install-dir= --ndk-dir=/SOME/LOCAL/PATH/android-ndk-r10e --system=linux-x86_64 ```` ###Build Snapclient Edit the first lines in `/client/build_android.sh` and in `/externals/build_flac_android.sh` to let `NDK_DIR` point to your `` Cross compile and install FLAC (only needed once): $ cd /externals $ ./build_flac_android.sh Compile the Snapclient: $ cd /client $ ./build_android.sh The binaries for `armeabi` and `armeabi-v7a` will be copied into the Android's assets directory (`/android/Snapcast/src/main/assets/bin/`) and will be part of the Snapcast App. ##OpenWrt (Cross compile) Cross compilation for OpenWrt is done with the [OpenWrt build system](https://wiki.openwrt.org/about/toolchain) on a Linux host machine. https://wiki.openwrt.org/doc/howto/build ###OpenWrt build system setup https://wiki.openwrt.org/doc/howto/buildroot.exigence Clone OpenWrt to some place in your home directory (``) $ git clone git://git.openwrt.org/15.05/openwrt.git Download and install available feeds $ cd $ ./scripts/feeds update -a $ ./scripts/feeds install -a Build $ make menuconfig $ make Within the OpenWrt directory create symbolic links to the Snapcast source directory and to the OpenWrt Makefile: $ cd /package/sxx/snapcast $ ln -s /openWrt/Makefile.openwrt Makefile $ ln -s src Build Snapcast: $ cd $ make package/sxx/snapcast/clean V=s $ make package/sxx/snapcast/compile -j1 V=s The packaged `ipk` files are in `/bin/ar71xx/packages/base/snap[client|server]_0.6.0_ar71xx.ipk`