summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a5a1009586225b7e75a47efab5d95420cd8ea01 (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
# Maintainer: Asuka Minato <i at asukaminato dot eu dot org>
pkgname=flomo-electron
pkgver=3.23.111
pkgrel=1
pkgdesc="浮墨笔记,像发微博一样记笔记,记录你想法的川流.全平台覆盖,还支持微信服务号输入."
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="https://flomoapp.com/"
license=('private')
depends=(electron18 bash)
makedepends=(p7zip)
provides=(flomo)
conflicts=(flomo-pake)
source=("local://flomo-${pkgver}-x64.exe" $pkgname.desktop)
sha256sums=('da41994cc06fd9c1b7f4458fee588ef4ba9fce570731ef762bd6e49bc2a6d29b'
            '1b616181e37f172ef3664103774ad6eb245fda9c2f11dad2534c719da5135afa')

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 electron18 /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/$pkgname.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/ \;
}