diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/mympd/Makefile | 33 | ||||
-rw-r--r-- | package/mympd/files/mympd.init | 31 | ||||
-rw-r--r-- | package/mympd/files/mympd.postinst | 7 | ||||
-rw-r--r-- | package/mympd/patches/patch-src_compile_time_h_in | 13 | ||||
-rw-r--r-- | package/mympd/patches/patch-src_main_c | 21 |
5 files changed, 105 insertions, 0 deletions
diff --git a/package/mympd/Makefile b/package/mympd/Makefile new file mode 100644 index 000000000..ccef09b13 --- /dev/null +++ b/package/mympd/Makefile @@ -0,0 +1,33 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= mympd +PKG_VERSION:= 14.0.2 +PKG_RELEASE:= 1 +PKG_HASH:= 309476bcc352f5b9ddc365412cb636e41b3a9e675c0ef94c17b982af2dfc3aa8 +PKG_DESCR:= standalone music player daemon web gui +PKG_SECTION:= net/http +PKG_DEPENDS:= mpd libopenssl pcre2 +PKG_BUILDDEP:= cmake-host libmpdclient openssl pcre2 +PKG_URL:= https://github.com/jcorporation/myMPD +PKG_SITES:= https://github.com/jcorporation/myMPD/archive/refs/tags/ + +DISTFILES:= v$(PKG_VERSION).tar.gz +WRKDIST= ${WRKDIR}/myMPD-${PKG_VERSION} + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,MYMPD,mympd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION))) + +WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj +CONFIG_STYLE:= cmake +CMAKE_FLAGS:= -DMYMPD_EMBEDDED_ASSETS=ON + +mympd-install: + $(INSTALL_DIR) $(IDIR_MYMPD)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/mympd \ + $(IDIR_MYMPD)/usr/bin + +include $(ADK_TOPDIR)/mk/pkg-bottom.mk diff --git a/package/mympd/files/mympd.init b/package/mympd/files/mympd.init new file mode 100644 index 000000000..f7eec5b6d --- /dev/null +++ b/package/mympd/files/mympd.init @@ -0,0 +1,31 @@ +#!/bin/sh +#PKG mympd +#INIT 90 + +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${mympd:-NO}" = x"NO" && exit 0 + test x"$mympd" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + mkdir -p /var/cache/mympd 2>/dev/null + mkdir -p /etc/mympd 2>/dev/null + mympd -w /etc/mympd -s & + ;; +stop) + kill $(pgrep -f mympd) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/mympd/files/mympd.postinst b/package/mympd/files/mympd.postinst new file mode 100644 index 000000000..be700987b --- /dev/null +++ b/package/mympd/files/mympd.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf mympd NO +gid=$(get_next_gid) +add_group mympd $gid +add_user mympd $(get_next_uid) $gid /var/lib/mympd + diff --git a/package/mympd/patches/patch-src_compile_time_h_in b/package/mympd/patches/patch-src_compile_time_h_in new file mode 100644 index 000000000..5868aa338 --- /dev/null +++ b/package/mympd/patches/patch-src_compile_time_h_in @@ -0,0 +1,13 @@ +--- myMPD-14.0.2.orig/src/compile_time.h.in 2024-02-11 12:00:47.000000000 +0100 ++++ myMPD-14.0.2/src/compile_time.h.in 2024-02-13 06:02:38.922236003 +0100 +@@ -58,8 +58,8 @@ + #define MPD_VERSION_MIN_PATCH 0 + + //default paths from cmake +-#define MYMPD_DOC_ROOT "${MYMPD_DOC_ROOT}" +-#define MYMPD_WORK_DIR "${MYMPD_WORK_DIR}" ++#define MYMPD_DOC_ROOT "/srv/mympd" ++#define MYMPD_WORK_DIR "/etc/mympd" + #define MYMPD_CACHE_DIR "${MYMPD_CACHE_DIR}" + #define MYMPD_LUALIBS_PATH "${MYMPD_LUALIBS_PATH}" + diff --git a/package/mympd/patches/patch-src_main_c b/package/mympd/patches/patch-src_main_c new file mode 100644 index 000000000..971c4f1cd --- /dev/null +++ b/package/mympd/patches/patch-src_main_c @@ -0,0 +1,21 @@ +--- myMPD-14.0.2.orig/src/main.c 2024-02-11 12:00:47.000000000 +0100 ++++ myMPD-14.0.2/src/main.c 2024-02-13 05:31:53.330851831 +0100 +@@ -492,12 +492,12 @@ int main(int argc, char **argv) { + } + + //set output buffers +- if (setvbuf(stdout, NULL, _IOLBF, 0) != 0 || +- setvbuf(stderr, NULL, _IOLBF, 0) != 0) +- { +- MYMPD_LOG_EMERG(NULL, "Could not set stdout and stderr buffer"); +- goto cleanup; +- } ++ //if (setvbuf(stdout, NULL, _IOLBF, 0) != 0 || ++ // setvbuf(stderr, NULL, _IOLBF, 0) != 0) ++ //{ ++ // MYMPD_LOG_EMERG(NULL, "Could not set stdout and stderr buffer"); ++ // goto cleanup; ++ // } + + //init webserver + mgr = malloc_assert(sizeof(struct mg_mgr)); |