From owner-dev-commits-ports-all@freebsd.org Sun Apr 25 20:24:36 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7D8D5E5F88; Sun, 25 Apr 2021 20:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FSzyr4t5mz4TgZ; Sun, 25 Apr 2021 20:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A06F1A6AD; Sun, 25 Apr 2021 20:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13PKOaPr062851; Sun, 25 Apr 2021 20:24:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13PKOaQJ062850; Sun, 25 Apr 2021 20:24:36 GMT (envelope-from git) Date: Sun, 25 Apr 2021 20:24:36 GMT Message-Id: <202104252024.13PKOaQJ062850@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: a14b73ada846 - main - New port: multimedia/lms: Lightweight Music Server MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a14b73ada846c44a3d0a87588b818d544f960dcd Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2021 20:24:36 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=a14b73ada846c44a3d0a87588b818d544f960dcd commit a14b73ada846c44a3d0a87588b818d544f960dcd Author: Yuri Victorovich AuthorDate: 2021-04-25 20:23:08 +0000 Commit: Yuri Victorovich CommitDate: 2021-04-25 20:24:34 +0000 New port: multimedia/lms: Lightweight Music Server --- multimedia/Makefile | 1 + multimedia/lms/Makefile | 43 ++++++++++++++++ multimedia/lms/distinfo | 5 ++ multimedia/lms/files/lms.in | 25 +++++++++ .../patch-src_libs_utils_impl_ChildProcess.cpp | 18 +++++++ multimedia/lms/pkg-descr | 4 ++ multimedia/lms/pkg-message | 11 ++++ multimedia/lms/pkg-plist | 60 ++++++++++++++++++++++ 8 files changed, 167 insertions(+) diff --git a/multimedia/Makefile b/multimedia/Makefile index 768f4da7d412..7de10a014776 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -219,6 +219,7 @@ SUBDIR += livego SUBDIR += lives SUBDIR += livestreamer + SUBDIR += lms SUBDIR += lsdvd SUBDIR += m2tstoavi SUBDIR += m2vrequantiser diff --git a/multimedia/lms/Makefile b/multimedia/lms/Makefile new file mode 100644 index 000000000000..5bbc4345c321 --- /dev/null +++ b/multimedia/lms/Makefile @@ -0,0 +1,43 @@ +PORTNAME= lms +DISTVERSION= 3.25.0 +MASTER_SITES= https://github.com/epoupon/lms/archive/refs/tags/v${DISTVERSION}${EXTRACT_SUFX}?dummy=/ +CATEGORIES= multimedia + +PATCH_SITES= https://github.com/epoupon/lms/commit/ +PATCHFILES+= b45b30ded44bb49865bbce7b43612f36043126ea.patch:-p1 # backport of fix of missing includes: https://github.com/epoupon/lms/commit/b45b30ded44bb49865bbce7b43612f36043126ea + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Lightweight Music Server + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ + libboost_system.so:devel/boost-libs \ + libconfig++.so:devel/libconfig \ + libtag.so:audio/taglib \ + libwthttp.so:www/wt +RUN_DEPENDS= ffmpeg:multimedia/ffmpeg + +USES= cmake compiler:c++17-lang pkgconfig + +USER= nobody +GROUP= nobody +SUB_LIST= USER=${USER} +USE_RC_SUBR= ${PORTNAME} + +PLIST_SUB= USER="${USER}" GROUP="${GROUP}" + +post-patch: + @${REINPLACE_CMD} -e 's|"/etc/lms.conf"|"${PREFIX}/etc/lms.conf"|' \ + ${WRKSRC}/src/lms/main.cpp \ + ${WRKSRC}/src/tools/cover/LmsCover.cpp \ + ${WRKSRC}/src/tools/recommendation/LmsRecommendation.cpp + @${REINPLACE_CMD} -e 's|"/usr/|"${PREFIX}/|; s|"/var/lms/"|"/var/db/lms/"|' \ + ${WRKSRC}/conf/lms.conf + +post-install: + ${RLN} ${STAGEDIR}${DATADIR}/lms.conf ${STAGEDIR}${PREFIX}/etc/lms.conf.sample + ${MKDIR} ${STAGEDIR}/var/db/lms + +.include diff --git a/multimedia/lms/distinfo b/multimedia/lms/distinfo new file mode 100644 index 000000000000..1490583a7664 --- /dev/null +++ b/multimedia/lms/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1619374810 +SHA256 (lms-3.25.0.tar.gz) = c27bf7d7fa994b3422c9773c2303df8fa078f35343326471ea4803cb0f5f872e +SIZE (lms-3.25.0.tar.gz) = 431516 +SHA256 (b45b30ded44bb49865bbce7b43612f36043126ea.patch) = a792b3cbd7ccb366ffeed8e85c616cd6f96dc55781bb00867aeda61018737f98 +SIZE (b45b30ded44bb49865bbce7b43612f36043126ea.patch) = 1751 diff --git a/multimedia/lms/files/lms.in b/multimedia/lms/files/lms.in new file mode 100644 index 000000000000..d00453820264 --- /dev/null +++ b/multimedia/lms/files/lms.in @@ -0,0 +1,25 @@ +#!/bin/sh + +# PROVIDE: lms +# REQUIRE: DAEMON NETWORKING +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable lms: +# lms_enable : set to "YES" to enable the daemon, default is "NO" + +. /etc/rc.subr + +name=lms +rcvar=lms_enable + +load_rc_config $name + +lms_enable=${lms_enable:-"NO"} + +logfile="/var/log/${name}.log" + +procname=%%PREFIX%%/bin/lms +command="/usr/sbin/daemon" +command_args="-u %%USER%% -o ${logfile} -t ${name} %%PREFIX%%/bin/lms" + +run_rc_command "$1" diff --git a/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp b/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp new file mode 100644 index 000000000000..52046a1b918a --- /dev/null +++ b/multimedia/lms/files/patch-src_libs_utils_impl_ChildProcess.cpp @@ -0,0 +1,18 @@ +--- src/libs/utils/impl/ChildProcess.cpp.orig 2021-04-25 18:33:13 UTC ++++ src/libs/utils/impl/ChildProcess.cpp +@@ -68,6 +68,7 @@ ChildProcess::ChildProcess(boost::asio::io_context& io + if (res < 0) + throw SystemException {errno, "pipe2 failed!"}; + ++#if !defined(__FreeBSD__) // see https://github.com/epoupon/lms/issues/144 + { + const std::size_t pipeSize {65536*8}; + +@@ -77,6 +78,7 @@ ChildProcess::ChildProcess(boost::asio::io_context& io + if (fcntl(pipe[1], F_SETPIPE_SZ, pipeSize) == -1) + throw SystemException {errno, "fcntl failed!"}; + } ++#endif + + res = fork(); + if (res == -1) diff --git a/multimedia/lms/pkg-descr b/multimedia/lms/pkg-descr new file mode 100644 index 000000000000..626c00c006b6 --- /dev/null +++ b/multimedia/lms/pkg-descr @@ -0,0 +1,4 @@ +LMS is a self-hosted music streaming software: it allows users to access their +music collections from anywhere using a web interface. + +WWW: https://github.com/epoupon/lms diff --git a/multimedia/lms/pkg-message b/multimedia/lms/pkg-message new file mode 100644 index 000000000000..49fd5d65b1d8 --- /dev/null +++ b/multimedia/lms/pkg-message @@ -0,0 +1,11 @@ +[ +{ type: install + message: <