2024-10-29 13:01:48 +00:00
|
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
pkgname=caprine
|
2024-12-01 18:47:59 +00:00
|
|
|
pkgver=2.60.2
|
|
|
|
pkgrel=0
|
2024-10-29 13:01:48 +00:00
|
|
|
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() {
|
2024-12-01 18:47:59 +00:00
|
|
|
npm ci --ignore-scripts
|
|
|
|
npx patch-package
|
2024-10-29 13:01:48 +00:00
|
|
|
npx tsc
|
2024-12-01 18:47:59 +00:00
|
|
|
npm prune --ignore-scripts --omit=dev
|
2024-10-29 13:01:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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-12-01 18:47:59 +00:00
|
|
|
1a5af1c3c94e737fe0f05f366ad391f1543e7348409531a6892f4f44cde766384f9ac72c44c90568878630a388c05eea9b059b86b9150fb3e7ae6a03246b74ed caprine-2.60.2.tar.gz
|
2024-10-29 13:01:48 +00:00
|
|
|
a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop
|
|
|
|
3ad8994c1a0417e73d622587769e527b4236a32c1a89442ff76413b75b4392d667c9e2908979b453e5926e54db6d94b31625340c5a94e84e91ea77f56feae778 caprine.sh
|
|
|
|
"
|