🛠️ fix(tools): 修正安装流程及打包参数的错误描述。

- 修正 `install-font.sh` 采用单次 `sudo pacman -U` 的批量安装说明。
- 补充 `options=('!debug')` 与 `conflicts` 历史遗留包名的相关说明。
- 更新 Mermaid 流程图,反映“先全部构建、后一次性安装”的两阶段流程。
- 同步中英文双语文档 (`README.md` 与 `README-en.md`)。
This commit is contained in:
Shuery committed 2026-11-21 21:11:12 +08:00
1 parent 69f16d5c19
commit 9f07f2f2db
131 files changed
+334 -183

No files matched your search

+31 -18
View File
@@ -5,7 +5,7 @@
[![License: OFL-1.1](https://img.shields.io/badge/font_license-OFL--1.1-blue)](aur-packages/LICENSE)
Independent AUR packages for every Sarasa Gothic Nerd Font variant —— **48 standalone font packages**
across styles and orthographies, plus metapackages at style, orthography, and collection level
across 8 styles and 6 orthographies, plus metapackages at orthography, style, and collection level
(63 package bases in total).
> [!NOTE]
@@ -19,9 +19,9 @@ across styles and orthographies, plus metapackages at style, orthography, and co
```text
aur-packages/
├── ttf-sarasa-<style>-<orthography>-nerd-font/ # standalone: 1 ZIP → 1 package (48)
├── ttf-sarasa-<orthography>-nerd-font/ # metapackage: all styles for one orthography
├── ttf-sarasa-<style>-nerd-font/ # metapackage: all orthographies for one style
└── ttf-sarasa-nerd-font/ # metapackage: all 48 standalone packages
├── ttf-sarasa-<orthography>-nerd-font/ # metapackage: all styles for one orthography (6)
├── ttf-sarasa-<style>-nerd-font/ # metapackage: all orthographies for one style (8)
└── ttf-sarasa-nerd-font/ # metapackage: all 48 standalone packages (1)
```
- `aur-packages/ttf-sarasa-<style>-<orthography>-nerd-font/` contains one standalone font package.
@@ -34,6 +34,10 @@ Each directory under `aur-packages/` is an independent AUR package base.
Publish that directory's `PKGBUILD` and generated `.SRCINFO` to the matching AUR repository.
The root directory contains only shared metadata, source data, and tools.
Every generated PKGBUILD declares `conflicts=('ttf-sarasa-gothic-nerd-fonts')`.
That is the legacy aggregate package name, not the current metapackage:
the declaration lets pacman replace an old install instead of refusing it.
The root `LICENSE` is reserved for this repository's license.
The upstream font's SIL Open Font License is stored at `aur-packages/LICENSE`
and is used as the checksum source for font packages.
@@ -42,7 +46,7 @@ Per Arch font packaging guidelines, that license is installed under
> [!TIP]
>
> 48 standalone packages × styles × orthographies can look overwhelming.
> 48 standalone packages across 8 styles and 6 orthographies can look overwhelming.
> Start with a metapackage —— `ttf-sarasa-nerd-font` pulls in everything,
> while `ttf-sarasa-mono-sc-nerd-font` gives you just Mono + Simplified Chinese.
@@ -58,6 +62,7 @@ bash tools/publish-aur.sh prepare
This creates one tarball per package in `aur-upload/` (all 63 packages under `aur-packages/`).
Upload each tarball through the AUR website's package submission page.
You can prepare selected packages by listing their package bases,
replace existing archives with `--force`,
or set `AUR_UPLOAD_DIR` to choose another output directory.
After the AUR package exists, updates can be pushed with:
@@ -89,23 +94,26 @@ bash tools/install-font.sh ttf-sarasa-mono-sc-nerd-font
```
You can also select a style, orthography, or full collection metapackage.
The installer reads `.SRCINFO`, builds local dependencies first,
and installs packages with `makepkg`;
review the order without changing the system by using `--dry-run`:
The installer reads `.SRCINFO`, resolves local dependencies from `aur-packages/`,
builds every selected package with `makepkg --nodeps`, and installs all of them
in **one** `pacman -U` transaction; use `--dry-run` to review the order without
touching the system:
```bash
bash tools/install-font.sh --dry-run ttf-sarasa-ui-nerd-font
```
Run the script as a regular user.
`makepkg` will use pacman to install packages and any missing dependencies,
prompting for confirmation as usual.
> [!IMPORTANT]
>
> `install-font.sh` does not use `sudo` internally.
> `makepkg` escalates via pacman only when installing dependencies or the built package,
> so you will still see the usual pacman confirmation prompt.
> `install-font.sh` builds as your regular user but installs with a single
> `sudo pacman -U` at the end, so the pacman confirmation prompt appears once
> for the whole batch rather than once per package. Running the script as root
> is refused, because `makepkg` must not run as root.
`pacman -U --needed` skips a package when the installed version is not older
than the one being built. If you rebuilt the same `pkgver`/`pkgrel` with
different contents, drop `--needed` (or remove the package first) to force
the reinstall.
## Regenerate packages
@@ -119,17 +127,22 @@ The generator writes each standalone PKGBUILD with one font ZIP source,
produces `.SRCINFO` files using `makepkg`, and refreshes all 63 packages under `aur-packages/`,
including the all-font metapackage.
Every generated PKGBUILD carries `options=('!debug')`, so `makepkg` produces no
separate `-debug` subpackage and `install-font.sh` never has to filter one out.
```mermaid
flowchart LR
A[package-data.sh<br/>version / checksums / names] --> B[generate-packages.sh --force]
B --> C[48 standalone PKGBUILDs<br/>1 ZIP source each]
B --> D[15 metapackage PKGBUILDs<br/>style / orthography / collection]
B --> C[48 standalone PKGBUILDs<br/>1 ZIP + LICENSE each]
B --> D[15 metapackage PKGBUILDs<br/>orthography / style / collection]
C --> E[makepkg --printsrcinfo]
D --> E
E --> F[aur-packages/<br/>PKGBUILD + .SRCINFO]
F --> G[publish-aur.sh prepare]
F --> H[install-font.sh]
G --> I[aur-upload/*.tar.gz]
H --> I[makepkg --nodeps for every selected package]
I --> J[single sudo pacman -U]
G --> K[aur-upload/*.tar.gz]
```
## Update checksums