From dc86026f337b08b7b2681ac6502231c27e66509d Mon Sep 17 00:00:00 2001 From: madomado Date: Thu, 16 May 2024 17:29:57 +0800 Subject: [PATCH] add: asar --- anda/devs/asar/anda.hcl | 5 +++++ anda/devs/asar/asar.spec | 40 ++++++++++++++++++++++++++++++++++++++ anda/devs/asar/update.rhai | 1 + 3 files changed, 46 insertions(+) create mode 100644 anda/devs/asar/anda.hcl create mode 100644 anda/devs/asar/asar.spec create mode 100644 anda/devs/asar/update.rhai diff --git a/anda/devs/asar/anda.hcl b/anda/devs/asar/anda.hcl new file mode 100644 index 0000000000..91ba6c4fe1 --- /dev/null +++ b/anda/devs/asar/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "asar.spec" + } +} diff --git a/anda/devs/asar/asar.spec b/anda/devs/asar/asar.spec new file mode 100644 index 0000000000..74cbf7500d --- /dev/null +++ b/anda/devs/asar/asar.spec @@ -0,0 +1,40 @@ +%define debug_package %nil +%define __strip /bin/true +%global _build_id_links none + +# Exclude private libraries +%global __requires_exclude libffmpeg.so +%global __provides_exclude_from %{_datadir}/%{name}/.*\\.so + +Name: asar +Version: 3.2.10 +Release: 1%?dist +Summary: Simple extensive tar-like archive format with indexing +License: MIT +URL: https://github.com/electron/asar +Source0: %url/archive/refs/tags/v%version.tar.gz +Requires: nodejs +BuildRequires: nodejs-npm + +%description +Asar is a simple extensive archive format, it works like `tar` that concatenates all files +together without compression, while having random access support. + +%prep +%autosetup + +%build + +%install +mkdir -p %buildroot%_bindir +PATH="$PATH:%buildroot%_bindir" +npm install -g --prefix %buildroot%_prefix %SOURCE0 + +%files +%doc README.md +%license LICENSE.md +%_bindir/asar +%_prefix/lib/node_modules/@electron/asar/ + +%changelog +%autochangelog diff --git a/anda/devs/asar/update.rhai b/anda/devs/asar/update.rhai new file mode 100644 index 0000000000..d9787c3ac5 --- /dev/null +++ b/anda/devs/asar/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("electron/asar"));