audio/Ymuse: Added (GTK frontend for mpd).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Isaac Yu 2024-05-22 22:16:11 +07:00 committed by Willy Sudiarto Raharjo
parent 364d84fbba
commit fda74dc5b5
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
6 changed files with 183 additions and 0 deletions

2
audio/Ymuse/README Normal file
View File

@ -0,0 +1,2 @@
Ymuse is an easy, functional, and snappy GTK front-end (client) for
Music Player Daemon written in Go.

View File

@ -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

18
audio/Ymuse/Ymuse.info Normal file
View File

@ -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"

9
audio/Ymuse/doinst.sh Normal file
View File

@ -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

12
audio/Ymuse/modules.txt Normal file
View File

@ -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

19
audio/Ymuse/slack-desc Normal file
View File

@ -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: