64 lines
2.2 KiB
Text
64 lines
2.2 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
pkgname=caprine
|
|
pkgver=2.56.1
|
|
pkgrel=0
|
|
pkgdesc="Elegant Facebook Messenger desktop app"
|
|
arch="noarch"
|
|
url="https://github.com/sindresorhus/caprine"
|
|
license="MIT"
|
|
depends="electron"
|
|
makedepends="npm findutils"
|
|
source="https://github.com/sindresorhus/caprine/archive/refs/tags/v2.56.1.tar.gz
|
|
caprine.desktop
|
|
caprine.js
|
|
"
|
|
|
|
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
|
|
cp -r * "$pkgdir"$appdir
|
|
|
|
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 \
|
|
"$pkgdir"/usr/share/applications/$pkgname.desktop
|
|
|
|
install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
|
|
ln -s $(realpath -m --relative-to=/usr/share/licenses/$pkgname $appdir/license) \
|
|
"$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
# 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="
|
|
22d96d62f26eba22af03936f3b8215e0f63b0bffa3fd960a2aa48f1d9974d375adf23b585e6697f84f023cfbaac9a960a9aab9c6a7c5879598d07e4ed63a5403 v2.56.1.tar.gz
|
|
3226351b0ca2d33bf85f543c9e3b9aa6d1d4ccae352d2977d23b54842a72511f0a7a249c62832fe3bd8edad65dd251cf7802e5a27f43c20bf559bcc7e4ca54a7 caprine.desktop
|
|
c4639328655f4bccb68e93d8bd54cd3ca57f5a1117fd3de573aae767bc1828b87bba498d7ca050775e7644665f4fa96e9f80e68bba25f449c7a6e2689df76f7f caprine.js
|
|
"
|