Merge branch 'feature/mpd' into develop

This commit is contained in:
Peter Steenbergen 2020-01-13 14:46:12 +01:00
commit 7172f81018
8 changed files with 114 additions and 8 deletions

View File

@ -9,6 +9,7 @@ menu "Additional drivers, libraries and/or applications"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/alsa-plugins/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/btspeaker/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/fann/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/mycroft-mpd/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/respeaker/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/snapcast/Config.in"
source "$BR2_EXTERNAL_MYCROFTOS_PATH/package/spotifyd/Config.in"

View File

@ -54,7 +54,6 @@ BR2_PACKAGE_ALSA_UTILS_ASEQNET=y
BR2_PACKAGE_ALSA_UTILS_BAT=y
BR2_PACKAGE_ALSA_UTILS_IECSET=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_FAAD2=y
BR2_PACKAGE_FFMPEG_GPL=y
BR2_PACKAGE_FFMPEG_NONFREE=y
BR2_PACKAGE_FFMPEG_FFPLAY=y
@ -85,7 +84,6 @@ BR2_PACKAGE_GREP=y
BR2_PACKAGE_JQ=y
BR2_PACKAGE_MAKE=y
BR2_PACKAGE_PKGCONF=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_DIRECTFB=y
@ -159,7 +157,6 @@ BR2_PACKAGE_DBUS_PYTHON=y
BR2_PACKAGE_KBD=y
BR2_PACKAGE_PARTED=y
BR2_PACKAGE_SPI_TOOLS=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_PY_ONLY=y
BR2_PACKAGE_PYTHON3_BZIP2=y
BR2_PACKAGE_PYTHON3_CODECSCJK=y
@ -198,7 +195,6 @@ BR2_PACKAGE_PYTHON_WEBSOCKET_CLIENT=y
BR2_PACKAGE_PYTHON_WRAPT=y
BR2_PACKAGE_LIBAO=y
BR2_PACKAGE_LIBCDDB=y
BR2_PACKAGE_LIBMAD=y
BR2_PACKAGE_LIBSIDPLAY2=y
BR2_PACKAGE_OPUSFILE=y
BR2_PACKAGE_PORTAUDIO=y
@ -217,7 +213,6 @@ BR2_PACKAGE_GNUTLS_OPENSSL=y
BR2_PACKAGE_LIBSSH2=y
BR2_PACKAGE_LIBOPENSSL_BIN=y
BR2_PACKAGE_LIBOPENSSL_ENGINES=y
BR2_PACKAGE_LIBNFS=y
BR2_PACKAGE_LIBRSVG=y
BR2_PACKAGE_LIBGUDEV=y
BR2_PACKAGE_MRAA=y
@ -234,7 +229,6 @@ BR2_PACKAGE_LIBTHEORA=y
BR2_PACKAGE_X264=y
BR2_PACKAGE_X265=y
BR2_PACKAGE_C_ARES=y
BR2_PACKAGE_LIBCURL=y
BR2_PACKAGE_CURL=y
BR2_PACKAGE_LIBHTTPPARSER=y
BR2_PACKAGE_LIBMICROHTTPD=y
@ -249,7 +243,6 @@ BR2_PACKAGE_PCRE_16=y
BR2_PACKAGE_PCRE_32=y
BR2_PACKAGE_PCRE2_16=y
BR2_PACKAGE_PCRE2_32=y
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
BR2_PACKAGE_BLUEZ_TOOLS=y
BR2_PACKAGE_BLUEZ5_UTILS=y
BR2_PACKAGE_BLUEZ5_UTILS_OBEX=y
@ -300,7 +293,7 @@ BR2_PACKAGE_VIM=y
# BR2_PACKAGE_VIM_RUNTIME is not set
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="1024M"
BR2_TARGET_ROOTFS_EXT2_SIZE="1536M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
@ -318,6 +311,7 @@ BR2_PACKAGE_WIFI_AP=y
BR2_PACKAGE_ALSA_PLUGINS=y
BR2_PACKAGE_BTSPEAKER=y
BR2_PACKAGE_FANN=y
BR2_PACKAGE_MYCROFT_MPD=y
BR2_PACKAGE_RESPEAKER=y
BR2_PACKAGE_SNAPCAST=y
BR2_PACKAGE_SNAPCAST_SERVER=y

