From dab14727c81d3bb069a5c0fc3eb427b4997333fe Mon Sep 17 00:00:00 2001 From: slackline Date: Mon, 8 Oct 2018 23:15:30 +0100 Subject: [PATCH 1/3] Added build/installation instructions for Gentoo Linux (native) --- doc/build.md | 69 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 11 deletions(-) diff --git a/doc/build.md b/doc/build.md index 1775c401..d862da03 100644 --- a/doc/build.md +++ b/doc/build.md @@ -1,5 +1,5 @@ # Build Snapcast -Clone the Snapcast repository. To do this, you need git. +Clone the Snapcast repository. To do this, you need git. For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install git @@ -16,7 +16,7 @@ Clone Snapcast: $ git clone https://github.com/badaix/snapcast.git -this creates a directory `snapcast`, in the following referred to as ``. +this creates a directory `snapcast`, in the following referred to as ``. Next clone the external submodules: $ cd /externals @@ -24,7 +24,7 @@ Next clone the external submodules: ## Linux (Native) -Install the build tools and required libs: +Install the build tools and required libs: For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install build-essential @@ -76,7 +76,7 @@ This will copy the server binary to `/usr/bin` and update init.d/systemd to star ## FreeBSD (Native) -Install the build tools and required libs: +Install the build tools and required libs: $ sudo pkg install gmake gcc bash avahi libogg libvorbis flac @@ -90,7 +90,7 @@ Install Snapserver $ sudo gmake TARGET=FREEBSD install -This will copy the server binary to `/usr/local/bin` and the startup script to `/usr/local/etc/rc.d/snapserver`. To enable the Snapserver, add this line to `/etc/rc.conf`: +This will copy the server binary to `/usr/local/bin` and the startup script to `/usr/local/etc/rc.d/snapserver`. To enable the Snapserver, add this line to `/etc/rc.conf`: snapserver_enable="YES" @@ -100,6 +100,53 @@ For additional command line arguments, add in `/etc/rc.conf`: Start and stop the server with `sudo service snapserver start` and `sudo service snapserver stop`. + +## Gentoo (native) + +Snapcast is available under Gentoo's [Portage](https://wiki.gentoo.org/wiki/Portage) package management system. Portage utilises `USE` flags to determine what components are built on compilation. The availabe options are... + + equery u snapcast + [ Legend : U - final flag setting for installation] + [ : I - package is installed with flag ] + [ Colors : set, unset ] + * Found these USE flags for media-sound/snapcast-9999: + U I + + - avahi : Build with avahi support + + + client : Build and install Snapcast client component + + - flac : Build with FLAC compression support + + + server : Build and install Snapcast server component + - - static-libs : Build static libs + - - tremor : Build with TREMOR version of vorbis + + - vorbis : Build with libvorbis support + + +These can be set either in the [global configuration](https://wiki.gentoo.org/wiki//etc/portage/make.conf#USE) file `/etc/portage/make.conf` or on a per-package basis (as root): + + if [ ! -d "$DIRECTORY" ]; then + mkdir /etc/portage/package.use/media-sound + fi + echo 'media-sound/snapcast client server flac + +If for example you only wish to build the server and *not* the client then preceed the server `USE` flag with `-` i.e. + + echo 'media-sound/snapcast client -server + +Once `USE` flags are configured emerge snapcast as root: + + $ emerge -av snapcast + + +Starting the client or server depends on whether you are using `systemd` or `openrc`. To start using `openrc`: + + /etc/init.d/snapclient start + /etc/init.d/snapserver start + +To enable the serve and client to start under the default run-level: + + rc-update add snapserver default + rc-update add snapclient default + + ## macOS (Native) *Warning: macOS support is experimental* @@ -108,7 +155,7 @@ Start and stop the server with `sudo service snapserver start` and `sudo service 2. Install [Homebrew](http://brew.sh) 3. Install the required libs -``` +``` $ brew install flac libvorbis ``` @@ -137,7 +184,7 @@ Install Snapserver This will copy the server binary to `/usr/local/bin` and create a Launch Agent 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. +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 @@ -157,7 +204,7 @@ Cross compile and install FLAC, ogg, and tremor (only needed once): $ cd /externals $ make NDK_DIR=-arm ARCH=arm $ make NDK_DIR=-x86 ARCH=x86 - + Compile the Snapclient: $ cd /client @@ -167,7 +214,7 @@ The binaries for `armeabi` and `x86` will be copied into the Android's assets di ## OpenWrt/LEDE (Cross compile) -Cross compilation for OpenWrt is done with the [OpenWrt build system](https://wiki.openwrt.org/about/toolchain) on a Linux host machine: +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 For LEDE: @@ -179,7 +226,7 @@ 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 - + ...LEDE $ git clone https://git.lede-project.org/source.git @@ -197,7 +244,7 @@ Within the `` directory create symbolic links to the Snapcast sou $ ln -s src $ ln -s /openWrt/Makefile.openwrt Makefile -Build +Build in menuconfig in `sxx/snapcast` select `Compile snapserver` and/or `Compile snapclient` $ cd From 5d6c3bedc1ddb0701b2879d7427493d5757424f0 Mon Sep 17 00:00:00 2001 From: slackline Date: Mon, 8 Oct 2018 23:21:07 +0100 Subject: [PATCH 2/3] Correcting code indents --- doc/build.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/build.md b/doc/build.md index d862da03..0aa560d3 100644 --- a/doc/build.md +++ b/doc/build.md @@ -123,9 +123,9 @@ Snapcast is available under Gentoo's [Portage](https://wiki.gentoo.org/wiki/Port These can be set either in the [global configuration](https://wiki.gentoo.org/wiki//etc/portage/make.conf#USE) file `/etc/portage/make.conf` or on a per-package basis (as root): if [ ! -d "$DIRECTORY" ]; then - mkdir /etc/portage/package.use/media-sound - fi - echo 'media-sound/snapcast client server flac + mkdir /etc/portage/package.use/media-sound + fi + echo 'media-sound/snapcast client server flac If for example you only wish to build the server and *not* the client then preceed the server `USE` flag with `-` i.e. @@ -139,12 +139,12 @@ Once `USE` flags are configured emerge snapcast as root: Starting the client or server depends on whether you are using `systemd` or `openrc`. To start using `openrc`: /etc/init.d/snapclient start - /etc/init.d/snapserver start + /etc/init.d/snapserver start To enable the serve and client to start under the default run-level: rc-update add snapserver default - rc-update add snapclient default + rc-update add snapclient default ## macOS (Native) From 2cb9480bdd309f6285886c34571c79117974886a Mon Sep 17 00:00:00 2001 From: slackline Date: Tue, 23 Oct 2018 10:58:41 +0100 Subject: [PATCH 3/3] Restoring line breaks --- doc/build.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/build.md b/doc/build.md index 0aa560d3..2e10f590 100644 --- a/doc/build.md +++ b/doc/build.md @@ -1,5 +1,5 @@ # Build Snapcast -Clone the Snapcast repository. To do this, you need git. +Clone the Snapcast repository. To do this, you need git. For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install git @@ -16,7 +16,7 @@ Clone Snapcast: $ git clone https://github.com/badaix/snapcast.git -this creates a directory `snapcast`, in the following referred to as ``. +this creates a directory `snapcast`, in the following referred to as ``. Next clone the external submodules: $ cd /externals @@ -24,7 +24,7 @@ Next clone the external submodules: ## Linux (Native) -Install the build tools and required libs: +Install the build tools and required libs: For Debian derivates (e.g. Raspbian, Debian, Ubuntu, Mint): $ sudo apt-get install build-essential @@ -76,7 +76,7 @@ This will copy the server binary to `/usr/bin` and update init.d/systemd to star ## FreeBSD (Native) -Install the build tools and required libs: +Install the build tools and required libs: $ sudo pkg install gmake gcc bash avahi libogg libvorbis flac @@ -90,7 +90,7 @@ Install Snapserver $ sudo gmake TARGET=FREEBSD install -This will copy the server binary to `/usr/local/bin` and the startup script to `/usr/local/etc/rc.d/snapserver`. To enable the Snapserver, add this line to `/etc/rc.conf`: +This will copy the server binary to `/usr/local/bin` and the startup script to `/usr/local/etc/rc.d/snapserver`. To enable the Snapserver, add this line to `/etc/rc.conf`: snapserver_enable="YES" @@ -155,7 +155,7 @@ To enable the serve and client to start under the default run-level: 2. Install [Homebrew](http://brew.sh) 3. Install the required libs -``` +``` $ brew install flac libvorbis ``` @@ -184,7 +184,7 @@ Install Snapserver This will copy the server binary to `/usr/local/bin` and create a Launch Agent 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. +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 @@ -204,7 +204,7 @@ Cross compile and install FLAC, ogg, and tremor (only needed once): $ cd /externals $ make NDK_DIR=-arm ARCH=arm $ make NDK_DIR=-x86 ARCH=x86 - + Compile the Snapclient: $ cd /client @@ -214,7 +214,7 @@ The binaries for `armeabi` and `x86` will be copied into the Android's assets di ## OpenWrt/LEDE (Cross compile) -Cross compilation for OpenWrt is done with the [OpenWrt build system](https://wiki.openwrt.org/about/toolchain) on a Linux host machine: +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 For LEDE: @@ -226,7 +226,7 @@ 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 - + ...LEDE $ git clone https://git.lede-project.org/source.git @@ -244,7 +244,7 @@ Within the `` directory create symbolic links to the Snapcast sou $ ln -s src $ ln -s /openWrt/Makefile.openwrt Makefile -Build +Build in menuconfig in `sxx/snapcast` select `Compile snapserver` and/or `Compile snapclient` $ cd