# Contributor: Antoine Martin (ayakael) # Maintainer: Antoine Martin (ayakael) 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 "