ayaports/user/protonmail-desktop/APKBUILD

72 lines
2.3 KiB
Text
Raw Normal View History

2024-11-07 19:09:48 +00:00
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=protonmail-desktop
2024-11-10 21:03:52 +00:00
pkgver=1.3.0
_gittag=cb54f812c1445a21d5db74039364c5d17b94f2ae
# uses monorepo that doesn't tag releases specifically for this application
2024-11-07 19:09:48 +00:00
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="
2024-11-10 21:03:52 +00:00
$pkgname-$_gittag.tar.gz::https://github.com/ProtonMail/WebClients/archive/$_gittag.tar.gz
2024-11-07 19:09:48 +00:00
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="
2024-11-10 21:03:52 +00:00
680b7789ee530a292a4488bae33acb1d8b8dd6d43cb04b4d189c1222e5d1f056f75c5a25bcaabec6177812b23fc0a675a16c6a68e99ddfe3b507bb1d99ab3507 protonmail-desktop-cb54f812c1445a21d5db74039364c5d17b94f2ae.tar.gz
2024-11-07 19:09:48 +00:00
f153db89ae3e4c23bcb59a6b8fe4f234b6b3478b6b4124b303fac3ccbe366627107d34359b808104437a86524963ef3ef7bb37833600fa452183f6f1226a51f6 protonmail-desktop
"