forked-daapd: bump version

This commit is contained in:
lean 2020-04-01 02:20:31 +08:00
parent 48f91a5ab0
commit 773bebb397
3 changed files with 259 additions and 146 deletions

View File

@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=forked-daapd
PKG_VERSION:=25.0
PKG_RELEASE:=1
PKG_VERSION:=27.1
PKG_RELEASE:=6
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/ejurgensen/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
PKG_HASH:=5741a64d8f54e11e89dfa2fbfae693b2837e1e19a0c4980a20f8ff56bce4456e
PKG_SOURCE_URL:=https://github.com/ejurgensen/forked-daapd.git
PKG_SOURCE_VERSION:=9bb95768494a698df5d5b315c47d48c944d7cab0
PKG_BUILD_DEPENDS:=gperf/host
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_INSTALL:=1
@ -33,9 +33,9 @@ CATEGORY:=Sound
TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay
URL:=https://github.com/ejurgensen/forked-daapd
DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \
+libevent2 +libdaemon +libantlr3c +confuse +alsa-lib +libffmpeg-full \
+libevent2 +libdaemon +libantlr3c +confuse +libopus +alsa-lib +libffmpeg-full \
+mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \
+libprotobuf-c +libgnutls +libsodium $(ICONV_DEPENDS)
+libprotobuf-c +libgnutls +libsodium +libwebsockets $(ICONV_DEPENDS)
endef
define Package/forked-daapd/description
@ -55,7 +55,11 @@ CONFIGURE_ARGS += \
--enable-mpd \
--enable-chromecast \
--enable-verification \
--enable-webinterface \
--disable-spotify \
--with-libplist \
--with-libwebsockets \
--with-alsa \
--without-pulseaudio \
--without-libevent_pthreads
@ -69,8 +73,10 @@ define Package/forked-daapd/install
$(INSTALL_CONF) ./files/forked-daapd.conf $(1)/etc/forked-daapd.conf
$(INSTALL_DIR) $(1)/usr/lib/forked-daapd
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/forked-daapd/* $(1)/usr/lib/forked-daapd/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/forked-daapd.init $(1)/etc/init.d/forked-daapd
#$(INSTALL_DIR) $(1)/etc/init.d
#$(INSTALL_BIN) ./files/forked-daapd.init $(1)/etc/init.d/forked-daapd
$(INSTALL_DIR) $(1)/usr/share/forked-daapd/htdocs
$(CP) $(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)/htdocs/* $(1)/usr/share/forked-daapd/htdocs/
endef
$(eval $(call BuildPackage,forked-daapd))

View File

@ -10,36 +10,56 @@
general {
# Username
# Make sure the user has read access to the library directories you set
# below, and full access to the databases, log and local audio
uid = "daapd"
# below, and full access to the databases, log and local audio
uid = "root"
# Database location
db_path = "/var/cache/forked-daapd/songs3.db"
db_path = "/opt/forked-daapd/songs3.db"
# Log file and level
# Available levels: fatal, log, warning, info, debug, spam
logfile = "/var/log/forked-daapd.log"
loglevel = log
# Admin password for the non-existent web interface
admin_password = "unused"
# Admin password for the web interface
# Note that access to the web interface from computers in
# "trusted_network" (see below) does not require password
# admin_password = ""
# Websocket port for the web interface.
# websocket_port = 3688
# Sets who is allowed to connect without authorisation. This applies to
# client types like Remotes, DAAP clients (iTunes) and to the web
# interface. Options are "any", "localhost" or the prefix to one or
# more ipv4/6 networks. The default is { "localhost", "192.168", "fd" }
# trusted_networks = { "localhost", "192.168", "fd" }
# Enable/disable IPv6
ipv6 = no
# Location of cache database
cache_path = "/var/cache/forked-daapd/cache.db"
cache_path = "/var/forked-daapd-cache.db"
# DAAP requests that take longer than this threshold (in msec) get their
# replies cached for next time. Set to 0 to disable caching.
# cache_daap_threshold = 1000
# When starting playback, autoselect speaker (if none of the previously
# selected speakers/outputs are available)
# speaker_autoselect = yes
# Most modern systems have a high-resolution clock, but if you are on an
# unusual platform and experience audio drop-outs, you can try changing
# this option
# high_resolution_clock = yes
}
# Library configuration
library {
# Name of the library as displayed by the clients
# %h: hostname, %v: version
name = "My Music on %h"
# Name of the library as displayed by the clients (%h: hostname). If you
# change the name after pairing with Remote you may have to re-pair.
name = "My Music on OpenWrt"
# TCP port to listen on. Default port is 3689 (daap)
port = 3689
@ -48,11 +68,14 @@ library {
# password = ""
# Directories to index
directories = { "/srv/music" }
directories = { "/opt/music" }
# Follow symlinks. Default: true.
# follow_symlinks = true
# Directories containing podcasts
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# names. If there is a match all items in the directory are marked as
# podcasts. Eg. if you index /srv/music, and your podcasts are in
# /srv/music/Podcasts, you can set this to "/Podcasts".
# (changing this setting only takes effect after rescan, see the README)
@ -60,23 +83,31 @@ library {
# Directories containing audiobooks
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# names. If there is a match all items in the directory are marked as
# audiobooks.
# (changing this setting only takes effect after rescan, see the README)
audiobooks = { "/Audiobooks" }
# Directories containing compilations (eg soundtracks)
# For each directory that is indexed the path is matched against these
# names. If there is a match all items in the directory are marked as
# names. If there is a match all items in the directory are marked as
# compilations.
# (changing this setting only takes effect after rescan, see the README)
compilations = { "/Compilations" }
# Compilations usually have many artists, and if you don't want every
# artist to be listed when artist browsing in Remote, you can set
# a single name which will be used for all music in the compilation dir
# Compilations usually have many artists, and sometimes no album artist.
# If you don't want every artist to be listed in artist views, you can
# set a single name which will be used for all compilation tracks
# without an album artist, and for all tracks in the compilation
# directories.
# (changing this setting only takes effect after rescan, see the README)
compilation_artist = "Various artists"
compilation_artist = "Various Artists"
# If your album and artist lists are cluttered, you can choose to hide
# albums and artists with only one track. The tracks will still be
# visible in other lists, e.g. songs and playlists. This setting
# currently only works in some remotes.
# hide_singles = false
# Internet streams in your playlists will by default be shown in the
# "Radio" library, like iTunes does. However, some clients (like
@ -84,8 +115,8 @@ library {
# to have them shown like normal playlists, you can enable this option.
# radio_playlists = false
# There are 5 default playlists: "Library", "Music", "Movies", "TV Shows"
# and "Podcasts". Here you can change the names of these playlists.
# These are the default playlists. If you want them to have other names,
# you can set it here.
# name_library = "Library"
# name_music = "Music"
# name_movies = "Movies"
@ -106,8 +137,9 @@ library {
# File types the scanner should ignore
# Non-audio files will never be added to the database, but here you
# can prevent the scanner from even probing them. This might improve
# scan time. By default .db, .ini, .db-journal and .pdf are ignored.
# filetypes_ignore = { ".db", ".ini", ".db-journal", ".pdf" }
# scan time. By default .db, .ini, .db-journal, .pdf and .metadata are
# ignored.
# filetypes_ignore = { ".db", ".ini", ".db-journal", ".pdf", ".metadata" }
# File paths the scanner should ignore
# If you want to exclude files on a more advanced basis you can enter
@ -128,11 +160,47 @@ library {
# Should iTunes metadata override ours?
# itunes_overrides = false
# Should we import the content of iTunes smart playlists?
# itunes_smartpl = false
# Decoding options for DAAP clients
# Since iTunes has native support for mpeg, mp4a, mp4v, alac and wav,
# such files will be sent as they are. Any other formats will be decoded
# to raw wav. If forked-daapd detects a non-iTunes DAAP client, it is
# assumed to only support mpeg and wav, other formats will be decoded.
# Here you can change when to decode. Note that these settings have no
# effect on AirPlay.
# Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav
# Formats that should never be transcoded
# no_transcode = { "alac", "mp4a" }
# Formats that should always be transcoded
# force_transcode = { "ogg", "flac" }
# Formats that should never be decoded
# no_decode = { "format", "format" }
# Formats that should always be decoded
# force_decode = { "format", "format" }
# Watch named pipes in the library for data and autostart playback when
# there is data to be read. To exclude specific pipes from watching,
# consider using the above _ignore options.
# pipe_autostart = true
# Enable automatic rating updates
# If enabled, rating is automatically updated after a song has either been
# played or skipped (only skipping to the next song is taken into account).
# The calculation is taken from the beets plugin "mpdstats" (see
# https://beets.readthedocs.io/en/latest/plugins/mpdstats.html).
# It consist of calculating a stable rating based only on the play- and
# skipcount and a rolling rating based on the current rating and the action
# (played or skipped). Both results are combined with a mix-factor of 0.75:
# new rating = 0.75 * stable rating + 0.25 * rolling rating)
# rating_updates = false
# Allows creating, deleting and modifying m3u playlists in the library directories.
# Only supported by the player web interface and some mpd clients
# Defaults to being disabled.
# allow_modifying_stored_playlists = false
# A directory in one of the library directories that will be used as the default
# playlist directory. forked-dapd creates new playlists in this directory if only
# a playlist name is provided (requires "allow_modify_stored_playlists" set to true).
# default_playlist_directory = ""
}
# Local audio output
@ -140,14 +208,70 @@ audio {
# Name - used in the speaker list in Remote
nickname = "OpenWrt"
# Audio device name for local audio output
# Type of the output (alsa, pulseaudio, dummy or disabled)
# type = "alsa"
# For pulseaudio output, an optional server hostname or IP can be
# specified (e.g. "localhost"). If not set, connection is made via local
# socket.
# server = ""
# Audio PCM device name for local audio output - ALSA only
# card = "default"
# Mixer channel to use for volume control - ALSA/Linux only
# Mixer channel to use for volume control - ALSA only
# If not set, PCM will be used if available, otherwise Master.
# mixer = ""
# Mixer device to use for volume control - ALSA only
# If not set, the value for "card" will be used.
# mixer_device = ""
# Enable or disable audio resampling to keep local audio in sync with
# e.g. Airplay. This feature relies on accurate ALSA measurements of
# delay, and some devices don't provide that. If that is the case you
# are better off disabling the feature.
# sync_disable = false
# Here you can adjust when local audio is started relative to other
# speakers, e.g. Airplay. Negative values correspond to moving local
# audio ahead, positive correspond to delaying it. The unit is
# milliseconds. The offset must be between -1000 and 1000 (+/- 1 sec).
# offset_ms = 0
# To calculate what and if resampling is required, local audio delay is
# measured each second. After a period the collected measurements are
# used to estimate drift and latency, which determines if corrections
# are required. This setting sets the length of that period in seconds.
# adjust_period_seconds = 100
}
# ALSA device settings
# If you have multiple ALSA devices you can configure them individually via
# sections like the below. Make sure to set the "card name" correctly. See the
# README about ALSA for details. Note that these settings will override the ALSA
# settings in the "audio" section above.
#alsa "card name" {
# Name - used in the speaker list in Remote
# If not set, the card name will be used
# nickname = "Computer"
# Mixer channel to use for volume control
# If not set, PCM will be used if available, otherwise Master
# mixer = ""
# Mixer device to use for volume control
# If not set, the card name will be used
# mixer_device = ""
#}
# Pipe output
# Allows forked-daapd to output audio data to a named pipe
#fifo {
# nickname = "fifo"
# path = "/path/to/fifo"
#}
# AirPlay/Airport Express device settings
# (make sure you get the capitalization of the device name right)
#airplay "My AirPlay device" {
@ -155,33 +279,119 @@ audio {
# you can set a lower value here
# max_volume = 11
# Enable this option to exclude a particular AirPlay device from the
# speaker list
# exclude = false
# Enable this option to keep a particular AirPlay device in the speaker
# list and thus ignore mdns notifications about it no longer being
# present. The speaker will remain until restart of forked-daapd.
# permanent = false
# AirPlay password
# password = "s1kr3t"
#}
# Chromecast settings
# (make sure you get the capitalization of the device name right)
#chromecast "My Chromecast device" {
# Enable this option to exclude a particular device from the speaker
# list
# exclude = false
#}
# Spotify settings (only have effect if Spotify enabled - see README/INSTALL)
spotify {
# Directory where user settings should be stored (credentials)
# settings_dir = "/var/cache/forked-daapd/libspotify"
# Cache directory
# cache_dir = "/tmp"
# Set preferred bitrate for music streaming
# 0: No preference (default), 1: 96kbps, 2: 160kbps, 3: 320kbps
# bitrate = 0
# Your Spotify playlists will by default be put in a "Spotify" playlist
# folder. If you would rather have them together with your other
# playlists you can set this option to true.
# base_playlist_disable = false
# Spotify playlists usually have many artist, and if you don't want
# every artist to be listed when artist browsing in Remote, you can set
# the artist_override flag to true. This will use the compilation_artist
# as album artist for Spotify items.
# artist_override = false
# Similar to the different artists in Spotify playlists, the playlist
# items belong to different albums, and if you do not want every album
# to be listed when browsing in Remote, you can set the album_override
# flag to true. This will use the playlist name as album name for
# Spotify items. Notice that if an item is in more than one playlist,
# it will only appear in one album when browsing (in which album is
# random).
# album_override = false
}
# MPD configuration (only have effect if MPD enabled - see README/INSTALL)
mpd {
# TCP port to listen on for MPD client requests.
# Default port is 6600, set to 0 to disable MPD support.
# port = 6600
# HTTP port to listen for artwork requests (only supported by some MPD
# clients and will need additional configuration in the MPD client to
# work). Set to 0 to disable serving artwork over http.
# http_port = 0
# By default forked-daapd will - like iTunes - clear the playqueue if
# playback stops. Setting clear_queue_on_stop_disable to true will keep
# the playlist like MPD does. Note that some dacp clients do not show
# the playqueue if playback is stopped.
# clear_queue_on_stop_disable = false
}
# SQLite configuration (allows to modify the operation of the SQLite databases)
# Make sure to read the SQLite documentation for the corresponding PRAGMA statements as
# changing them from the defaults may increase the possibility of database corruptions!
# By default the SQLite default values are used.
# Make sure to read the SQLite documentation for the corresponding PRAGMA
# statements as changing them from the defaults may increase the possibility of
# database corruptions! By default the SQLite default values are used.
sqlite {
# Cache size in number of db pages for the library database
# (SQLite default page size is 1024 bytes and cache size is 2000 pages)
# pragma_cache_size_library = 2000
# Cache size in number of db pages for the daap cache database
# (SQLite default page size is 1024 bytes and cache size is 2000 pages)
# pragma_cache_size_cache = 2000
# Sets the journal mode for the database
# DELETE (default), TRUNCATE, PERSIST, MEMORY, WAL, OFF
# DELETE (default), TRUNCATE, PERSIST, MEMORY, WAL, OFF
# pragma_journal_mode = DELETE
# Change the setting of the "synchronous" flag
# 0: OFF, 1: NORMAL, 2: FULL (default)
# pragma_synchronous = 2
# Number of bytes set aside for memory-mapped I/O for the library database
# (requires sqlite 3.7.17 or later)
# 0: disables mmap (default), any other value > 0: number of bytes for mmap
# pragma_mmap_size_library = 0
# Number of bytes set aside for memory-mapped I/O for the cache database
# (requires sqlite 3.7.17 or later)
# 0: disables mmap (default), any other value > 0: number of bytes for mmap
# pragma_mmap_size_cache = 0
# Should the database be vacuumed on startup? (increases startup time,
# but may reduce database size). Default is yes.
# vacuum = yes
}
# Streaming audio settings for remote connections (ie stream.mp3)
streaming {
# Sample rate, typically 44100 or 48000
# sample_rate = 44100
# Set the MP3 streaming bit rate (in kbps), valid options: 64 / 96 / 128 / 192 / 320
# bit_rate = 192
}

View File

@ -1,103 +0,0 @@
From 1b8adc11edec48a9b8fcb75b9efdaf618a6744bd Mon Sep 17 00:00:00 2001
From: ejurgensen <espenjurgensen@gmail.com>
Date: Fri, 25 Aug 2017 19:27:41 +0200
Subject: [PATCH] [dmap] Use a wrapper for dmap_find_field() Avoids the need to
have definition of dmap_find_field in dmap_common.h that must be kept in sync
with the definition that gperf generates.
Also should fix compilation problems when gperf is not present, ref pr #390
---
configure.ac | 21 ---------------------
src/dmap_common.c | 6 ++++++
src/dmap_common.h | 4 +---
src/httpd_daap.c | 2 +-
4 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9b149be..9819c82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,27 +32,6 @@ to install it.]])],
[AC_MSG_ERROR([[GNU gperf required, please install it.]])])
])
-GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)"
-
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
- #include <string.h>
- const char * in_word_set(const char *, size_t);
- $GPERF_TEST]
- )],
- [GPERF_LEN_TYPE=size_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([
- #include <string.h>
- const char * in_word_set(const char *, unsigned);
- $GPERF_TEST]
- )],
- [GPERF_LEN_TYPE=unsigned],
- [AC_MSG_ERROR([** unable to determine gperf len type])]
- )]
-)
-
-AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
AC_PATH_PROG([ANTLR], [[antlr3]])
AS_IF([[test -z "$ANTLR"]],
[AS_IF([[test -f "$srcdir/src/SMARTPLLexer.h"]],
diff --git a/src/dmap_common.c b/src/dmap_common.c
index 250a2d1..b2bc362 100644
--- a/src/dmap_common.c
+++ b/src/dmap_common.c
@@ -42,6 +42,12 @@ dmap_get_fields_table(int *nfields)
return dmap_fields;
}
+// This wrapper is so callers don't need to include dmap_fields_hash.h
+const struct dmap_field *
+dmap_find_field_wrapper(const char *str, int len)
+{
+ return dmap_find_field(str, len);
+}
void
dmap_add_container(struct evbuffer *evbuf, const char *tag, int len)
diff --git a/src/dmap_common.h b/src/dmap_common.h
index 93a2bdc..73f72d0 100644
--- a/src/dmap_common.h
+++ b/src/dmap_common.h
@@ -2,7 +2,6 @@
#ifndef __DMAP_HELPERS_H__
#define __DMAP_HELPERS_H__
-#include "config.h"
#include <event2/buffer.h>
#include <event2/http.h>
@@ -45,9 +44,8 @@ extern const struct dmap_field_map dfm_dmap_aeSP;
const struct dmap_field *
dmap_get_fields_table(int *nfields);
-/* From dmap_fields.gperf - keep in sync, don't alter */
const struct dmap_field *
-dmap_find_field (register const char *str, register GPERF_LEN_TYPE len);
+dmap_find_field_wrapper(const char *str, int len);
void
diff --git a/src/httpd_daap.c b/src/httpd_daap.c
index aef2fe0..0564275 100644
--- a/src/httpd_daap.c
+++ b/src/httpd_daap.c
@@ -738,7 +738,7 @@ parse_meta(struct evhttp_request *req, char *tag, const char *param, const struc
if (n == i)
{
- meta[i] = dmap_find_field(field, strlen(field));
+ meta[i] = dmap_find_field_wrapper(field, strlen(field));
if (!meta[i])
{
--
2.7.4