View File

@ -0,0 +1,22 @@
config BR2_PACKAGE_MYCROFT_MPD
bool "mycroft-mpd"
select BR2_PACKAGE_MPD
select BR2_PACKAGE_MPD_BZIP2
select BR2_PACKAGE_MPD_SQLITE
select BR2_PACKAGE_MPD_LIBSAMPLERATE
select BR2_PACKAGE_MPD_LIBSOXR
select BR2_PACKAGE_MPD_AUDIOFILE
select BR2_PACKAGE_MPD_FAAD2
select BR2_PACKAGE_MPD_FLAC
select BR2_PACKAGE_MPD_OPUS
select BR2_PACKAGE_MPD_VORBIS
select BR2_PACKAGE_MPD_CURL
select BR2_PACKAGE_MPD_LIBNFS
select BR2_PACKAGE_MPD_LIBSMBCLIENT
select BR2_PACKAGE_MPD_SOUNDCLOUD
select BR2_PACKAGE_MPD_AVAHI_SUPPORT
select BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT
select BR2_PACKAGE_MPD_UPNP
select BR2_PACKAGE_NCMPC
help
Helper package that selects MPD and several codecs.

View File

@ -0,0 +1,52 @@
#
# Sample configuration file for mpd
# This is a minimal configuration, see the manpage for more options
#
# Directory where the music is stored
music_directory "/opt/mpd/music"
# Directory where user-made playlists are stored (RW)
playlist_directory "/opt/mpd/playlists"
# Database file (RW)
db_file "/opt/mpd/database"
# Log file (RW)
log_file "/var/log/mpd.log"
# Process ID file (RW)
pid_file "/var/run/mpd.pid"
# State file (RW)
state_file "/opt/mpd/state"
# User id to run the daemon as
#user "nobody"
# TCP socket binding
bind_to_address "any"
#bind_to_address "localhost"
# Unix socket to listen on
bind_to_address "/var/lib/mpd/socket"
# Feed audio into PulseAudio's sink
audio_output {
type "pulse"
name "Local Music Player Daemon"
server "127.0.0.1"
}
# Comment below and uncomment the snapcast section
# if you want to use mpd as multiroom audio
# (make sure snapcast is started if so...)
# Feed audio into snapcast's fifo
#audio_output {
# type "fifo"
# name "Snapcast"
# path "/tmp/snapfifo"
# format "48000:16:2"
# mixer_type "software"
#}

View File

@ -0,0 +1,12 @@
[Unit]
Description=mpd
Wants=network.target
After=network.target sound.target
[Service]
Type=simple
User=mycroft
ExecStart=/bin/mpd --no-daemon
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,23 @@
################################################################################
#
# mycroft-mpd
#
################################################################################
define MYCROFT_MPD_INSTALL_EXTRA_FILES
$(INSTALL) -m 0644 -D $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-mpd/mpd.conf \
$(TARGET_DIR)/etc/mpd.conf
mkdir -p $(TARGET_DIR)/opt/mpd/playlists
mkdir -p $(TARGET_DIR)/opt/mpd/music
cp -r $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-mpd/playlists/* \
$(TARGET_DIR)/opt/mpd/playlists/
$(INSTALL) -m 0644 -D $(BR2_EXTERNAL_MYCROFTOS_PATH)/package/mycroft-mpd/mpd.service \
$(TARGET_DIR)/usr/lib/systemd/system/mpd.service
endef
MYCROFT_MPD_POST_INSTALL_TARGET_HOOKS += MYCROFT_MPD_INSTALL_EXTRA_FILES
$(eval $(generic-package))

View File

@ -0,0 +1 @@
http://wdr-1live-live.icecast.wdr.de/wdr/1live/live/mp3/128/stream.mp3

View File

@ -2,3 +2,4 @@ d /var/log/mycroft 700 mycroft mycroft
z /opt/mycroft 755 mycroft mycroft
Z /opt/mycroft/skills 755 mycroft mycroft
Z /opt/mycroft/splash 755 mycroft mycroft
Z /opt/mpd 755 mycroft mycroft