# Contributor: Antoine Martin (ayakael) # Maintainer: Antoine Martin (ayakael) pkgname=caprine pkgver=2.60.3 pkgrel=0 pkgdesc="Elegant Facebook Messenger desktop app" arch="x86_64 aarch64" # blocked by electron url="https://github.com/sindresorhus/caprine" license="MIT" depends="electron" makedepends="npm findutils coreutils" options="!check" # No test suite source=" $pkgname-$pkgver.tar.gz::https://github.com/sindresorhus/caprine/archive/refs/tags/v$pkgver.tar.gz caprine.desktop caprine.sh " build() { npm ci --ignore-scripts npx patch-package npx tsc npm prune --ignore-scripts --omit=dev } 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=" edf6452294b3c661befd9811c5836da33311171d587cb9a5939ac11a0c1e2a7ebbc4f2a8d81e02c1db1a2d814ac1aa7bbdadca9e21892cc8d7f7e9c23dc2e221 caprine-2.60.3.tar.gz a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop 3ad8994c1a0417e73d622587769e527b4236a32c1a89442ff76413b75b4392d667c9e2908979b453e5926e54db6d94b31625340c5a94e84e91ea77f56feae778 caprine.sh "