diff options
author | xiota | 2023-11-30 13:58:38 -0800 |
---|---|---|
committer | xiota | 2023-11-30 14:06:17 -0800 |
commit | 113e549b2f6bfd3586902ce869a76775856e1eb5 (patch) | |
tree | f2ac88d6d6e17bcc09358a9a390decca4aff5d41 | |
parent | 5fd3d8eb94a35ae4cd0320d66ed39ab2469b8d7e (diff) | |
download | aur-113e549b2f6bfd3586902ce869a76775856e1eb5.tar.gz |
Bump to version 0.10.0
Use system electron
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | logseq-desktop.desktop | 10 | ||||
-rw-r--r-- | logseq-desktop.install | 30 | ||||
-rw-r--r-- | logseq-desktop.sh | 15 |
5 files changed, 70 insertions, 64 deletions
@@ -1,18 +1,17 @@ pkgbase = logseq-desktop-bin pkgdesc = Privacy-first, open-source platform for knowledge sharing and management - pkgver = 0.9.20 + pkgver = 0.10.0 pkgrel = 1 url = https://github.com/logseq/logseq install = logseq-desktop.install arch = x86_64 license = AGPL3 + makedepends = asar + makedepends = gendesk + depends = electron provides = logseq-desktop conflicts = logseq-desktop - source = https://github.com/logseq/logseq/releases/download/0.9.20/Logseq-linux-x64-0.9.20.zip - source = logseq-desktop.desktop - source = logseq-desktop.sh - sha256sums = fb9002a317063fd8473c3d08b8ffd0546bc30fbef257747cfafe2bf17e88c3d4 - sha256sums = 12eb07a20c29f9573bbb91e585602a150d5f851cdb15ae43e6319d075b7ecbba - sha256sums = 79749ee5011f229810343fb4a4eeb60de986d541617ead4242ccf0057b263a55 + source = https://github.com/logseq/logseq/releases/download/0.10.0/Logseq-linux-x64-0.10.0.zip + sha256sums = ca7ac5022e3317444562e027566b5afb0641db9421ce199ca8964b07f2512b37 pkgname = logseq-desktop-bin @@ -1,41 +1,63 @@ # Maintainer: Xuanwo <xuanwo@archlinuxcn.org> -_pkgname="logseq-desktop" -pkgname="$_pkgname-bin" -pkgver=0.9.20 +# options +: ${_pkgtype:=bin} + +# basic info +_pkgname=logseq-desktop +pkgname="$_pkgname${_pkgtype:+-$_pkgtype}" +pkgver=0.10.0 pkgrel=1 pkgdesc="Privacy-first, open-source platform for knowledge sharing and management" -arch=("x86_64") url="https://github.com/logseq/logseq" license=('AGPL3') -provides=("logseq-desktop") -conflicts=("logseq-desktop") +arch=("x86_64") + +depends=('electron') +makedepends=( + 'asar' + 'gendesk' +) + +provides=("$_pkgname") +conflicts=("$_pkgname") + install="$_pkgname.install" _pkgsrc="Logseq-linux-x64" source=( - "$url/releases/download/$pkgver/$_pkgsrc-$pkgver.zip" - "$_pkgname.desktop" - "$_pkgname.sh" + "$url/releases/download/$pkgver/$_pkgsrc-$pkgver.zip" ) sha256sums=( - 'fb9002a317063fd8473c3d08b8ffd0546bc30fbef257747cfafe2bf17e88c3d4' - '12eb07a20c29f9573bbb91e585602a150d5f851cdb15ae43e6319d075b7ecbba' - '79749ee5011f229810343fb4a4eeb60de986d541617ead4242ccf0057b263a55' + 'ca7ac5022e3317444562e027566b5afb0641db9421ce199ca8964b07f2512b37' ) +prepare() { + cat <<'EOF' > "$_pkgname.sh" +#!/usr/bin/env sh +set -e +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +if [ -r "${XDG_CONFIG_HOME}/logseq-flags.conf" ]; then + LOGSEQ_USER_FLAGS="$(cat "$XDG_CONFIG_HOME/logseq-flags.conf")" +fi +exec electron /usr/lib/logseq-desktop/app.asar $LOGSEQ_USER_FLAGS "$@" +EOF + + gendesk -q -f -n --pkgname="$_pkgname" --pkgdesc="$pkgdesc" --name="Logseq" --exec="logseq %u" --icon="logseq" --terminal=false --categories="Office" --mimetypes="x-scheme-handler/logseq" --startupnotify=true --custom="StartupWMClass=Logseq" +} + package() { - # desktop file, make minitype works as expected. - install -Dm644 "$srcdir/$_pkgname.desktop" "$pkgdir/usr/share/applications/logseq-desktop.desktop" + # desktop file + install -Dm644 "$_pkgname.desktop" "$pkgdir/usr/share/applications/logseq-desktop.desktop" - # icons - install -Dm644 \ - "$srcdir/$_pkgsrc/resources/app/icons/logseq.png" \ - -t "$pkgdir/usr/share/pixmaps/" + # icons + install -Dm644 "$_pkgsrc/resources/app/icons/logseq.png" \ + -t "$pkgdir/usr/share/pixmaps/" - install -dm755 "$pkgdir/opt/$pkgname" - cp -r "$srcdir/$_pkgsrc"/* "$pkgdir/opt/$pkgname/" + # asar + install -dm755 "$pkgdir/usr/lib/$_pkgname" + asar pack "$_pkgsrc/resources/app" "$pkgdir/usr/lib/$_pkgname/app.asar" - # User flag aware launcher - install -Dm755 "$srcdir/logseq-desktop.sh" "$pkgdir/usr/bin/logseq" + # script + install -Dm755 "logseq-desktop.sh" "$pkgdir/usr/bin/logseq" } diff --git a/logseq-desktop.desktop b/logseq-desktop.desktop deleted file mode 100644 index ae30fb368191..000000000000 --- a/logseq-desktop.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Logseq -Exec=/usr/bin/logseq %u -MimeType=x-scheme-handler/logseq -Terminal=false -Type=Application -Icon=logseq -StartupWMClass=Logseq -Comment=Open Source platform for knowledge sharing and management -Categories=Office diff --git a/logseq-desktop.install b/logseq-desktop.install index 906e9d0635a3..17752157cf95 100644 --- a/logseq-desktop.install +++ b/logseq-desktop.install @@ -1,22 +1,32 @@ # Colored makepkg-like functions msg_blue() { - printf "${blue}==>${bold} $1${all_off}\n" + printf "${BLUE}==>${BOLD} $1${ALL_OFF}\n" } -note() { - printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +note1() { + printf "${BLUE}==>${YELLOW} NOTE:${BOLD} $1${ALL_OFF}\n" } -all_off="$(tput sgr0)" -bold="${all_off}$(tput bold)" -blue="${bold}$(tput setaf 4)" -yellow="${bold}$(tput setaf 3)" +note2() { + printf "${BLUE}==> ${BOLD} $1${ALL_OFF}\n" +} + +ALL_OFF="$(tput sgr0)" +BOLD="${ALL_OFF}$(tput bold)" +BLACK="${BOLD}$(tput setaf 0)" +RED="${BOLD}$(tput setaf 1)" +GREEN="${BOLD}$(tput setaf 2)" +YELLOW="${BOLD}$(tput setaf 3)" +BLUE="${BOLD}$(tput setaf 4)" +MAGENTA="${BOLD}$(tput setaf 5)" +CYAN="${BOLD}$(tput setaf 6)" +WHITE="${BOLD}$(tput setaf 7)" post_install() { - note "Custom flags should be put directly in: ~/.config/logseq-flags.conf" - note "The launcher is called: 'logseq'" + note1 "Custom flags should be put directly in: ~/.config/logseq-flags.conf" + note2 "The launcher is called: 'logseq'" } post_upgrade() { - post_install + post_install } diff --git a/logseq-desktop.sh b/logseq-desktop.sh deleted file mode 100644 index 10f3fd362bc6..000000000000 --- a/logseq-desktop.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh -# Launches Logseq with flags specified in $XDG_CONFIG_HOME/logseq-flags.conf - -# Make script fail if `cat` fails for some reason -set -e - -# Set default value if variable is unset/null -XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" - -# Attempt to read a config file if it exists -if [ -r "${XDG_CONFIG_HOME}/logseq-flags.conf" ]; then - LOGSEQ_USER_FLAGS="$(cat "$XDG_CONFIG_HOME/logseq-flags.conf")" -fi - -exec /opt/logseq-desktop-bin/Logseq $LOGSEQ_USER_FLAGS "$@" |