Skip to content

Commit

Permalink
add myMPD web client package
Browse files Browse the repository at this point in the history
  • Loading branch information
hgy59 committed Mar 5, 2023
1 parent 06b0fa7 commit 50c8cde
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 0 deletions.
33 changes: 33 additions & 0 deletions cross/mympd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PKG_NAME = mympd
PKG_VERS = 10.2.4
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/jcorporation/myMPD/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = myMPD-$(PKG_VERS)

DEPENDS = cross/libmpdclient cross/openssl cross/pcre2 cross/libid3tag

REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = comcerto2k

HOMEPAGE = https://jcorporation.github.io/
COMMENT = myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
LICENSE = GPLv3
# myMPD was originally a fork of ympd, but it has evolved into a much more comprehensive MPD client.

CMAKE_USE_TOOLCHAIN_FILE = NO

POST_INSTALL_TARGET = mympd_post_install

include ../../mk/spksrc.cross-cmake.mk

.PHONY: mympd_post_install
mympd_post_install:
@$(MSG) Install additional libraries...
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/libmympdclient/liblibmympdclient.so $(STAGING_INSTALL_PREFIX)/lib/
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/mjson/libmjson.so $(STAGING_INSTALL_PREFIX)/lib/
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/mongoose/libmongoose.so $(STAGING_INSTALL_PREFIX)/lib/
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/rax/librax.so $(STAGING_INSTALL_PREFIX)/lib/
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/sds/libsds.so $(STAGING_INSTALL_PREFIX)/lib/
@install $(WORK_DIR)/$(PKG_DIR)/build/dist/tinymt/libtinymt.so $(STAGING_INSTALL_PREFIX)/lib/
7 changes: 7 additions & 0 deletions cross/mympd/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bin:bin/mympd
lib:lib/liblibmympdclient.so
lib:lib/libmjson.so
lib:lib/libmongoose.so
lib:lib/librax.so
lib:lib/libsds.so
lib:lib/libtinymt.so
3 changes: 3 additions & 0 deletions cross/mympd/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mympd-10.2.4.tar.gz SHA1 3d7aec456d6a9dc22f5e2db16007a32646127054
mympd-10.2.4.tar.gz SHA256 785f58d0c11edd42cd0d7fe7ffb7a86b06641c34cb93caedf47b6e4bc094a2f2
mympd-10.2.4.tar.gz MD5 9792bbe1f007fa19dbfdb350c7842b03
36 changes: 36 additions & 0 deletions spk/mympd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
SPK_NAME = mympd
SPK_VERS = 10.2.4
SPK_REV = 1
SPK_ICON = src/mympd.png
DSM_UI_DIR = app

DEPENDS = cross/mympd

REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = comcerto2k

MAINTAINER = hgy59
DESCRIPTION = myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
CHANGELOG = "Initial package release."

DISPLAY_NAME = myMPD

HOMEPAGE = https://jcorporation.github.io/
LICENSE = GPLv3

# SERVICE_COMMAND is defined in service-setup.sh
STARTABLE = yes
SERVICE_PORT = 8185
SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
ADMIN_PORT = $(SERVICE_PORT)

POST_STRIP_TARGET = mympd_extra_install

include ../../mk/spksrc.spk.mk

.PHONY: mympd_extra_install
mympd_extra_install:
@$(MSG) Install default config folder
@install -d -m 755 $(STAGING_DIR)/var
@tar -cf - -C src config.default | tar -xf - -C $(STAGING_DIR)/var/
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/covercache_keep_days
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
31
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/http
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/http_host
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.0.0
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/http_port
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8185
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/loglevel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/mympd_uri
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/save_caches
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
1 change: 1 addition & 0 deletions spk/mympd/src/config.default/ssl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
false
Binary file added spk/mympd/src/mympd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions spk/mympd/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

CONFIG_DIR=${SYNOPKG_PKGVAR}/config
CONFIG_DEFAULT_DIR=${SYNOPKG_PKGVAR}/config.default
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/mympd"
SVC_BACKGROUND=y
SVC_WRITE_PID=y


service_postinst ()
{
if [ ! -d ${CONFIG_DIR} ]; then
echo "Initialize configuration in ${CONFIG_DIR} from default config."
mkdir -p ${CONFIG_DIR}
$RSYNC --ignore-existing ${CONFIG_DEFAULT_DIR}/ ${CONFIG_DIR}
fi
}

0 comments on commit 50c8cde

Please sign in to comment.