diff --git a/cross/mympd/Makefile b/cross/mympd/Makefile new file mode 100644 index 000000000000..eb4703e8ebf9 --- /dev/null +++ b/cross/mympd/Makefile @@ -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/ diff --git a/cross/mympd/PLIST b/cross/mympd/PLIST new file mode 100644 index 000000000000..2cb18f69586a --- /dev/null +++ b/cross/mympd/PLIST @@ -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 diff --git a/cross/mympd/digests b/cross/mympd/digests new file mode 100644 index 000000000000..69077cd68089 --- /dev/null +++ b/cross/mympd/digests @@ -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 diff --git a/spk/mympd/Makefile b/spk/mympd/Makefile new file mode 100644 index 000000000000..d7df8494612e --- /dev/null +++ b/spk/mympd/Makefile @@ -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/ diff --git a/spk/mympd/src/config.default/covercache_keep_days b/spk/mympd/src/config.default/covercache_keep_days new file mode 100644 index 000000000000..b74e882ae378 --- /dev/null +++ b/spk/mympd/src/config.default/covercache_keep_days @@ -0,0 +1 @@ +31 \ No newline at end of file diff --git a/spk/mympd/src/config.default/http b/spk/mympd/src/config.default/http new file mode 100644 index 000000000000..f32a5804e292 --- /dev/null +++ b/spk/mympd/src/config.default/http @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/spk/mympd/src/config.default/http_host b/spk/mympd/src/config.default/http_host new file mode 100644 index 000000000000..1f2c8da3a1bc --- /dev/null +++ b/spk/mympd/src/config.default/http_host @@ -0,0 +1 @@ +0.0.0.0 \ No newline at end of file diff --git a/spk/mympd/src/config.default/http_port b/spk/mympd/src/config.default/http_port new file mode 100644 index 000000000000..a4b6f43163b3 --- /dev/null +++ b/spk/mympd/src/config.default/http_port @@ -0,0 +1 @@ +8185 \ No newline at end of file diff --git a/spk/mympd/src/config.default/loglevel b/spk/mympd/src/config.default/loglevel new file mode 100644 index 000000000000..7813681f5b41 --- /dev/null +++ b/spk/mympd/src/config.default/loglevel @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/spk/mympd/src/config.default/mympd_uri b/spk/mympd/src/config.default/mympd_uri new file mode 100644 index 000000000000..4d18c3e59ecf --- /dev/null +++ b/spk/mympd/src/config.default/mympd_uri @@ -0,0 +1 @@ +auto \ No newline at end of file diff --git a/spk/mympd/src/config.default/save_caches b/spk/mympd/src/config.default/save_caches new file mode 100644 index 000000000000..f32a5804e292 --- /dev/null +++ b/spk/mympd/src/config.default/save_caches @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/spk/mympd/src/config.default/ssl b/spk/mympd/src/config.default/ssl new file mode 100644 index 000000000000..02e4a84d62c4 --- /dev/null +++ b/spk/mympd/src/config.default/ssl @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/spk/mympd/src/mympd.png b/spk/mympd/src/mympd.png new file mode 100644 index 000000000000..c30ca67b6c99 Binary files /dev/null and b/spk/mympd/src/mympd.png differ diff --git a/spk/mympd/src/service-setup.sh b/spk/mympd/src/service-setup.sh new file mode 100644 index 000000000000..20a741c5753c --- /dev/null +++ b/spk/mympd/src/service-setup.sh @@ -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 +}