blob: bfd2c48bca12275f11a7c8b4e111e76ed54570c8 (
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
|
# Maintainer: Asuka Minato <i at asukaminato dot eu dot org>
pkgname=flomo-electron
pkgver=5.24.32
pkgrel=1
pkgdesc="浮墨笔记,像发微博一样记笔记,记录你想法的川流.全平台覆盖,还支持微信服务号输入."
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="https://flomoapp.com/"
license=('private')
depends=(electron21 bash hicolor-icon-theme)
makedepends=(p7zip)
provides=(flomo)
conflicts=(flomo-pake)
source=("local://flomo-${pkgver}.exe" $pkgname.desktop)
sha256sums=('2d95e96dc0f9fa6e4b2448687ae4c4a37405f33eb89eedc6a333d00cfe27e8ce'
'ad1d9d71bd7f6765f1caef32532e233def9e09632262b3cfbc909e042b6961ef')
prepare() {
7z x *.exe
find . -name "app-64.7z" -print -exec 7z x {} \;
find . -name "app.asar" -print -exec asar e {} ./app \;
find . \( -name "*.map" -or -name "*.gz" \) -print -delete
}
package() {
install -vd $pkgdir/opt/$pkgname
cp -av $srcdir/app $pkgdir/opt/$pkgname
printf "desktop file\n"
printf "#!/bin/sh
exec electron21 /opt/$pkgname/app \"\$@\"
" | install -Dm755 /dev/stdin $pkgdir/usr/bin/flomo
printf "icon\n"
find $srcdir -name "logo-512.*.png" -path "*/app/img/*" -print -exec install -vDm644 {} $pkgdir/usr/share/pixmaps/flomo.png \;
printf "different sized icons\n"
for i in 16 24 32 48 64 128 256 512 1024; do
install -vDm644 $srcdir/app/icons/${i}x${i}.png -t $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png
done
printf "desktop\n"
find $srcdir -name "*.desktop" -exec install -vDm644 {} -t $pkgdir/usr/share/applications/ \;
find $pkgdir -path "*/node_modules/*/bin/*" -printf "rm %p\n" -type f -delete
find $pkgdir \( -name "cli.js" -or -name "bin.js" \) -path "*/node_modules/*" -printf "rm %p\n" -type f -delete
find $pkgdir -type d -empty -delete
}
|