chromium-extension-locals-git

LOW
maintainer gaougalos 0 votes scanned 2026-11-02 18:02:51.835640
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: gaou-piou <i.am.piou@gmail.com>
2
3pkgname=chromium-extension-locals-git
4_pkgname=locals
5pkgver=r0.0000000
6pkgrel=2
7pkgdesc='Chromium (MV3) extension that serves popular JS libraries, styles and fonts from a local copy instead of CDNs; learns from usage. Loaded unpacked'
8arch=('any')
9url='https://github.com/gaou-piou/locals'
10# MPL-2.0 for the extension; the bundled libraries are MIT, and the font packages
11# carry CC-BY-4.0 / OFL-1.1 (the licence text of each ships in libs/<name>/<version>/LICENSE).
12license=('MPL-2.0' 'MIT' 'CC-BY-4.0' 'OFL-1.1')
13depends=('nodejs')
14makedepends=('git' 'nodejs>=24' 'pnpm')
15provides=("chromium-extension-$_pkgname")
16conflicts=("chromium-extension-$_pkgname")
17install=locals.install
18# The libraries are downloaded from the npm registry while building and checked against the sha256
19# recorded in libraries.json; build() therefore needs network access.
20source=("$_pkgname::git+$url.git")
21sha256sums=('SKIP')
22
23pkgver() {
24 cd "$_pkgname"
25 printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
26}
27
28_buildenv() {
29 export HOME="$srcdir/.home"
30 export XDG_CACHE_HOME="$srcdir/.cache"
31 export npm_config_cache="$srcdir/.cache/npm"
32 export CI=1
33}
34
35prepare() {
36 cd "$_pkgname"
37 _buildenv
38 pnpm install --frozen-lockfile
39}
40
41build() {
42 cd "$_pkgname"
43 _buildenv
44 pnpm build:libs
45 pnpm build
46 pnpm size
47}
48
49check() {
50 cd "$_pkgname"
51 _buildenv
52 pnpm test
53}
54
55package() {
56 cd "$_pkgname"
57 install -d "$pkgdir/usr/share/$pkgname"
58 cp -r dist/. "$pkgdir/usr/share/$pkgname/"
59 # Chromium writes _metadata/ into every unpacked extension it loads
60 rm -rf "$pkgdir/usr/share/$pkgname/_metadata"
61 find "$pkgdir/usr/share/$pkgname" -type d -exec chmod 755 {} +
62 find "$pkgdir/usr/share/$pkgname" -type f -exec chmod 644 {} +
63 install -Dm755 packaging/aur/locals-install "$pkgdir/usr/bin/locals-install"
64 install -Dm755 packaging/aur/locals-learn.cjs "$pkgdir/usr/bin/locals-learn"
65 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
66 # licence texts of the bundled libraries, one file per library version
67 local lic
68 for lic in dist/libs/*/*/LICENSE; do
69 install -Dm644 "$lic" "$pkgdir/usr/share/licenses/$pkgname/libs/$(basename "$(dirname "$(dirname "$lic")")")-$(basename "$(dirname "$lic")")-LICENSE"
70 done
71}
72

Scan history

Scanned at (UTC)SeverityRules
2026-11-02 18:02:51 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion