makedeb


joplin-appimage 2.9.17-1


The latest stable AppImage of Joplin - a cross-platform note taking and to-do app

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for joplin-appimage.

# Maintainer: thesting <fxcw_vacilon@slmail.me>
#  Package from AUR https://aur.archlinux.org/packages/joplin-appimage/
pkgname=joplin-appimage
_pkgname=joplin
pkgver=2.9.17
pkgrel=1
pkgdesc="The latest stable AppImage of Joplin - a cross-platform note taking and to-do app"
arch=('amd64')
license=('MIT')
depends=('fuse2fs')
options=(!strip)
url="https://github.com/laurent22/joplin"
_filename="Joplin-${pkgver}.AppImage"

source=(
  ${url}/releases/download/v${pkgver}/Joplin-${pkgver}.AppImage
  ${url}/raw/v${pkgver}/LICENSE
)
sha512sums=(
  ca201a5a9239ef1749c8b6a07d97f36a8c3d1b7b4ecc4a5f0074f4b9ee6b9ac966cc2fa6a277ea08f433f8a0a2554b68b7d73a0e1b9adf74b8c0e865ff30b47d
  SKIP
)


package() {
    chmod +x $_filename
    mkdir -p squashfs-root/usr/share/icons/hicolor/{72x72,16x16}/apps
    ./$_filename --appimage-extract "usr/share/icons/hicolor/*/apps/@joplinapp-desktop.png" > /dev/null 2>&1
    ./$_filename --appimage-extract @joplinapp-desktop.desktop > /dev/null 2>&1
    INSTALL_PATH="/opt/appimages/Joplin.AppImage"
    sed -i -E "s|Exec=AppRun|Exec=env APPIMAGELAUNCHER_DISABLE=true ${INSTALL_PATH}|" squashfs-root/@joplinapp-desktop.desktop
    sed -i -E "s|Icon=joplin|Icon=@joplinapp-desktop|" squashfs-root/@joplinapp-desktop.desktop

    # install icons
    install -dm755 "$pkgdir/usr/share/icons"
    cp -dpr --no-preserve=ownership "squashfs-root/usr/share/icons" "$pkgdir/usr/share"
    chmod -R 755 "$pkgdir/usr/share/icons"
    find "$pkgdir/usr/share/icons" -type f -name "@joplinapp-desktop.png" -exec chmod 644 {} \;

    # install .desktop file and image file
    install -Dm644 "squashfs-root/@joplinapp-desktop.desktop" "$pkgdir/usr/share/applications/joplin.desktop"
    install -Dm755 "$_filename" "$pkgdir$INSTALL_PATH"

    # install license file
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/joplin-appimage/LICENSE"

    # disable AppImage integration prompt
    # https://github.com/electron-userland/electron-builder/issues/1962
    install -dm755 "$pkgdir/usr/share/appimagekit"
    touch "$pkgdir/usr/share/appimagekit/no_desktopintegration"
    chmod 644 "$pkgdir/usr/share/appimagekit/no_desktopintegration"
}