add audio/ympd

ympd is a lightweight MPD (Music Player Daemon) web client that runs
without a dedicated webserver or interpreters like PHP, NodeJS or Ruby.

It's tuned for minimal resource usage and requires only few dependencies.
This commit is contained in:
nia 2021-07-20 06:37:18 +00:00
parent 584672bc98
commit efe89596a6
8 changed files with 116 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.634 2021/07/12 15:07:13 pin Exp $
# $NetBSD: Makefile,v 1.635 2021/07/20 06:37:18 nia Exp $
#
COMMENT= Audio tools, players, and libraries
@ -511,6 +511,7 @@ SUBDIR+= xmms-wma
SUBDIR+= xmp
SUBDIR+= xmradio
SUBDIR+= xwave
SUBDIR+= ympd
SUBDIR+= zynaddsubfx
.include "../mk/misc/category.mk"

4
audio/ympd/DESCR Normal file
View file

@ -0,0 +1,4 @@
ympd is a lightweight MPD (Music Player Daemon) web client that runs
without a dedicated webserver or interpreters like PHP, NodeJS or Ruby.
It's tuned for minimal resource usage and requires only few dependencies.

40
audio/ympd/Makefile Normal file
View file

@ -0,0 +1,40 @@
# $NetBSD: Makefile,v 1.1 2021/07/20 06:37:18 nia Exp $
DISTNAME= ympd-1.3.0
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_GITHUB:=notandy/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://www.ympd.org/
COMMENT= Music Player Daemon web UI
LICENSE= gnu-gpl-v2
USE_CMAKE= yes
USE_TOOLS+= pkg-config
USE_LANGUAGES= c c++
BUILD_DEFS+= VARBASE
.include "../../mk/bsd.prefs.mk"
RCD_SCRIPTS+= ympd
.if ${INIT_SYSTEM} == "rc.d"
DEPENDS+= daemonize-[0-9]*:../../sysutils/daemonize
.endif
YMPD_USER?= ympd
YMPD_GROUP?= ympd
PKG_GROUPS= ${YMPD_GROUP}
PKG_USERS= ${YMPD_USER}:${YMPD_GROUP}
PKG_GROUPS_VARS= YMPD_USER
PKG_USERS_VARS= YMPD_GROUP
FILES_SUBST+= YMPD_USER=${YMPD_USER}
OWN_DIRS+= ${VARBASE}/log/ympd
.include "options.mk"
.include "../../audio/libmpdclient/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3
audio/ympd/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 2021/07/20 06:37:18 nia Exp $
bin/ympd
man/man1/ympd.1

7
audio/ympd/distinfo Normal file
View file

@ -0,0 +1,7 @@
$NetBSD: distinfo,v 1.1 2021/07/20 06:37:18 nia Exp $
SHA1 (ympd-1.3.0.tar.gz) = 588df4e0622fa292e42074d357a4d09e37e308a3
RMD160 (ympd-1.3.0.tar.gz) = b78cba8aa05dcd7bf7244af1b8e1d6360486b8c5
SHA512 (ympd-1.3.0.tar.gz) = 7e2bd4124b0e7692e2528e9fc50955d1b357ba042d8c97941160ad31ee0c89bc53b349195b45d27ce77aaa954bc01aceba1a30cdb89d9f58644a0b4934498a16
Size (ympd-1.3.0.tar.gz) = 350115 bytes
SHA1 (patch-CMakeLists.txt) = 727b742ffc579575b00d0a185f071b67805f1ef8

22
audio/ympd/files/ympd.sh Normal file
View file

@ -0,0 +1,22 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ympd.sh,v 1.1 2021/07/20 06:37:18 nia Exp $
#
# PROVIDE: ympd
# REQUIRE: DAEMON
. /etc/rc.subr
name="ympd"
rcvar=${name}
pidfile="@VARBASE@/run/${name}.pid"
procname="@PREFIX@/bin/ympd"
command="@PREFIX@/sbin/daemonize"
command_args="${command_args} -p ${pidfile}"
command_args="${command_args} -o @VARBASE@/log/ympd/stdout.log"
command_args="${command_args} -e @VARBASE@/log/ympd/stderr.log"
command_args="${command_args} ${procname}"
command_args="${command_args} -u @YMPD_USER@"
load_rc_config $name
run_rc_command "$1"

20
audio/ympd/options.mk Normal file
View file

@ -0,0 +1,20 @@
# $NetBSD: options.mk,v 1.1 2021/07/20 06:37:18 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ympd
PKG_SUPPORTED_OPTIONS= inet6 ssl
PKG_SUGGESTED_OPTIONS= inet6 ssl
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Minet6)
CMAKE_ARGS+= -DWITH_IPV6=ON
.else
CMAKE_ARGS+= -DWITH_IPV6=OFF
.endif
.if !empty(PKG_OPTIONS:Mssl)
CMAKE_ARGS+= -DWITH_SSL=ON
. include "../../security/openssl/buildlink3.mk"
.else
CMAKE_ARGS+= -DWITH_SSL=OFF
.endif

View file

@ -0,0 +1,18 @@
$NetBSD: patch-CMakeLists.txt,v 1.1 2021/07/20 06:37:18 nia Exp $
Use CMAKE_INSTALL_MANDIR.
--- CMakeLists.txt.orig 2016-02-13 21:01:52.000000000 +0000
+++ CMakeLists.txt
@@ -72,8 +72,10 @@ endif()
add_executable(ympd ${SOURCES})
target_link_libraries(ympd ${LIBMPDCLIENT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES})
+include(GNUInstallDirs)
+
install(TARGETS ympd DESTINATION bin)
-install(FILES ympd.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+install(FILES ympd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
if(WITH_DYNAMIC_ASSETS)
install(DIRECTORY htdocs DESTINATION share/${PROJECT_NAME})
endif()