user/protonmail-desktop: new aport
This commit is contained in:
parent
396c98208d
commit
e3a8276089
2 changed files with 75 additions and 0 deletions
69
user/protonmail-desktop/APKBUILD
Normal file
69
user/protonmail-desktop/APKBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=protonmail-desktop
|
||||
pkgver=1.0.6
|
||||
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="
|
||||
https://github.com/ProtonMail/inbox-desktop/releases/download/$pkgver/inbox-desktop-$pkgver-source.zip
|
||||
|
||||
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="
|
||||
a9307c41d7b078be6066b36f52b2d198fc6751f4e8014f6f47c4c1d14b3a86b419e8338b080632e3accc551e6f5fc753e1798ba6adaf73ac333cb4f975553d47 inbox-desktop-1.0.6-source.zip
|
||||
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