🛠️ fix(tools): 修正安装流程及打包参数的错误描述。
- 修正 `install-font.sh` 采用单次 `sudo pacman -U` 的批量安装说明。
- 补充 `options=('!debug')` 与 `conflicts` 历史遗留包名的相关说明。
- 更新 Mermaid 流程图,反映“先全部构建、后一次性安装”的两阶段流程。
- 同步中英文双语文档 (`README.md` 与 `README-en.md`)。
This commit is contained in:
1 parent
69f16d5c19
commit
9f07f2f2db
131 files changed
+334
-183
No files matched your search
@@ -21,12 +21,13 @@ write_meta_package() {
|
||||
mkdir -p "$package_dir"
|
||||
{
|
||||
printf '# Maintainer: Shuery Shuai <[email protected]>\n\n'
|
||||
printf "pkgname='%s'\npkgver='%s'\npkgrel=1\n" "$package_name" "$PKGVER"
|
||||
printf "pkgname='%s'\npkgver='%s'\npkgrel='%s'\n" "$package_name" "$PKGVER" "$PKGREL"
|
||||
printf "pkgdesc='%s'\narch=('any')\nurl='%s'\nlicense=('OFL-1.1')\n" "$description" "$UPSTREAM_URL"
|
||||
printf 'depends=(\n'
|
||||
printf " '%s'\n" "$@"
|
||||
printf ")\nconflicts=('ttf-sarasa-gothic-nerd-fonts')\n\n"
|
||||
printf "source=('LICENSE::%s')\nsha256sums=('%s')\n\n" "$FONT_LICENSE_URL" "$FONT_LICENSE_SHA256"
|
||||
printf ")\nconflicts=('ttf-sarasa-gothic-nerd-fonts')\n"
|
||||
printf "source=('LICENSE::%s')\nsha256sums=('%s')\n" "$FONT_LICENSE_URL" "$FONT_LICENSE_SHA256"
|
||||
printf "options=('!debug')\n\n"
|
||||
printf 'package() {\n install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"\n}\n'
|
||||
} > "${package_dir}/PKGBUILD"
|
||||
(cd "$package_dir" && makepkg --printsrcinfo > .SRCINFO)
|
||||
@@ -58,7 +59,8 @@ write_font_package() {
|
||||
printf 'source=(\n "${pkgname}.zip::%s"\n' "$archive_url"
|
||||
printf " 'LICENSE::%s'\n)\n" "$FONT_LICENSE_URL"
|
||||
printf 'noextract=("${pkgname}.zip")\nsha256sums=(\n'
|
||||
printf " '%s'\n '%s'\n)\n\n" "$archive_sha256" "$FONT_LICENSE_SHA256"
|
||||
printf " '%s'\n '%s'\n)\n" "$archive_sha256" "$FONT_LICENSE_SHA256"
|
||||
printf "options=('!debug')\n\n"
|
||||
printf 'package() {\n'
|
||||
printf ' local font_dir font_destination\n'
|
||||
printf ' font_dir=$(mktemp -d "${srcdir}/${pkgname}.XXXXXX")\n'
|
||||
|
||||
+17
-3
@@ -74,7 +74,8 @@ resolve_dependencies() {
|
||||
# Arguments: Optional --dry-run, followed by one or more package bases.
|
||||
main() {
|
||||
local dry_run=false
|
||||
local package_base package_dir
|
||||
local package_base package_dir package_file package_files
|
||||
declare -a built_packages=()
|
||||
|
||||
if [[ "${1:-}" == "--dry-run" ]]; then
|
||||
dry_run=true
|
||||
@@ -108,9 +109,22 @@ main() {
|
||||
|
||||
for package_base in "${INSTALL_ORDER[@]}"; do
|
||||
package_dir="${PACKAGES_DIR}/${package_base}"
|
||||
printf '\n==> Building and installing %s\n' "$package_base"
|
||||
makepkg --syncdeps --install --needed --force --dir "$package_dir"
|
||||
printf '\n==> Building %s...\n' "$package_base"
|
||||
makepkg --nodeps --noconfirm --force --dir "$package_dir"
|
||||
|
||||
mapfile -t package_files < <(cd "$package_dir" && makepkg --packagelist)
|
||||
for package_file in "${package_files[@]}"; do
|
||||
built_packages+=("$package_file")
|
||||
done
|
||||
done
|
||||
|
||||
if ((${#built_packages[@]} == 0)); then
|
||||
printf 'No packages were built.\n' >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
printf '\n==> Installing %d packages.\n' "${#built_packages[@]}"
|
||||
sudo pacman -U --needed "${built_packages[@]}"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in new issue
Block a user