blob: f584eb3ac7d8aa3ed3ead61b314e064655965b23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Maintainer: thynkon <thynkon at protonmail dot com>
pkgname=joplin-appimage
pkgver=1.4.19
pkgrel=1
pkgdesc="The latest pre-released AppImage of Joplin - a cross-platform note taking and to-do app"
arch=('x86_64')
url="https://github.com/laurent22/joplin"
license=('MIT')
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
)
sha512sums=(
27aac7ba395ec02283cc36906a7ce52153ba9b9c6dc612d405f2619a3a7bc77040c9c171b9d1a7efa3518edad2003487e297ee8aedc2b07931c8ebf32c783b45
SKIP
)
package() {
echo
echo " _ _ _ "
echo " | | ___ _ __ | (_)_ __ "
echo " _ | |/ _ \| '_ \| | | '_ \ "
echo "| |_| | (_) | |_) | | | | | |"
echo " \___/ \___/| .__/|_|_|_| |_|"
echo " |_| "
echo
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
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"
# 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"
}
|