summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
author Isaac Yu <isaacyu@protonmail.com>2024-05-22 22:16:11 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-05-22 23:06:46 +0700
commitfda74dc5b5a5a4ae8fa81c7902d86e0ddb301cda (patch)
treeb55c7f7aa539a19bdb70e67e1eb2c868915c5c4b /audio
parent364d84fbbaedc7285dbf2b10e778415c6acd6abd (diff)
downloadslackbuilds-fda74dc5b5a5a4ae8fa81c7902d86e0ddb301cda.tar.gz
slackbuilds-fda74dc5b5a5a4ae8fa81c7902d86e0ddb301cda.tar.xz
audio/Ymuse: Added (GTK frontend for mpd).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r--audio/Ymuse/README2
-rw-r--r--audio/Ymuse/Ymuse.SlackBuild123
-rw-r--r--audio/Ymuse/Ymuse.info18
-rw-r--r--audio/Ymuse/doinst.sh9
-rw-r--r--audio/Ymuse/modules.txt12
-rw-r--r--audio/Ymuse/slack-desc19
6 files changed, 183 insertions, 0 deletions
diff --git a/audio/Ymuse/README b/audio/Ymuse/README
new file mode 100644
index 0000000000..332b84e9b2
--- /dev/null
+++ b/audio/Ymuse/README
@@ -0,0 +1,2 @@
+Ymuse is an easy, functional, and snappy GTK front-end (client) for
+Music Player Daemon written in Go.
diff --git a/audio/Ymuse/Ymuse.SlackBuild b/audio/Ymuse/Ymuse.SlackBuild
new file mode 100644
index 0000000000..c10e536732
--- /dev/null
+++ b/audio/Ymuse/Ymuse.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/bash
+
+# Slackware build script for Ymuse
+
+# Copyright 2024 Isaac Yu <isaacyu@protonmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=Ymuse
+VERSION=${VERSION:-0.22}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=ymuse
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+
+mkdir -p vendor
+cat $CWD/modules.txt > vendor/modules.txt
+for DIR in $(grep -o "^# .* " vendor/modules.txt | cut -d' ' -f2)
+do
+ NAME=$(echo $DIR | sed 's/[./]v[0-9]\+$//' | xargs basename)
+ DIR=vendor/$DIR
+ tar xvf $CWD/$NAME-*.tar.gz
+ mkdir -p $(dirname $DIR)
+ mv $NAME-* $DIR
+done
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CGO_CFLAGS="$SLKCFLAGS" \
+CGO_CXXFLAGS="$SLKCFLAGS" \
+go build -mod vendor
+
+install -Dm755 ymuse $PKG/usr/bin/ymuse
+strip --strip-unneeded $PKG/usr/bin/ymuse
+
+# Copy icons (code taken from Arch Linux AUR's PKGBUILD)
+for file in $(find resources/icons -type f); do
+ install -Dm644 ${file} $PKG/usr/share/icons/${file#resources/icons}
+done
+
+# Copy local language files (code taken from Arch Linux AUR's PKGBUILD)
+# This does not install anything so far
+for file in $(find resources/i18n -type f -name *.mo); do
+ install -Dm644 ${file} $PKG/usr/share/locale/${file#resources/i18n/generated}
+done
+
+# Copy .desktop file (code taken from Arch Linux AUR's PKGBUILD)
+install -Dm644 resources/com.yktoo.ymuse.desktop -t $PKG/usr/share/applications/
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/audio/Ymuse/Ymuse.info b/audio/Ymuse/Ymuse.info
new file mode 100644
index 0000000000..1723a5e4d8
--- /dev/null
+++ b/audio/Ymuse/Ymuse.info
@@ -0,0 +1,18 @@
+PRGNAM="Ymuse"
+VERSION="0.22"
+HOMEPAGE="https://yktoo.com/en/software/ymuse/"
+DOWNLOAD="https://github.com/yktoo/ymuse/archive/v0.22/ymuse-0.22.tar.gz \
+ https://github.com/fhs/gompd/archive/v2.3.0/gompd-2.3.0.tar.gz \
+ https://github.com/gotk3/gotk3/archive/v0.6.2/gotk3-0.6.2.tar.gz \
+ https://github.com/op/go-logging/archive/970db52/go-logging-970db520ece77730c7e4724c61121037378659d9.tar.gz \
+ https://github.com/pkg/errors/archive/v0.9.1/errors-0.9.1.tar.gz"
+MD5SUM="993681ff5ba64de0fa45071dfa335b63 \
+ 35731c6f0d6bc218a3547dc8e763046b \
+ 068148dd3e66a323b2a1eac1606c3c5a \
+ 508d63d7d54546b779b340bf17b0551d \
+ 0951216925c98fda75a484a528b06af6"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="google-go-lang mpd"
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu@protonmail.com"
diff --git a/audio/Ymuse/doinst.sh b/audio/Ymuse/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/audio/Ymuse/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/audio/Ymuse/modules.txt b/audio/Ymuse/modules.txt
new file mode 100644
index 0000000000..70fef07ced
--- /dev/null
+++ b/audio/Ymuse/modules.txt
@@ -0,0 +1,12 @@
+# github.com/fhs/gompd/v2 v2.3.0
+## explicit
+github.com/fhs/gompd
+# github.com/gotk3/gotk3 v0.6.2
+## explicit
+github.com/gotk3/gotk3
+# github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
+## explicit
+github.com/op/go-logging
+# github.com/pkg/errors v0.9.1
+## explicit
+github.com/pkg/errors
diff --git a/audio/Ymuse/slack-desc b/audio/Ymuse/slack-desc
new file mode 100644
index 0000000000..9b1c806aaf
--- /dev/null
+++ b/audio/Ymuse/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+Ymuse: Ymuse (GTK client for Music Player Daemon)
+Ymuse:
+Ymuse: Ymuse is an easy, functional, and snappy GTK front-end (client) for
+Ymuse: Music Player Daemon written in Go.
+Ymuse:
+Ymuse:
+Ymuse:
+Ymuse:
+Ymuse:
+Ymuse:
+Ymuse: