diff options
author | Isaac Yu <isaacyu1@isaacyu1.com> | 2022-12-01 22:53:36 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-12-03 09:09:17 +0700 |
commit | 41a23e4882c831037d603942cb13d715d7c2ed18 (patch) | |
tree | 795b2af146ef767bda385fd928912377b1e79450 /network/whalebird | |
parent | f743075978a86df439f719bca0bf9eb6d2983ef3 (diff) |
network/whalebird: Added (mastodon client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/whalebird')
-rw-r--r-- | network/whalebird/README | 4 | ||||
-rw-r--r-- | network/whalebird/doinst.sh | 9 | ||||
-rw-r--r-- | network/whalebird/electron-builder.yml | 19 | ||||
-rw-r--r-- | network/whalebird/slack-desc | 19 | ||||
-rw-r--r-- | network/whalebird/whalebird.SlackBuild | 124 | ||||
-rw-r--r-- | network/whalebird/whalebird.desktop | 9 | ||||
-rw-r--r-- | network/whalebird/whalebird.info | 10 |
7 files changed, 194 insertions, 0 deletions
diff --git a/network/whalebird/README b/network/whalebird/README new file mode 100644 index 0000000000000..f38b8aef9d709 --- /dev/null +++ b/network/whalebird/README @@ -0,0 +1,4 @@ +Whalebird is an Electron based Mastodon, Pleroma and Misskey client. + +This SlackBuild builds Whalebird from source. The build requires +network access - it downloads external node modules with root access. diff --git a/network/whalebird/doinst.sh b/network/whalebird/doinst.sh new file mode 100644 index 0000000000000..65c7e2eeb9aa5 --- /dev/null +++ b/network/whalebird/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/network/whalebird/electron-builder.yml b/network/whalebird/electron-builder.yml new file mode 100644 index 0000000000000..4c7cba0ac228d --- /dev/null +++ b/network/whalebird/electron-builder.yml @@ -0,0 +1,19 @@ +productName: "Whalebird" +appId: "org.whalebird.desktop" +artifactName: "${productName}-${version}-${os}-${arch}.${ext}" +directories: + output: "build" +extraResources: + - "build/sounds/*" + - "build/icons/*" +files: + - "dist/electron/**/*" + - "build/icons/*" + +linux: + icon: "build/icons" + target: + - target: "dir" + arch: + - "x64" + category: "Network" diff --git a/network/whalebird/slack-desc b/network/whalebird/slack-desc new file mode 100644 index 0000000000000..64b90cb349141 --- /dev/null +++ b/network/whalebird/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------------------------------------------------------| +whalebird: whalebird (Mastondon, Pleroma and Misskey client) +whalebird: +whalebird: Whalebird is an Electron based Mastodon, Pleroma and Misskey client. +whalebird: +whalebird: +whalebird: +whalebird: +whalebird: +whalebird: +whalebird: +whalebird: diff --git a/network/whalebird/whalebird.SlackBuild b/network/whalebird/whalebird.SlackBuild new file mode 100644 index 0000000000000..5b19a0489fe88 --- /dev/null +++ b/network/whalebird/whalebird.SlackBuild @@ -0,0 +1,124 @@ +#!/bin/bash + +# Slackware build script for whalebird + +# Copyright 2022 Isaac Yu <isaacyu1@isaacyu1.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=whalebird +VERSION=${VERSION:-4.7.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +ELECTRONVER=$(</usr/share/electron19/version) + +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 $PRGNAM-desktop-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-desktop-$VERSION +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 {} \; + +rm -f electron-builder.json + +# Prevent creation of cache files in /usr/local/share/ +export YARN_DISABLE_SELF_UPDATE_CHECK=true YARN_CACHE_FOLDER=$TMP/$PRGNAM-desktop-$VERSION/cache/yarn + +yarn upgrade "electron@$ELECTRONVER" --ignore-engines + +cp $CWD/electron-builder.yml electron-builder.yml +make build +yarn exec \ + electron-builder --linux --dir --config electron-builder.yml \ + -c.electronDist=/usr/share/electron19 -c.electronVersion="$ELECTRONVER" + +mkdir -p "$PKG/usr/bin" +mkdir -p "$PKG/usr/share" +cp -r "build/linux-unpacked" "$PKG/usr/share/$PRGNAM" +ln -sr "$PKG/usr/share/$PRGNAM/$PRGNAM" "$PKG/usr/bin/$PRGNAM" + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Install icon files +for i in 16 32 128 256 512; do + install -Dm644 "build/icons/icon.iconset/icon_${i}x${i}.png" \ + "$PKG/usr/share/icons/hicolor/${i}x${i}/apps/whalebird.png" +done +install -Dm644 "build/icons/icon.iconset/icon_32x32@2x.png" \ + "$PKG/usr/share/icons/hicolor/64x64/apps/whalebird.png" + +# Install desktop shortcut +install -Dm644 $CWD/whalebird.desktop "$PKG/usr/share/applications/whalebird.desktop" + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + CHANGELOG.md LICENSE.txt 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/network/whalebird/whalebird.desktop b/network/whalebird/whalebird.desktop new file mode 100644 index 0000000000000..61d5310513211 --- /dev/null +++ b/network/whalebird/whalebird.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Whalebird +Comment=Electron-based Mastodon/Pleroma/Misskey client +Exec=whalebird +Icon=whalebird +Categories=Network; +Terminal=false diff --git a/network/whalebird/whalebird.info b/network/whalebird/whalebird.info new file mode 100644 index 0000000000000..a3b001f263fee --- /dev/null +++ b/network/whalebird/whalebird.info @@ -0,0 +1,10 @@ +PRGNAM="whalebird" +VERSION="4.7.2" +HOMEPAGE="https://whalebird.social" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://github.com/h3poteto/whalebird-desktop/archive/refs/tags/4.7.2/whalebird-4.7.2.tar.gz" +MD5SUM_x86_64="3c4930a60fc43f45936aca576056d1df" +REQUIRES="electron yarn" +MAINTAINER="Isaac Yu" +EMAIL="isaacyu1@isaacyu1.com" |