aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorIsaac Yu <isaacyu1@isaacyu1.com>2023-03-27 17:46:21 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-01 09:14:30 +0700
commit61244bcf86f69d98661702a88fecc3058d22992e (patch)
tree199b30af53b987f82ec3423194534aefcbb7556a /network
parentfdd9c91b1c457aeb72c6b5405d70d599a93f9dff (diff)
network/whalebird: Updated for version 5.0.2, binary repackaging.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/whalebird/README4
-rw-r--r--network/whalebird/electron-builder.yml19
-rw-r--r--network/whalebird/whalebird.SlackBuild57
-rw-r--r--network/whalebird/whalebird.desktop9
-rw-r--r--network/whalebird/whalebird.info8
5 files changed, 17 insertions, 80 deletions
diff --git a/network/whalebird/README b/network/whalebird/README
index f38b8aef9d709..f138e940fa14b 100644
--- a/network/whalebird/README
+++ b/network/whalebird/README
@@ -1,4 +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.
+This SlackBuild repackages the upstream rpm package. This rpm is only
+available for 64-bit systems.
diff --git a/network/whalebird/electron-builder.yml b/network/whalebird/electron-builder.yml
deleted file mode 100644
index 4c7cba0ac228d..0000000000000
--- a/network/whalebird/electron-builder.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-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/whalebird.SlackBuild b/network/whalebird/whalebird.SlackBuild
index d2b027beab9ef..459c5d4faf81d 100644
--- a/network/whalebird/whalebird.SlackBuild
+++ b/network/whalebird/whalebird.SlackBuild
@@ -25,12 +25,12 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=whalebird
-VERSION=${VERSION:-5.0.1}
+VERSION=${VERSION:-5.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-ELECTRONVER=$(</usr/share/electron/version)
+SRCNAM=Whalebird
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -49,28 +49,19 @@ 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"
+if [ "$ARCH" = "x86_64" ]; then
+ PACKAGESUFFIX="x64"
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ echo "$ARCH is not supported for $PRGNAM-$VERSION." >&2
+ exit 1
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-desktop-$VERSION
-tar xvf $CWD/$PRGNAM-desktop-$VERSION.tar.gz
-cd $PRGNAM-desktop-$VERSION
+cd $PKG
+bsdtar -xvf $CWD/${SRCNAM}-${VERSION}-linux-${PACKAGESUFFIX}.rpm
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -78,41 +69,15 @@ find -L . \
\( -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/electron -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"
+# Fix sbopkglint gripes - icon resolution directory should be 310x150 rather than 310x310
+mv $PKG/usr/share/icons/hicolor/310x310 $PKG/usr/share/icons/hicolor/310x150
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- CHANGELOG.md LICENSE.txt README.md \
+ $PKG/opt/Whalebird/LICENSE.electron.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/network/whalebird/whalebird.desktop b/network/whalebird/whalebird.desktop
deleted file mode 100644
index 61d5310513211..0000000000000
--- a/network/whalebird/whalebird.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[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
index 7cde2a4241c19..34c1cec4f805c 100644
--- a/network/whalebird/whalebird.info
+++ b/network/whalebird/whalebird.info
@@ -1,10 +1,10 @@
PRGNAM="whalebird"
-VERSION="5.0.1"
+VERSION="5.0.2"
HOMEPAGE="https://whalebird.social"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
-DOWNLOAD_x86_64="https://github.com/h3poteto/whalebird-desktop/archive/refs/tags/v5.0.1/whalebird-desktop-5.0.1.tar.gz"
-MD5SUM_x86_64="6d15e120f33a1360bcdc2ceefa3e7726"
-REQUIRES="electron yarn"
+DOWNLOAD_x86_64="https://github.com/h3poteto/whalebird-desktop/releases/download/v5.0.2/Whalebird-5.0.2-linux-x64.rpm"
+MD5SUM_x86_64="e08f41b1784d1e85383af9172e80032b"
+REQUIRES=""
MAINTAINER="Isaac Yu"
EMAIL="isaacyu1@isaacyu1.com"