2009-06-12 06:15:52 -04:00
|
|
|
Installation instructions for forked-daapd
|
|
|
|
------------------------------------------
|
|
|
|
|
2013-12-21 12:24:48 -05:00
|
|
|
This document contains instructions for installing forked-daapd from the git
|
|
|
|
tree.
|
2009-06-12 06:15:52 -04:00
|
|
|
|
2014-02-03 17:03:43 -05:00
|
|
|
The source for this version of forked-daapd can be found here:
|
|
|
|
|
|
|
|
<https://github.com/ejurgensen/forked-daapd.git>
|
|
|
|
|
|
|
|
The original (now unmaintained) source can be found here:
|
|
|
|
|
|
|
|
<http://git.debian.org/?p=users/jblache/forked-daapd.git>
|
|
|
|
|
|
|
|
|
2015-10-19 13:50:06 -04:00
|
|
|
Quick version for Raspbian (Raspberry Pi)
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
See the instructions here:
|
|
|
|
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=49928
|
|
|
|
|
|
|
|
|
2014-03-13 19:10:20 -04:00
|
|
|
Quick version for Debian/Ubuntu users
|
|
|
|
-------------------------------------
|
2014-02-03 17:03:43 -05:00
|
|
|
|
|
|
|
If you are the lucky kind, this should get you all the required tools and
|
|
|
|
libraries:
|
|
|
|
|
2016-08-22 15:19:33 -04:00
|
|
|
sudo apt-get install \
|
|
|
|
build-essential git autotools-dev autoconf libtool gettext gawk gperf \
|
|
|
|
antlr3 libantlr3c-dev libconfuse-dev libunistring-dev libsqlite3-dev \
|
|
|
|
libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev \
|
|
|
|
libasound2-dev libmxml-dev libgcrypt11-dev libavahi-client-dev zlib1g-dev \
|
2017-09-16 03:19:56 -04:00
|
|
|
libevent-dev libplist-dev libsodium-dev libjson-c-dev libwebsockets-dev
|
2016-08-22 15:19:33 -04:00
|
|
|
|
2016-08-28 16:53:40 -04:00
|
|
|
Optional packages:
|
2016-08-22 15:19:33 -04:00
|
|
|
|
2017-06-19 16:15:48 -04:00
|
|
|
Feature | Configure argument | Packages
|
|
|
|
--------------------|------------------------|---------------------------------------------
|
2017-09-11 15:04:19 -04:00
|
|
|
Chromecast | --enable-chromecast | libgnutls-dev libprotobuf-c-dev
|
2017-06-19 16:15:48 -04:00
|
|
|
LastFM | --enable-lastfm | libcurl4-gnutls-dev OR libcurl4-openssl-dev
|
|
|
|
iTunes XML | --disable-itunes | libplist-dev
|
|
|
|
Device verification | --disable-verification | libplist-dev libsodium-dev
|
2017-09-16 03:19:56 -04:00
|
|
|
Live web UI | --with-libwebsockets | libwebsockets-dev
|
2017-06-19 16:15:48 -04:00
|
|
|
Pulseaudio | --with-pulseaudio | libpulse-dev
|
2014-08-15 17:36:54 -04:00
|
|
|
|
2014-06-02 15:18:26 -04:00
|
|
|
Note that while forked-daapd will work with versions of libevent between 2.0.0
|
2015-04-24 16:11:08 -04:00
|
|
|
and 2.1.3, it is recommended to use 2.1.4+. Otherwise you may not have support
|
|
|
|
for Shoutcast metadata and simultaneous streaming to multiple clients.
|
2014-02-03 17:03:43 -05:00
|
|
|
|
2016-08-28 16:53:40 -04:00
|
|
|
Then run the following (adding configure arguments for optional features):
|
2014-02-03 17:03:43 -05:00
|
|
|
|
|
|
|
git clone https://github.com/ejurgensen/forked-daapd.git
|
|
|
|
cd forked-daapd
|
|
|
|
autoreconf -i
|
2014-03-13 19:10:20 -04:00
|
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
2014-02-03 17:03:43 -05:00
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
2017-07-10 14:05:00 -04:00
|
|
|
Finally, read the section 'Long version - after installation' in the bottom of
|
|
|
|
this document, which describes configuration, setting up init scripts and adding
|
|
|
|
a system user. Also see the README for usage information.
|
2014-02-03 17:03:43 -05:00
|
|
|
|
|
|
|
|
2015-02-15 06:36:44 -05:00
|
|
|
Quick version for Fedora
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
If you haven't already enabled the free RPM fusion packages do that, since you
|
|
|
|
will need ffmpeg. You can google how to do that. Then run:
|
|
|
|
|
|
|
|
sudo yum install \
|
|
|
|
git automake autoconf gettext-devel gperf gawk libtool \
|
|
|
|
sqlite-devel libconfuse-devel libunistring-devel mxml-devel libevent-devel \
|
2017-06-19 16:15:48 -04:00
|
|
|
avahi-devel libgcrypt-devel zlib-devel alsa-lib-devel ffmpeg-devel \
|
|
|
|
libplist-devel libsodium-devel
|
2015-02-15 06:36:44 -05:00
|
|
|
|
2015-12-29 17:10:58 -05:00
|
|
|
Clone the forked-daapd repo:
|
|
|
|
|
|
|
|
git clone https://github.com/ejurgensen/forked-daapd.git
|
|
|
|
cd forked-daapd
|
|
|
|
|
2015-02-15 06:36:44 -05:00
|
|
|
Now you need to install ANTLR3, but you probably can't use the version that
|
2015-10-19 13:50:06 -04:00
|
|
|
comes with the package manager (but do try that first). Instead you can install
|
|
|
|
it by running this script:
|
2015-02-15 06:36:44 -05:00
|
|
|
|
2015-12-29 17:10:58 -05:00
|
|
|
scripts/antlr35_install.sh
|
2015-02-15 06:36:44 -05:00
|
|
|
|
|
|
|
Then run the following:
|
|
|
|
|
|
|
|
autoreconf -i
|
|
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
2017-07-10 14:05:00 -04:00
|
|
|
Finally, read the section 'Long version - after installation' in the bottom of
|
|
|
|
this document, which describes configuration, setting up init scripts and adding
|
|
|
|
a system user. Also see the README for usage information.
|
2015-02-15 06:36:44 -05:00
|
|
|
|
|
|
|
|
|
|
|
Quick version for FreeBSD
|
|
|
|
-------------------------
|
2015-02-11 16:58:54 -05:00
|
|
|
|
|
|
|
The build process for FreeBSD is rather complicated, but the good news is that
|
|
|
|
there is a script in the 'scripts' folder that will at least attempt to do all
|
|
|
|
the work for you. And should the script not work for you, you can still look
|
|
|
|
through it and use it as an installation guide.
|
|
|
|
|
|
|
|
|
2017-01-23 16:13:50 -05:00
|
|
|
"Quick" version for macOS (using macports)
|
|
|
|
------------------------------------------
|
|
|
|
|
|
|
|
Caution: macports requires many downloads and lots of time to install
|
|
|
|
(and sometimes build) ports... you'll want a decent network connection
|
|
|
|
and some patience!
|
|
|
|
|
|
|
|
Install macports (which requires Xcode):
|
|
|
|
https://www.macports.org/install.php
|
|
|
|
|
|
|
|
Install Apple's Java (this enables java command on OSX 10.7+):
|
|
|
|
https://support.apple.com/kb/DL1572?locale=en_US
|
|
|
|
|
|
|
|
Afterwards, you can optionally install Oracle's newer version, and then
|
|
|
|
choose it using the Java pref in the System Preferences:
|
|
|
|
http://www.oracle.com/technetwork/java/javase/downloads/index.html
|
|
|
|
|
|
|
|
sudo port install \
|
|
|
|
autoconf automake libtool pkgconfig git gperf libgcrypt \
|
|
|
|
libunistring libconfuse ffmpeg libevent
|
|
|
|
|
|
|
|
Download, configure, build and install the Mini-XML library:
|
|
|
|
http://www.msweet.org/projects.php/Mini-XML
|
|
|
|
|
|
|
|
Download, configure, build and install the libinotify library:
|
|
|
|
https://github.com/libinotify-kqueue/libinotify-kqueue
|
|
|
|
|
|
|
|
Add the following to .bashrc:
|
|
|
|
# add /usr/local to pkg-config path
|
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig
|
|
|
|
# libunistring doesn't support pkg-config, set overrides
|
|
|
|
export LIBUNISTRING_CFLAGS=-I/opt/local/include
|
|
|
|
export LIBUNISTRING_LIBS="-L/opt/local/lib -lunistring"
|
|
|
|
|
|
|
|
Optional features require the following additional ports:
|
|
|
|
|
2017-06-19 16:15:48 -04:00
|
|
|
Feature | Configure argument | Ports
|
|
|
|
--------------------|------------------------|--------------------------------------------
|
|
|
|
Chromecast | --enable-chromecast | json-c gnutls protobuf-c
|
|
|
|
LastFM | --enable-lastfm | curl
|
|
|
|
iTunes XML | --disable-itunes | libplist
|
|
|
|
Device verification | --disable-verification | libplist libsodium
|
|
|
|
Pulseaudio | --with-pulseaudio | pulseaudio
|
2017-01-23 16:13:50 -05:00
|
|
|
|
|
|
|
Clone the forked-daapd repo:
|
|
|
|
git clone https://github.com/ejurgensen/forked-daapd.git
|
|
|
|
cd forked-daapd
|
|
|
|
|
|
|
|
Install antlr3 and library using the included script:
|
|
|
|
scripts/antlr35_install.sh -p /usr/local
|
|
|
|
|
|
|
|
Finally, configure, build and install, adding configure arguments for
|
|
|
|
optional features:
|
|
|
|
|
|
|
|
autoreconf -i
|
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
Note: if for some reason you've installed the avahi port, you need to
|
|
|
|
add '--without-avahi' to configure above.
|
|
|
|
|
|
|
|
Edit /usr/local/etc/forked-daapd.conf and change the 'uid' to a nice
|
|
|
|
system daemon (eg: unknown), and run the following:
|
|
|
|
sudo mkdir -p /usr/local/var/run
|
|
|
|
sudo mkdir -p /usr/local/var/log # or change logfile in conf
|
|
|
|
sudo chown unknown /usr/local/var/cache/forked-daapd # or change conf
|
|
|
|
|
|
|
|
Run forked-daapd:
|
|
|
|
sudo /usr/local/sbin/forked-daapd
|
|
|
|
|
|
|
|
Verify it's running (you need to Ctrl-C to stop dns-sd):
|
|
|
|
dns-sd -B _daap._tcp
|
2015-02-15 06:36:44 -05:00
|
|
|
|
2014-02-03 17:03:43 -05:00
|
|
|
Long version - requirements
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
Required tools:
|
|
|
|
- ANTLR v3 is required to build forked-daapd, along with its C runtime
|
2015-10-19 13:50:06 -04:00
|
|
|
(libantlr3c). Use a version between 3.1.3 and 3.5 of ANTLR v3 and the
|
2014-02-03 17:03:43 -05:00
|
|
|
matching C runtime version. Get it from <http://www.antlr3.org/>
|
|
|
|
|
|
|
|
- Java runtime: ANTLR is written in Java and as such a JRE is required to
|
|
|
|
run the tool. The JRE is enough, you don't need a full JDK.
|
|
|
|
|
|
|
|
- autotools: autoconf 2.63+, automake 1.10+, libtool 2.2. Run autoreconf -i
|
|
|
|
at the top of the source tree to generate the build system.
|
|
|
|
|
|
|
|
- gettext: libunistring requires iconv and gettext provides the autotools
|
|
|
|
macro definitions for iconv.
|
|
|
|
|
2013-12-21 12:24:48 -05:00
|
|
|
- gperf
|
2014-02-03 17:03:43 -05:00
|
|
|
|
2010-09-04 07:22:00 -04:00
|
|
|
|
|
|
|
Libraries:
|
2014-02-03 17:03:43 -05:00
|
|
|
- libantlr3c (ANTLR3 C runtime, use the same version as antlr3)
|
|
|
|
from <https://github.com/antlr/website-antlr3/tree/gh-pages/download/C>
|
2010-09-06 13:26:47 -04:00
|
|
|
- Avahi client libraries (avahi-client), 0.6.24 minimum
|
|
|
|
from <http://avahi.org/>
|
|
|
|
- sqlite3 3.5.0+ with unlock notify API enabled (read below)
|
|
|
|
from <http://sqlite.org/download.html>
|
2015-10-19 13:50:06 -04:00
|
|
|
- libav 9+ or ffmpeg 0.11+
|
|
|
|
from <http://libav.org/> or <http://ffmpeg.org/>
|
2010-09-06 13:26:47 -04:00
|
|
|
- libconfuse
|
|
|
|
from <http://www.nongnu.org/confuse/>
|
2015-04-24 16:11:08 -04:00
|
|
|
- libevent 2.0+ (best with 2.1.4+)
|
2014-03-13 18:33:35 -04:00
|
|
|
from <http://libevent.org/>
|
2010-09-06 13:26:47 -04:00
|
|
|
- MiniXML (aka mxml or libmxml)
|
|
|
|
from <http://minixml.org/software.php>
|
2010-02-05 12:38:39 -05:00
|
|
|
- gcrypt 1.2.0+
|
2010-09-06 13:26:47 -04:00
|
|
|
from <http://gnupg.org/download/index.en.html#libgcrypt>
|
2010-05-04 06:03:58 -04:00
|
|
|
- zlib
|
2010-09-06 13:26:47 -04:00
|
|
|
from <http://zlib.net/>
|
2010-08-29 09:58:22 -04:00
|
|
|
- libunistring 0.9.3+
|
2010-09-06 13:26:47 -04:00
|
|
|
from <http://www.gnu.org/software/libunistring/#downloading>
|
2017-09-11 15:04:19 -04:00
|
|
|
- libjson-c
|
|
|
|
from <https://github.com/json-c/json-c/wiki>
|
2016-08-28 16:53:40 -04:00
|
|
|
- libasound (optional - ALSA local audio)
|
2016-04-13 14:12:37 -04:00
|
|
|
often already installed as part of your distro
|
2016-08-28 16:53:40 -04:00
|
|
|
- libpulse (optional - Pulseaudio local audio)
|
|
|
|
from <https://www.freedesktop.org/wiki/Software/PulseAudio/Download/>
|
2017-06-19 16:15:48 -04:00
|
|
|
- libplist 0.16+ (optional - iTunes XML support and Apple TV device verification)
|
2010-09-06 13:26:47 -04:00
|
|
|
from <http://github.com/JonathanBeck/libplist/downloads>
|
2017-06-19 16:15:48 -04:00
|
|
|
- libsodium (optional - Apple TV device verification)
|
|
|
|
from <https://download.libsodium.org/doc/>
|
2014-03-11 18:20:29 -04:00
|
|
|
- libspotify (optional - Spotify support)
|
|
|
|
from <https://developer.spotify.com>
|
2014-08-15 17:36:54 -04:00
|
|
|
- libcurl (optional - LastFM support)
|
|
|
|
from <http://curl.haxx.se/libcurl/>
|
2016-02-11 16:30:48 -05:00
|
|
|
- libgnutls (optional - Chromecast support)
|
|
|
|
from <http://www.gnutls.org/>
|
|
|
|
- libprotobuf-c (optional - Chromecast support)
|
|
|
|
from <https://github.com/protobuf-c/protobuf-c/wiki>
|
2017-09-11 15:04:19 -04:00
|
|
|
- libwebsockets (optional - websocket support)
|
|
|
|
from <https://libwebsockets.org/>
|
2010-09-06 13:26:47 -04:00
|
|
|
|
|
|
|
If using binary packages, remember that you need the development packages to
|
|
|
|
build forked-daapd (usually named -dev or -devel).
|
2009-06-12 06:15:52 -04:00
|
|
|
|
2010-09-06 12:51:19 -04:00
|
|
|
sqlite3 needs to be built with support for the unlock notify API; this isn't
|
2010-09-06 12:54:26 -04:00
|
|
|
always the case in binary packages, so you may need to rebuild sqlite3 to
|
|
|
|
enable the unlock notify API (you can check for the presence of the
|
|
|
|
sqlite3_unlock_notify symbol in the sqlite3 library). Refer to the sqlite3
|
|
|
|
documentation, look for SQLITE_ENABLE_UNLOCK_NOTIFY.
|
2010-04-30 13:20:28 -04:00
|
|
|
|
2013-12-30 18:01:00 -05:00
|
|
|
libav (or ffmpeg) is a central piece of forked-daapd and most other FLOSS
|
2011-06-02 15:07:53 -04:00
|
|
|
multimedia applications. The version of libav you use will potentially have a
|
|
|
|
great influence on your experience with forked-daapd.
|
2010-09-06 12:44:43 -04:00
|
|
|
|
|
|
|
|
2014-02-03 17:03:43 -05:00
|
|
|
Long version - building and installing
|
|
|
|
--------------------------------------
|
2010-09-04 07:22:00 -04:00
|
|
|
|
|
|
|
Start by generating the build system by running autoreconf -i. This will
|
|
|
|
generate the configure script and Makefile.in.
|
|
|
|
|
|
|
|
The configure script will look for a wrapper called antlr3 in the PATH to
|
|
|
|
invoke ANTLR3. If your installation of ANTLR3 does not come with such a
|
|
|
|
wrapper, create one as follows:
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
CLASSPATH=...
|
|
|
|
exec /path/to/java -cp $CLASSPATH org.antlr.Tool "@"
|
|
|
|
|
|
|
|
Adjust the CLASSPATH as needed so that Java will find all the jars needed
|
|
|
|
by ANTLR3.
|
|
|
|
|
|
|
|
The parsers will be generated during the build, no manual intervention is
|
|
|
|
needed.
|
|
|
|
|
2013-12-21 12:24:48 -05:00
|
|
|
To display the configure options run ./configure --help
|
2010-09-04 07:22:00 -04:00
|
|
|
|
2014-03-11 18:20:29 -04:00
|
|
|
Support for Spotify is optional. Use --enable-spotify to enable this feature.
|
|
|
|
If you enable this feature libspotify/api.h is required at compile time.
|
|
|
|
Forked-daapd uses runtime dynamic linking to the libspotify library, so even
|
|
|
|
though you compiled with --enable-spotify, the executable will still be able
|
|
|
|
to run on systems without libspotify (the Spotify features will then be
|
|
|
|
disabled).
|
2009-06-12 06:15:52 -04:00
|
|
|
|
2014-08-15 17:36:54 -04:00
|
|
|
Support for LastFM scrobbling is optional. Use --enable-lastfm to enable this
|
|
|
|
feature.
|
|
|
|
|
2017-06-19 16:15:48 -04:00
|
|
|
Support for iTunes Music Library XML format is optional. Use --disable-itunes
|
|
|
|
to disable this feature.
|
2009-11-28 05:01:22 -05:00
|
|
|
|
2016-02-11 16:30:48 -05:00
|
|
|
Support for the MPD protocol is optional. Use --disable-mpd to disable this
|
2014-12-31 04:06:59 -05:00
|
|
|
feature.
|
|
|
|
|
2017-06-19 16:15:48 -04:00
|
|
|
Support for Apple TV device verification is optional. Use --disable-verification
|
|
|
|
to disable this feature.
|
|
|
|
|
2016-02-11 16:30:48 -05:00
|
|
|
Support for Chromecast devices is optional. Use --enable-chromecast to enable
|
|
|
|
this feature.
|
|
|
|
|
2017-09-16 03:19:56 -04:00
|
|
|
Building with libwebsockets is optional. Websockets improve the UI of the web
|
|
|
|
interface. It will be enabled if the library is present (with headers). Use
|
|
|
|
--without-libwebsockets to disable.
|
|
|
|
|
|
|
|
Building with Pulseaudio is optional. It will be enabled if the library is
|
|
|
|
present (with headers). Use --without-pulseaudio to disable.
|
2016-08-28 16:53:40 -04:00
|
|
|
|
2009-06-12 06:15:52 -04:00
|
|
|
Recommended build settings:
|
2014-03-11 18:20:29 -04:00
|
|
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
2013-12-21 12:24:48 -05:00
|
|
|
|
2017-07-10 14:05:00 -04:00
|
|
|
After configure run the usual make, and if that went well, 'sudo make install'
|
2009-06-12 06:15:52 -04:00
|
|
|
|
2014-02-03 17:03:43 -05:00
|
|
|
|
|
|
|
Long version - after installation
|
|
|
|
---------------------------------
|
|
|
|
|
2017-07-10 14:05:00 -04:00
|
|
|
After installation, edit the configuration file, /etc/forked-daapd.conf.
|
|
|
|
|
|
|
|
Note that 'sudo make install' will not install any system files to start the
|
|
|
|
service after boot, and it will not setup a system user.
|
2009-06-12 06:15:52 -04:00
|
|
|
|
|
|
|
forked-daapd will drop privileges to any user you'll specify in the
|
2013-12-21 12:24:48 -05:00
|
|
|
configuration file if it's started as root.
|
2010-09-04 07:22:00 -04:00
|
|
|
|
|
|
|
This user must have read permission on your library (you can create a group for
|
|
|
|
this and make the user a member of the group, for instance) and read/write
|
|
|
|
permissions on the database location ($localstatedir/cache/forked-daapd by
|
|
|
|
default).
|
2009-06-12 06:15:52 -04:00
|
|
|
|
2016-01-10 12:44:26 -05:00
|
|
|
If your system uses systemd then you might be able to use the service file
|
|
|
|
included, see forked-daapd.service.
|
|
|
|
|
|
|
|
Otherwise you might need an init script to start forked-daapd at boot. A simple
|
2009-06-12 06:15:52 -04:00
|
|
|
init script will do, forked-daapd daemonizes all by itself and creates a
|
2010-09-04 07:22:00 -04:00
|
|
|
pidfile under /var/run. Different distributions have different standards for
|
|
|
|
init scripts and some do not use init scripts anymore; check the documentation
|
|
|
|
for your distribution.
|
|
|
|
|
|
|
|
For dependency-based boot systems, here are the forked-daapd dependencies:
|
|
|
|
- local filesystems
|
|
|
|
- network filesystems, if needed in your setup (library on NFS, ...)
|
|
|
|
- networking
|
|
|
|
- NTP
|
|
|
|
- Avahi daemon
|
|
|
|
|
|
|
|
The LSB header below sums it up:
|
|
|
|
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: forked-daapd
|
2013-12-21 12:24:48 -05:00
|
|
|
# Required-Start: $local_fs $remote_fs $network $time
|
2010-09-04 07:22:00 -04:00
|
|
|
# Required-Stop: $local_fs $remote_fs $network $time
|
2013-12-21 12:24:48 -05:00
|
|
|
# Should-Start: avahi
|
2014-03-11 18:20:29 -04:00
|
|
|
# Should-Stop: avahi
|
2010-09-04 07:22:00 -04:00
|
|
|
# Default-Start: 2 3 4 5
|
|
|
|
# Default-Stop: 0 1 6
|
2014-03-11 18:20:29 -04:00
|
|
|
# Short-Description: DAAP/DACP (iTunes) server, support for AirPlay and Spotify
|
2010-09-04 07:22:00 -04:00
|
|
|
# Description: forked-daapd is an iTunes-compatible media server for
|
2014-03-11 18:20:29 -04:00
|
|
|
# sharing your media library over the local network with DAAP
|
|
|
|
# clients like iTunes. Like iTunes, it can be controlled by
|
|
|
|
# Apple Remote (and compatibles) and stream music directly to
|
|
|
|
# AirPlay devices. It also supports streaming to RSP clients
|
|
|
|
# (Roku devices) and streaming from Spotify.
|
2010-09-04 07:22:00 -04:00
|
|
|
### END INIT INFO
|