mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
audio/jamulus: Favorize by adding the 'server' flavor
This commit is contained in:
+42
-19
@@ -3,7 +3,7 @@
|
||||
PORTNAME= jamulus
|
||||
DISTVERSIONPREFIX= r
|
||||
DISTVERSION= 3_7_0
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= audio
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
@@ -14,35 +14,58 @@ LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libjack.so:audio/jack
|
||||
|
||||
FLAVORS= desktop server
|
||||
FLAVOR?= ${FLAVORS:[1]}
|
||||
server_PKGNAMESUFFIX= -server
|
||||
|
||||
USES= compiler:c++11-lang gl pkgconfig qmake qt:5
|
||||
USE_QT= concurrent core gui network widgets xml buildtools_build linguisttools_build
|
||||
USE_QT= concurrent core network xml buildtools_build linguisttools_build
|
||||
USE_GL= gl
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= jamulussoftware
|
||||
|
||||
.if ${FLAVOR:U} == desktop
|
||||
USE_QT+= gui widgets
|
||||
PLIST_FILES= bin/${PORTNAME} \
|
||||
share/applications/jamulus.desktop \
|
||||
share/applications/jamulus-server.desktop \
|
||||
share/pixmaps/jamulus.png \
|
||||
share/pixmaps/jamulus-server.png
|
||||
share/applications/${PORTNAME}.desktop \
|
||||
share/applications/${PORTNAME}-server.desktop \
|
||||
share/pixmaps/${PORTNAME}.png \
|
||||
share/pixmaps/${PORTNAME}-server.png
|
||||
.endif
|
||||
|
||||
QMAKE_ARGS= CONFIG+="noupcasename"
|
||||
.if ${FLAVOR:U} == server
|
||||
COMMENT+= (headless server)
|
||||
QMAKE_ARGS= CONFIG+="headless nosound"
|
||||
USER= nobody
|
||||
SUB_LIST= USER=${USER}
|
||||
USE_RC_SUBR= ${PORTNAME}-server
|
||||
PLIST_FILES= bin/${PORTNAME}-server
|
||||
.endif
|
||||
|
||||
QMAKE_ARGS+= CONFIG+="noupcasename"
|
||||
|
||||
PORTSCOUT= limit:^r\d+_ # prevent malformatted tags, like 'latest'
|
||||
|
||||
.if ${FLAVOR:U} == desktop
|
||||
post-install:
|
||||
# workaround for https://gitlab.xfce.org/xfce/xfdesktop/-/issues/131
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps/jamulus.png ${STAGEDIR}${PREFIX}/share/pixmaps/
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/share/icons
|
||||
# add Jamulus Server menu item which is simply 'jamulus -s' with a special icon
|
||||
${CP} ${STAGEDIR}${PREFIX}/share/applications/jamulus.desktop ${STAGEDIR}${PREFIX}/share/applications/jamulus-server.desktop
|
||||
${REINPLACE_CMD} -i '' ' \
|
||||
s|Name=Jamulus|Name=Jamulus Server| ; \
|
||||
s|Comment=Jam Session|Comment=Jam Session Server| ; \
|
||||
s|Exec=jamulus|Exec=jamulus -s| ; \
|
||||
s|Icon=jamulus|Icon=jamulus-server| ; \
|
||||
' ${STAGEDIR}${PREFIX}/share/applications/jamulus-server.desktop
|
||||
${INSTALL_DATA} ${WRKSRC}/src/res/fronticonserver.png ${STAGEDIR}${PREFIX}/share/pixmaps/jamulus-server.png
|
||||
# workaround for https://gitlab.xfce.org/xfce/xfdesktop/-/issues/131
|
||||
${MV} ${STAGEDIR}${PREFIX}/share/icons/hicolor/512x512/apps/jamulus.png ${STAGEDIR}${PREFIX}/share/pixmaps/
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/share/icons
|
||||
# add Jamulus Server menu item which is simply 'jamulus -s' with a special icon
|
||||
${CP} ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}-server.desktop
|
||||
${REINPLACE_CMD} -i '' ' \
|
||||
s|Name=Jamulus|Name=Jamulus Server| ; \
|
||||
s|Comment=Jam Session|Comment=Jam Session Server| ; \
|
||||
s|Exec=jamulus|Exec=jamulus -s| ; \
|
||||
s|Icon=jamulus|Icon=jamulus-server| ; \
|
||||
' ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}-server.desktop
|
||||
${INSTALL_DATA} ${WRKSRC}/src/res/fronticonserver.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}-server.png
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:U} == server
|
||||
post-install:
|
||||
${MV} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-server
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: jamulus-server
|
||||
# REQUIRE: DAEMON NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable jamulus_server:
|
||||
# jamulus_server_enable : set to "YES" to enable the daemon, default is "NO"
|
||||
# jamulus_server_flags : any extra flags, default is ""
|
||||
# - list of all possible flags: https://jamulus.io/wiki/Command-Line-Options
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=jamulus_server
|
||||
rcvar=jamulus_server_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
jamulus_server_enable=${jamulus_server_enable:-"NO"}
|
||||
jamulus_server_flags=${jamulus_server_flags:-""}
|
||||
|
||||
logfile="/var/log/${name}.log"
|
||||
|
||||
procname=%%PREFIX%%/bin/jamulus-server
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-u %%USER%% -o ${logfile} -t ${name} %%PREFIX%%/bin/jamulus-server -s ${jamulus_server_flags}"
|
||||
|
||||
run_rc_command "$1"
|
||||
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
You installed Jamulus: Internet jam session software
|
||||
|
||||
Most users need Jamulus client to listen to or participate in jam sessions
|
||||
hosted by others.
|
||||
|
||||
You can run Jamulus client using the menu item or by running the "jamulus"
|
||||
command.
|
||||
|
||||
Some users also need to run Jamulus server to host jam sessions.
|
||||
|
||||
You can run Jamulus server as a graphical program by using the "Jamulus Server"
|
||||
menu item, or run the "jamulus -s" command.
|
||||
|
||||
You can also run Jamulus Server as a headless server. In order to do this you
|
||||
need to install the jamulus-server package and run:
|
||||
# sysrc jamulus_server_enable="YES"
|
||||
# service jamulus-server start
|
||||
and then navigate to your server by your IP address in the Jamulus Client.
|
||||
|
||||
You can also start the Jamulus Server service once with:
|
||||
# service jamulus-server onestart
|
||||
|
||||
Please read https://jamulus.io/wiki/Command-Line-Options and add appropriate
|
||||
Jamulus Server options to jamulus_server_flags="{your options}"
|
||||
in /etc/rc.config
|
||||
|
||||
EOM
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user