snapcast-server: Add subpackage snapcast-client

This commit is contained in:
Tee KOBAYASHI 2022-01-30 06:26:47 +09:00 committed by xtkoba
parent 69e1e62b4d
commit 967f702fb7
4 changed files with 54 additions and 2 deletions

View File

@ -1,13 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://github.com/badaix/snapcast
TERMUX_PKG_DESCRIPTION="A multiroom client-server audio player"
TERMUX_PKG_DESCRIPTION="A multiroom client-server audio player (server)"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.25.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/badaix/snapcast/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c4e449cb693e091261727421f4965492be049632537e034fa9c59c92d091a846
TERMUX_PKG_DEPENDS="libc++, libexpat, libflac, libopus, libsoxr, libvorbis"
TERMUX_PKG_BUILD_DEPENDS="boost"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DBUILD_CLIENT=OFF -DBUILD_TESTS=OFF"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBUILD_TESTS=OFF
-DBoost_INCLUDE_DIR=$TERMUX_PREFIX/include
"
termux_step_pre_configure() {
LDFLAGS+=" -llog"

View File

@ -0,0 +1,29 @@
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -33,7 +33,7 @@
elseif (WIN32)
list(APPEND CLIENT_SOURCES player/wasapi_player.cpp)
list(APPEND CLIENT_LIBRARIES wsock32 ws2_32 avrt ksuser iphlpapi)
-elseif(NOT ANDROID)
+elseif(TRUE)
# Avahi
if (AVAHI_FOUND)
list(APPEND CLIENT_SOURCES browseZeroConf/browse_avahi.cpp)
@@ -55,7 +55,7 @@
endif (PULSE_FOUND)
endif (MACOSX)
-if (ANDROID)
+if (FALSE)
list(APPEND CLIENT_LIBRARIES oboe::oboe)
list(APPEND CLIENT_LIBRARIES boost::boost)
list(APPEND CLIENT_LIBRARIES flac::flac)
@@ -100,7 +100,7 @@
endif()
include_directories(${CLIENT_INCLUDE})
-if (ANDROID)
+if (FALSE)
add_executable(libsnapclient.so ${CLIENT_SOURCES})
target_link_libraries(libsnapclient.so ${CLIENT_LIBRARIES} log OpenSLES)
else()

View File

@ -0,0 +1,11 @@
--- a/client/snapclient.cpp
+++ b/client/snapclient.cpp
@@ -312,7 +312,7 @@
std::unique_ptr<Daemon> daemon;
if (daemonOption->is_set())
{
- string pidFile = "/var/run/snapclient/pid";
+ string pidFile = "@TERMUX_PREFIX@/var/run/snapclient/pid";
if (settings.instance != 1)
pidFile += "." + cpt::to_string(settings.instance);
string user;

View File

@ -0,0 +1,8 @@
TERMUX_SUBPKG_INCLUDE="
bin/snapclient
share/man/man1/snapclient.1.gz
share/pixmaps/snapcast.svg
"
TERMUX_SUBPKG_DESCRIPTION="A multiroom client-server audio player (client)"
TERMUX_SUBPKG_DEPENDS="avahi, pulseaudio"
TERMUX_SUBPKG_DEPEND_ON_PARENT=deps