blob: 9a265fea232715b62994dfd83c1da99e51ace838 (
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
|
# Maintainer: thynkon <thynkon at protonmail dot com>
pkgname=joplin-appimage
pkgver=1.3.10
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=(
9564f1690ad2c14867406ab32bbb71cd23724cffa7b5bc276076435b8904a1fce154b5819ec6597273b6a1e1c3e1d3d7f25b038fdf286a79084fda652a42c345
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/joplin.png" > /dev/null 2>&1
./$_filename --appimage-extract joplin.desktop > /dev/null 2>&1
INSTALL_PATH="/opt/appimages/Joplin.AppImage"
sed -i -E "s|Exec=AppRun|Exec=${INSTALL_PATH}|" squashfs-root/joplin.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 "joplin.png" -exec chmod 644 {} \;
# install .desktop file and image file
install -Dm644 "squashfs-root/joplin.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"
}
|