blob: 5d4af24d0d4e439c7dab27ba9ba9b5a098d9426b (
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: silenf positron1998@gmail.com
# Maintainer: thynkon <thynkon at pm dot me>
pkgname=joplin-appimage
pkgver=1.0.237
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=(
7a5149ddafcbee12928ab0d2e88365490b7da10881e27a825a268286f68137f19f54a570aa198946a13496a870c81c6bec43ea90921b734070fb8f8a6a1106cc
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"
}
|