From 3d9d4a426d703520a081a2b0227629fa21e0b705 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 4 Dec 2024 09:25:27 -0500 Subject: [PATCH] user/caprine: upgrade to 2.60.3 --- user/caprine/APKBUILD | 39 ++++++++++++++++++--------------------- user/caprine/caprine.js | 29 ----------------------------- user/caprine/caprine.sh | 2 ++ 3 files changed, 20 insertions(+), 50 deletions(-) delete mode 100644 user/caprine/caprine.js create mode 100644 user/caprine/caprine.sh diff --git a/user/caprine/APKBUILD b/user/caprine/APKBUILD index 73c3e02..6825aef 100644 --- a/user/caprine/APKBUILD +++ b/user/caprine/APKBUILD @@ -1,33 +1,30 @@ -# Maintainer: Antoine Martin (ayakael) # Contributor: Antoine Martin (ayakael) - +# Maintainer: Antoine Martin (ayakael) pkgname=caprine -pkgver=2.59.1 +pkgver=2.60.3 pkgrel=0 pkgdesc="Elegant Facebook Messenger desktop app" -arch="x86_64 aarch64" # bloced by electron +arch="x86_64 aarch64" # blocked by electron url="https://github.com/sindresorhus/caprine" license="MIT" depends="electron" makedepends="npm findutils coreutils" -options="!check" +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.js + caprine.sh " build() { - npm install --ignore-scripts - npx --yes patch-package + npm ci --ignore-scripts + npx patch-package npx tsc - rm -r node_modules - npm install --ignore-scripts --production - npx --yes patch-package + npm prune --ignore-scripts --omit=dev } package() { - local appdir=/usr/lib/$pkgname + local appdir=/usr/lib/caprine install -d "$pkgdir"$appdir cp -r ./* "$pkgdir"$appdir @@ -35,13 +32,13 @@ package() { 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 "$srcdir"/caprine.sh "$pkgdir"/usr/bin/caprine + install -Dm644 "$srcdir"/caprine.desktop \ + "$pkgdir"/usr/share/applications/caprine.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 + 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 @@ -49,7 +46,7 @@ package() { rm -r "$pkgdir"$appdir/tsconfig.json find "$pkgdir"$appdir \ -name "package.json" \ - -exec sed -e "s|$srcdir/$pkgname|$appdir|" \ + -exec sed -e "s|$srcdir/caprine|$appdir|" \ -i {} \; \ -or -name ".*" -prune -exec rm -r '{}' \; \ -or -name "bin" -prune -exec rm -r '{}' \; \ @@ -60,7 +57,7 @@ package() { -or -name "test" -prune -exec rm -r '{}' \; } sha512sums=" -a525bafb6a53dd2dbdfc4b9b3e96d3939d93be950a3287f2a5ef6465d5a6b64ecda79b6d393023d067f939e1a6e85debc35f83bbb1f758011db9d94dd9ff8a72 caprine-2.59.1.tar.gz +edf6452294b3c661befd9811c5836da33311171d587cb9a5939ac11a0c1e2a7ebbc4f2a8d81e02c1db1a2d814ac1aa7bbdadca9e21892cc8d7f7e9c23dc2e221 caprine-2.60.3.tar.gz a469e3bea24926119e51642b777ef794c5fa65421107903f967c36d81bbb1adb3d52469ce3a3301b2c890f1aa53ab989ded22a7c6e811fb8cf0a582dbd835e19 caprine.desktop -44280c62ce43bdafa8528729371fccb16b8a0e3db7aca28d5c157ae0144dca5fbb023b8883b561955aa28ab62e967f2674d8c6bcaff186e2cdd0e7ba8beab9ac caprine.js +3ad8994c1a0417e73d622587769e527b4236a32c1a89442ff76413b75b4392d667c9e2908979b453e5926e54db6d94b31625340c5a94e84e91ea77f56feae778 caprine.sh " diff --git a/user/caprine/caprine.js b/user/caprine/caprine.js deleted file mode 100644 index a963ee6..0000000 --- a/user/caprine/caprine.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/electron - -const name = 'caprine'; - -const {app} = require('electron'); -const fs = require('fs'); -const path = require('path'); - -// Change command name. -const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY); -fs.writeSync(fd, name); -fs.closeSync(fd); - -// Remove first command line argument (/usr/bin/electron). -process.argv.splice(0, 1); - -// Set application paths. -const appPath = path.join(path.dirname(__dirname), 'lib', name); -const packageJson = require(path.join(appPath, 'package.json')); -const productName = packageJson.productName; -app.setAppPath(appPath); -app.setDesktopName(name + '.desktop'); -app.setName(productName); -app.setPath('userCache', path.join(app.getPath('cache'), productName)); -app.setPath('userData', path.join(app.getPath('appData'), productName)); -app.setVersion(packageJson.version); - -// Run the application. -require('module')._load(appPath, module, true); diff --git a/user/caprine/caprine.sh b/user/caprine/caprine.sh new file mode 100644 index 0000000..bf0f8de --- /dev/null +++ b/user/caprine/caprine.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/usr/bin/electron "/usr/lib/caprine"