audio/tauonmb: Added flatpak's rpc

Signed-off-by: Pouria Rezaei <Pouria.rz@outlook.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Pouria Rezaei 2022-06-17 01:10:31 +04:30 committed by Willy Sudiarto Raharjo
parent 39194f45c7
commit b19edaa7bf
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
3 changed files with 37 additions and 9 deletions

View File

@ -0,0 +1,21 @@
diff --git a/discord-ipc-0 b/discord-ipc-0
new file mode 120000
index 0000000..c3e06d7
--- /dev/null
+++ b/discord-ipc-0
@@ -0,0 +1 @@
+{app/com.discordapp.Discord,/run/user/1000}/discord-ipc-0
\ No newline at end of file
diff --git a/extra/tauonmb.sh b/extra/tauonmb.sh
index 0c9b715..8a2e50d 100644
--- a/extra/tauonmb.sh
+++ b/extra/tauonmb.sh
@@ -1,4 +1,8 @@
#!/bin/bash
+if [ ! -f "$XDG_RUNTIME_DIR/discord-ipc-0" ]; then
+ ln -sf "{app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-0"
+fi
+
if [ "$1" == "--no-start" ]; then
if [ "$2" == "--play" ]; then curl http://localhost:7813/play/
elif [ "$2" == "--play-pause" ]; then curl http://localhost:7813/playpause/

View File

@ -52,6 +52,7 @@ fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
RPC=${RPC:-no}
set -e
@ -73,20 +74,26 @@ sh compile-phazor.sh
# Compile translator
python3 compile-translations.py
rm -fR locale/*/*/tauon.po compile* mac.spec requirements.txt \
snapcraft.yaml src update-translations.py
rm -f locale/*/*/*.po
mkdir -p $PKG/opt/tauon-music-box $PKG/usr/bin
mv * $PKG/opt/tauon-music-box
install -m 0755 $PKG/opt/tauon-music-box/extra/$PRGNAM.sh \
$PKG/opt/tauon-music-box/$PRGNAM.sh
ln -s /opt/tauon-music-box/$PRGNAM.sh $PKG/usr/bin/tauon
case "$RPC" in
[yY][eE][sS])
patch -p1 < "$CWD/flatpak-rpc.diff"
;;
esac
mkdir -p $PKG/opt/tauon-music-box
mv assets extra lib locale t_modules templates theme CHANGELOG input.txt \
LICENSE tauon.py *.md $PKG/opt/tauon-music-box
cd $PKG/opt/tauon-music-box
mkdir -p $PKG/usr/bin
install -m 0755 extra/$PRGNAM.sh $PRGNAM.sh
ln -sf /opt/tauon-music-box/$PRGNAM.sh $PKG/usr/bin/tauon
mkdir -p $PKG/usr/share/applications
cp extra/$PRGNAM.desktop $PKG/usr/share/applications/
mv locale $PKG/usr/share/
mkdir -p $PKG/usr/share/icons/hicolor/{scalable,symbolic}/apps

View File

@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/Taiko2k/TauonMusicBox/archive/v7.2.1/TauonMusicBox-
MD5SUM="66441bb1faa5475e246a9bb66c2c835e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libopenmpt musicbrainzngs mutagen pylast python3-natsort python3-isounidecode python3-plexapi python3-pulsectl python3-pylyrics python3-pysdl2 send2trash setproctitle websocket-client"
REQUIRES="libopenmpt musicbrainzngs mutagen pylast python3-isounidecode python3-natsort python3-plexapi python3-pulsectl python3-pylyrics python3-pysdl2 send2trash setproctitle websocket-client"
MAINTAINER="Pouria Rezaei"
EMAIL="Pouria.rz@outlook.com"