summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO32
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD55
-rw-r--r--whalebird.sh16
4 files changed, 69 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5b40751bf711..35807ad488e4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,16 @@
pkgbase = whalebird-bin
- pkgdesc = An Electron based Mastodon client for Windows, Mac and Linux
- pkgver = 3.0.3
+ pkgdesc = An Electron based Mastodon, Pleroma, and Misskey client
+ pkgver = 6.1.0
pkgrel = 1
- url = https://whalebird.org/
+ url = https://whalebird.social/
arch = x86_64
- license = MIT
- depends = c-ares
- depends = ffmpeg
- depends = gtk3
- depends = http-parser
- depends = libevent
- depends = libvpx
- depends = libxslt
- depends = libxss
- depends = minizip
- depends = nss
- depends = re2
- depends = snappy
- depends = libnotify
- depends = libappindicator-gtk3
- source = https://github.com/h3poteto/whalebird-desktop/releases/download/3.0.3/Whalebird-3.0.3-linux-x64.rpm
- sha256sums = cab4c85b9760f16bdd88d98a359538894a50e71119d0eda45c0a564072495da8
+ license = GPL-3.0-only
+ depends = electron27
+ provides = whalebird=6.1.0
+ conflicts = whalebird
+ source = whalebird-6.1.0.deb::https://github.com/h3poteto/whalebird-desktop/releases/download/v6.1.0/Whalebird-6.1.0-linux-amd64.deb
+ source = whalebird.sh
+ sha256sums = 0981079ba593b8d7b4519b9923f77344da44672f9b847e0c29510cd6bf4ce73a
+ sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8
pkgname = whalebird-bin
-
diff --git a/.gitignore b/.gitignore
index 01caf260c8dc..381b9eefbe6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-pkg
-src
-*.pkg.*
-*.rpm
+*
+
+!.SRCINFO
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
index b8b56f1877d9..4d426a71cc98 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,40 @@
-# Maintainer: Mélanie Chauvel (ariasuni) <perso@hack-libre.org>
-
-_appname=whalebird
-pkgname="$_appname-bin"
-pkgver=3.0.3
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+# Maintainer : Biginoz
+# Contributor : Kr1ss $(echo \<kr1ss+x-yandex+com\>|sed s/\+/./g\;s/\-/@/)
+# Contributor : Mélanie Chauvel (ariasuni) <perso@hack-libre.org>
+pkgname=whalebird-bin
+_pkgname=Whalebird
+pkgver=6.1.0
+_electronversion=27
pkgrel=1
-pkgdesc='An Electron based Mastodon client for Windows, Mac and Linux'
-arch=(x86_64)
-url='https://whalebird.org/'
-license=(MIT)
-depends=(c-ares ffmpeg gtk3 http-parser libevent libvpx libxslt libxss minizip nss re2 snappy libnotify libappindicator-gtk3)
-source=("https://github.com/h3poteto/whalebird-desktop/releases/download/$pkgver/Whalebird-$pkgver-linux-x64.rpm")
-sha256sums=('cab4c85b9760f16bdd88d98a359538894a50e71119d0eda45c0a564072495da8')
-
-package() {
- cp -R opt/ usr/ "$pkgdir"
- mkdir "$pkgdir/usr/bin"
- ln -s /opt/Whalebird/whalebird "$pkgdir/usr/bin/whalebird"
+pkgdesc="An Electron based Mastodon, Pleroma, and Misskey client"
+arch=('x86_64')
+url="https://whalebird.social/"
+_ghurl="https://github.com/h3poteto/whalebird-desktop"
+license=('GPL-3.0-only')
+provides=("${pkgname%-bin}=${pkgver}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-amd64.deb"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('0981079ba593b8d7b4519b9923f77344da44672f9b847e0c29510cd6bf4ce73a'
+ 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
+build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@runname@|app.asar|g" \
+ -e "s|@options@||g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
+ bsdtar -xf "${srcdir}/data."*
+ sed "s|/opt/${_pkgname}/${pkgname%-bin}|${pkgname%-bin}|g" -i "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/opt/${_pkgname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${srcdir}/usr/share/icons/hicolor/256x256/apps/${pkgname%-bin}.png" -t"${pkgdir}/usr/share/pixmaps"
+} \ No newline at end of file
diff --git a/whalebird.sh b/whalebird.sh
new file mode 100644
index 000000000000..7ddcaab8d734
--- /dev/null
+++ b/whalebird.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -e
+_APPDIR="/usr/lib/@appname@"
+_RUNNAME="${_APPDIR}/@runname@"
+_OPTIONS="@options@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export ELECTRON_FORCE_IS_PACKAGED=true
+export NODE_ENV=production
+cd "${_APPDIR}"
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
+else
+ exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
+fi \ No newline at end of file