2022-10-19 16:15:04 +00:00
|
|
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
|
|
|
|
pkgname=caprine
|
2023-11-12 01:24:06 +00:00
|
|
|
pkgver=2.59.1
|
|
|
|
pkgrel=0
|
2022-10-19 16:15:04 +00:00
|
|
|
pkgdesc="Elegant Facebook Messenger desktop app"
|
2023-11-27 16:43:12 +00:00
|
|
|
arch="x86_64 aarch64" # bloced by electron
|
2022-10-19 16:15:04 +00:00
|
|
|
url="https://github.com/sindresorhus/caprine"
|
|
|
|
license="MIT"
|
|
|
|
depends="electron"
|
2023-05-05 22:47:24 +00:00
|
|
|
makedepends="npm findutils coreutils"
|
2022-10-19 20:18:42 +00:00
|
|
|
options="!check"
|
2023-03-31 20:26:25 +00:00
|
|
|
source="
|
|
|
|
$pkgname-$pkgver.tar.gz::https://github.com/sindresorhus/caprine/archive/refs/tags/v$pkgver.tar.gz
|
|
|
|
caprine.desktop
|
|
|
|
caprine.js
|
2022-10-19 20:18:42 +00:00
|
|
|
"
|
2022-10-19 16:15:04 +00:00
|
|
|
|
|
|
|
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/$pkgname
|
|
|
|
|
|
|
|
install -d "$pkgdir"$appdir
|
2023-03-31 20:26:25 +00:00
|
|
|
cp -r ./* "$pkgdir"$appdir
|
2022-10-19 16:15:04 +00:00
|
|
|
|
|
|
|
install -dm755 "$pkgdir/usr/share/pixmaps"
|
|
|
|
install -m644 build/icon.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
|
|
|
|
|
|
|
|
install -Dm755 "$srcdir"/$pkgname.js "$pkgdir"/usr/bin/$pkgname
|
|
|
|
install -Dm644 "$srcdir"/$pkgname.desktop \
|
2023-03-31 20:26:25 +00:00
|
|
|
"$pkgdir"/usr/share/applications/$pkgname.desktop
|
2022-10-19 16:15:04 +00:00
|
|
|
|
|
|
|
install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
|
2023-03-31 20:26:25 +00:00
|
|
|
ln -s "$(realpath -m --relative-to=/usr/share/licenses/$pkgname $appdir/license)" \
|
|
|
|
"$pkgdir"/usr/share/licenses/$pkgname
|
2022-10-19 16:15:04 +00:00
|
|
|
|
|
|
|
# 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/$pkgname|$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="
|
2023-11-12 01:24:06 +00:00
|
|
|
a525bafb6a53dd2dbdfc4b9b3e96d3939d93be950a3287f2a5ef6465d5a6b64ecda79b6d393023d067f939e1a6e85debc35f83bbb1f758011db9d94dd9ff8a72 caprine-2.59.1.tar.gz
|
2022-10-19 20:18:42 +00:00
|
|
|
a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop
|
|
|
|
44280c62ce43bdafa8528729371fccb16b8a0e3db7aca28d5c157ae0144dca5fbb023b8883b561955aa28ab62e967f2674d8c6bcaff186e2cdd0e7ba8beab9ac caprine.js
|
2022-10-19 16:15:04 +00:00
|
|
|
"
|