WIP: user/protonmail-desktop: new aport #667
2 changed files with 77 additions and 0 deletions
71
user/protonmail-desktop/APKBUILD
Normal file
71
user/protonmail-desktop/APKBUILD
Normal file
|
@ -0,0 +1,71 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=protonmail-desktop
|
||||
pkgver=1.3.0
|
||||
_gittag=cb54f812c1445a21d5db74039364c5d17b94f2ae
|
||||
# uses monorepo that doesn't tag releases specifically for this application
|
||||
pkgrel=0
|
||||
pkgdesc="Desktop application for Mail and Calendar, made with Electron"
|
||||
url="https://github.com/ProtonMail/inbox-desktop"
|
||||
# same as electron
|
||||
arch="aarch64 x86_64"
|
||||
license="GPL-3.0-only"
|
||||
depends="electron"
|
||||
makedepends="npm findutils coreutils"
|
||||
options="net !check"
|
||||
|
||||
source="
|
||||
$pkgname-$_gittag.tar.gz::https://github.com/ProtonMail/WebClients/archive/$_gittag.tar.gz
|
||||
|
||||
protonmail-desktop
|
||||
"
|
||||
builddir="$srcdir"
|
||||
|
||||
build() {
|
||||
npm install --ignore-scripts
|
||||
npx --yes patch-package
|
||||
npx tsc
|
||||
rm -r node_modules
|
||||
npm install --ignore-scripts --production
|
||||
npx --yes patch-package
|
||||
}
|
||||
|
||||
package() {
|
||||
local appdir=/usr/lib/caprine
|
||||
|
||||
install -d "$pkgdir"$appdir
|
||||
cp -r ./* "$pkgdir"$appdir
|
||||
|
||||
install -dm755 "$pkgdir/usr/share/pixmaps"
|
||||
install -m644 build/icon.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
|
||||
|
||||
install -Dm755 "$srcdir"/caprine.sh "$pkgdir"/usr/bin/caprine
|
||||
install -Dm644 "$srcdir"/caprine.desktop \
|
||||
"$pkgdir"/usr/share/applications/caprine.desktop
|
||||
|
||||
install -dm755 "$pkgdir"/usr/share/licenses/caprine
|
||||
ln -s "$(realpath -m --relative-to=/usr/share/licenses/caprine $appdir/license)" \
|
||||
"$pkgdir"/usr/share/licenses/caprine
|
||||
|
||||
# Clean up
|
||||
rm -r "$pkgdir"$appdir/build
|
||||
rm -r "$pkgdir"$appdir/source
|
||||
rm -r "$pkgdir"$appdir/tsconfig.json
|
||||
find "$pkgdir"$appdir \
|
||||
-name "package.json" \
|
||||
-exec sed -e "s|$srcdir/caprine|$appdir|" \
|
||||
-i {} \; \
|
||||
-or -name ".*" -prune -exec rm -r '{}' \; \
|
||||
-or -name "bin" -prune -exec rm -r '{}' \; \
|
||||
-or -name "example" -prune -exec rm -r '{}' \; \
|
||||
-or -name "examples" -prune -exec rm -r '{}' \; \
|
||||
-or -name "man" -prune -exec rm -r '{}' \; \
|
||||
-or -name "scripts" -prune -exec rm -r '{}' \; \
|
||||
-or -name "test" -prune -exec rm -r '{}' \;
|
||||
}
|
||||
|
||||
|
||||
sha512sums="
|
||||
680b7789ee530a292a4488bae33acb1d8b8dd6d43cb04b4d189c1222e5d1f056f75c5a25bcaabec6177812b23fc0a675a16c6a68e99ddfe3b507bb1d99ab3507 protonmail-desktop-cb54f812c1445a21d5db74039364c5d17b94f2ae.tar.gz
|
||||
f153db89ae3e4c23bcb59a6b8fe4f234b6b3478b6b4124b303fac3ccbe366627107d34359b808104437a86524963ef3ef7bb37833600fa452183f6f1226a51f6 protonmail-desktop
|
||||
"
|
6
user/protonmail-desktop/protonmail-desktop
Executable file
6
user/protonmail-desktop/protonmail-desktop
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# app chooses config (including used endpoints) based on this
|
||||
export NODE_ENV=production
|
||||
|
||||
exec electron /usr/lib/protonmail-desktop/app.asar
|
Loading…
Reference in a new issue