diff options
author | thynkon | 2022-01-08 20:25:18 +0100 |
---|---|---|
committer | thynkon | 2022-01-08 20:28:36 +0100 |
commit | 48330b33d11d8eb9320bd1ad9dc4aee75affebf7 (patch) | |
tree | ae66d46fd64a1466788927dce09626ba22ef1a44 | |
parent | c8acbb7ac1bd3be961a2b126f91600269f8592fe (diff) | |
download | aur-48330b33d11d8eb9320bd1ad9dc4aee75affebf7.tar.gz |
Add symlink in /usr/bin and cleanup PKGBUILD
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 33 |
2 files changed, 20 insertions, 16 deletions
@@ -1,11 +1,12 @@ pkgbase = joplin-appimage pkgdesc = The latest stable AppImage of Joplin - a cross-platform note taking and to-do app pkgver = 2.6.10 - pkgrel = 1 + pkgrel = 4 url = https://github.com/laurent22/joplin arch = x86_64 license = MIT depends = fuse2 + conflicts = joplin-desktop options = !strip source = https://github.com/laurent22/joplin/releases/download/v2.6.10/Joplin-2.6.10.AppImage source = https://github.com/laurent22/joplin/raw/v2.6.10/LICENSE @@ -2,7 +2,7 @@ pkgname=joplin-appimage pkgver=2.6.10 -pkgrel=3 +pkgrel=4 pkgdesc="The latest stable AppImage of Joplin - a cross-platform note taking and to-do app" arch=('x86_64') url="https://github.com/laurent22/joplin" @@ -10,7 +10,6 @@ license=('MIT') conflicts=('joplin-desktop') depends=('fuse2') options=(!strip) # necessary otherwise the AppImage file in the package is truncated -_filename=Joplin-$pkgver.AppImage source=( ${url}/releases/download/v${pkgver}/Joplin-${pkgver}.AppImage ${url}/raw/v${pkgver}/LICENSE @@ -19,38 +18,42 @@ sha512sums=( 05cecb22db1addf36ec54b08f8891998b59c5c15d62fec73067b371cad298c7916954175f85941b195b6e4a19cdb7e197682ae9e8653e58cb362a0af8e50d872 SKIP ) +_filename="Joplin-${pkgver}.AppImage" _squashfs_desktop_file="@joplinapp-desktop.desktop" _desktop_file="/usr/share/applications/joplin.desktop" _no_desktop_integration_file="/usr/share/appimagekit/no_desktopintegration" +_appimage_name=$(echo "${_filename}"|sed -E 's/-[0-9]*.[0-9]*.[0-9]*//') +_install_path="/opt/appimages/${_appimage_name}" package() { - chmod +x $_filename + 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=${INSTALL_PATH}|" squashfs-root/@joplinapp-desktop.desktop + ./${_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 + sed -i -E "s|Exec=AppRun|Exec=${_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 -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 # disable AppimageLauncher integration prompt # https://github.com/TheAssassin/AppImageLauncher/issues/78#issuecomment-466390939 - sed -i -E "s|Exec=/opt/appimages/Joplin.AppImage|Exec=APPIMAGELAUNCHER_DISABLE=1 /opt/appimages/Joplin.AppImage|" "squashfs-root/${_squashfs_desktop_file}" + sed -i -E "s|Exec=${_install_path}|Exec=APPIMAGELAUNCHER_DISABLE=1 /usr/bin/joplin-desktop|" "squashfs-root/${_squashfs_desktop_file}" install -Dm644 "squashfs-root/${_squashfs_desktop_file}" "${pkgdir}/${_desktop_file}" - install -Dm755 "$_filename" "$pkgdir$INSTALL_PATH" + install -Dm755 "${_filename}" "${pkgdir}/${_install_path}" + mkdir "${pkgdir}/usr/bin/" && chmod 755 "${pkgdir}/usr/bin/" + ln -s "${_install_path}" "${pkgdir}/usr/bin/joplin-desktop" # install license file - install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/joplin-appimage/LICENSE" + 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" + install -dm755 "${pkgdir}/usr/share/appimagekit" touch "${pkgdir}/${_no_desktop_integration_file}" chmod 644 "${pkgdir}/${_no_desktop_integration_file}" } |