blob: b1f732a4cf16df7503a7743d31e5682df311f5f5 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# Maintainer: Feakster <feakster at posteo dot eu>
### Info ###
pkgname=simplenote-electron-arm-bin
_pkgname=${pkgname%-electron-arm-bin}
pkgver=2.11.0
_appimage="simplenote-electron-${pkgver}-${CARCH}.AppImage"
pkgrel=1
pkgdesc='The simplest way to keep notes'
arch=('armv7h' 'aarch64')
url='https://github.com/Automattic/simplenote-electron'
license=('GPL2')
depends=('gtk3' 'hicolor-icon-theme' 'libxss' 'mesa' 'nss')
optdepends=(
'libnotify: desktop notifications'
'noto-fonts-emoji: emoji support'
'ttf-joypixels: emoji support'
)
makedepends=('zlib')
provides=('simplenote')
options=(!strip)
source_armv7h=("simplenote-electron-${pkgver}-armv7h.AppImage"::"${url}/releases/download/v${pkgver}/Simplenote-linux-${pkgver}-armv7l.AppImage")
source_aarch64=("simplenote-electron-${pkgver}-aarch64.AppImage"::"${url}/releases/download/v${pkgver}/Simplenote-linux-${pkgver}-arm64.AppImage")
noextract=("${source[@]%%::*}")
b2sums_armv7h=('bd47339d8cd0049bb672cd7205e30773d4acc2bc2e353b0cbe6c7400287180e4d9eee24088bebb243b0d8f21c7f732e3b6734a2333433dc8c4930a2a226520dd')
b2sums_aarch64=('7cc61ee448a876ac2a3c2c27a7739f359c879b003acf21ea26eabd6d3e3bf0f576fb96dfc026a0b7d6acc871f500b6447cada2c8cd1b952cc298c5b56fd3bfb9')
### Prepare ###
prepare() {
## Change Directory ##
cd "$srcdir"
## Mark AppImage as Executable ##
chmod a+x $_appimage
## Extract AppImage into squashfs-root Directory ##
./$_appimage --appimage-extract
## Remove Unneccessary Files ##
rm squashfs-root/{.DirIcon,AppRun,$_pkgname.png}
## Fix Permissions ##
find squashfs-root -type d -exec chmod 0755 {} \;
find squashfs-root -type f -name '*.so' -exec chmod 0755 {} \;
## Modify Desktop File ##
sed -i \
-e "s|^Exec=AppRun$|Exec=${_pkgname}|" \
-e '/^TryExec=.*/d' \
-e '/^X-AppImage-Version=.*/d' \
squashfs-root/${_pkgname}.desktop
echo "TryExec=/opt/${_pkgname}/${_pkgname}" >> squashfs-root/${_pkgname}.desktop
}
### Package ###
package() {
## Move AppImage Contents to /opt/$_pkgname ##
install -dm0755 "$pkgdir"/opt/$_pkgname
cp -RT "$srcdir"/squashfs-root "$pkgdir"/opt/$_pkgname
## SUID Sandbox ##
chmod 4755 "$pkgdir"/opt/$_pkgname/chrome-sandbox
## Executable Binary ##
install -dm0755 "$pkgdir"/usr/bin
ln -fs \
/opt/$_pkgname/$_pkgname \
"$pkgdir"/usr/bin/$_pkgname
## Replace Shared Objects with Symlinks ##
for SO in EGL GLESv2 vulkan
do
ln -fs \
/usr/lib/lib${SO}.so \
"$pkgdir"/opt/$_pkgname/lib${SO}.so
done
## Install Icons ##
for SIZE in 16 32 48 64 128 256 512 1024
do
install -dm0755 "$pkgdir"/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
ln -fs \
/opt/$_pkgname/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/${_pkgname}.png \
"$pkgdir"/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/${_pkgname}.png
done
## Desktop Icon ##
install -dm0755 "$pkgdir"/usr/share/applications
ln -fs \
/opt/$_pkgname/${_pkgname}.desktop \
"$pkgdir"/usr/share/applications/${_pkgname}.desktop
## Licenses ##
install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
ln -fs \
/opt/$_pkgname/LICENSE.electron.txt \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.electron.txt
ln -fs \
/opt/$_pkgname/LICENSES.chromium.html \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSES.chromium.html
}
|