Skip to content

Commit 4be7eda

Browse files
committed
chore: initial repository setup
0 parents  commit 4be7eda

17 files changed

Lines changed: 609 additions & 0 deletions

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/pkg/
2+
/src/
3+
pkgs/*/pkg/
4+
pkgs/*/src/
5+
*.pkg.tar.zst
6+
*.pkg.tar.xz
7+
*.pkg.tar.*
8+
*.AppImage
9+
*.log
10+
*.cache/
11+
*.tmp

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- This file is generated from docs/readme.en.template.md. Run scripts/build-readme.sh to regenerate. -->
2+
3+
# aur-auto
4+
5+
[![AUR Maintainer](https://img.shields.io/badge/AUR-xifan-1793D1?logo=arch-linux&logoColor=white)](https://aur.archlinux.org/packages?SeB=m&K=xifan)
6+
7+
Automation toolkit for maintaining Arch User Repository packages with GitHub Actions.
8+
9+
## Overview
10+
- Detect upstream releases per package by calling dedicated hooks in `pkgs/<pkgname>/upstream.sh`.
11+
- Regenerate PKGBUILD metadata, build packages in clean chroots, and publish to AUR.
12+
- Provide bilingual documentation for contributors and maintainers.
13+
14+
## Maintainers
15+
- xifan `<xifan2333@gmail.com>`
16+
17+
## Documentation
18+
- Repository Guidelines: [English](docs/guidelines.en.md) · [中文](docs/guidelines.zh.md)
19+
- Packaging Workflow: [English](docs/packaging.en.md) · [中文](docs/packaging.zh.md)
20+
- README (中文版本): [docs/readme.zh.md](docs/readme.zh.md)
21+
22+
## Packages
23+
| Package | Description | Upstream | Version | Build Status |
24+
| --- | --- | --- | --- | --- |
25+
| `kdenlive-appimage-pure` | A non-linear video editor for Linux using the MLT video framework (AppImage build) | `Kdenlive` | 25.08.2 | [![Build Status](https://img.shields.io/github/actions/workflow/status/xifan/aur-auto/release.yml?branch=main&logo=github&label=build)](https://github.com/xifan/aur-auto/actions/workflows/release.yml) |
26+
27+
Regenerate this README after documentation or metadata changes with `scripts/build-readme.sh`.

README.zh.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- 该文件由 docs/readme.zh.template.md 渲染而来,执行 scripts/build-readme.sh 生成。 -->
2+
3+
# aur-auto
4+
5+
[![AUR 维护者](https://img.shields.io/badge/AUR-xifan-1793D1?logo=arch-linux&logoColor=white)](https://aur.archlinux.org/packages?SeB=m&K=xifan)
6+
7+
使用 GitHub Actions 自动维护 Arch User Repository 软件包的工具集。
8+
9+
## 项目概览
10+
- 每个包通过 `pkgs/<pkgname>/upstream.sh` 钩子检测上游新版本。
11+
- 自动更新 PKGBUILD 元数据,在 clean chroot 中构建并推送至 AUR。
12+
- 为贡献者与维护者提供双语文档。
13+
14+
## 维护者
15+
- xifan `<xifan2333@gmail.com>`
16+
17+
## 文档
18+
- 仓库规范:[English](docs/guidelines.en.md) · [中文](docs/guidelines.zh.md)
19+
- 打包流程:[English](docs/packaging.en.md) · [中文](docs/packaging.zh.md)
20+
- README (English Version): [docs/readme.en.md](docs/readme.en.md)
21+
22+
## 软件包
23+
| Package | Description | Upstream | Version | Build Status |
24+
| --- | --- | --- | --- | --- |
25+
| `kdenlive-appimage-pure` | A non-linear video editor for Linux using the MLT video framework (AppImage build) | `Kdenlive` | 25.08.2 | [![Build Status](https://img.shields.io/github/actions/workflow/status/xifan/aur-auto/release.yml?branch=main&logo=github&label=build)](https://github.com/xifan/aur-auto/actions/workflows/release.yml) |
26+
27+
文档或元数据更新后,请运行 `scripts/build-readme.sh` 重新生成 README。

docs/guidelines.en.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Repository Guidelines (English)
2+
3+
[中文版本](guidelines.zh.md)
4+
5+
## Project Structure & Module Organization
6+
This repository automates Arch User Repository maintenance: it monitors upstream releases, rebuilds packages, and publishes to AUR. GitHub Actions workflows reside in `.github/workflows/``monitor-upstream.yml` handles scheduled detection, while `release.yml` publishes successful builds. Shared tooling lives in `scripts/`; orchestration happens in `update-package.sh`, and reusable helpers will be added under `scripts/lib/`. Each package stores its materials in `pkgs/<pkgname>/`, including `PKGBUILD`, `.SRCINFO`, and a package-specific `upstream.sh`.
7+
8+
## Build, Test, and Development Commands
9+
Activate any project toolchain via `source scripts/env.sh` (when available) and run scripts with `./scripts/<name>.sh`. Typical local checks:
10+
- `scripts/update-package.sh kdenlive-appimage-pure` – detect upstream releases, refresh PKGBUILD and `.SRCINFO`.
11+
- `makepkg --syncdeps --cleanbuild` – reproducible local build.
12+
- `namcap PKGBUILD` & `namcap *.pkg.tar.zst` – static quality checks.
13+
- `extra-x86_64-build` – clean-chroot validation mirroring the AUR toolchain.
14+
15+
## Coding Style & Naming Conventions
16+
Shell scripts target Bash, begin with `set -euo pipefail`, and use two-space indentation. Python helpers (when present) should follow `black` and `isort` defaults and export type hints on public functions. Name directories with lowercase-kebab style; shell files mirror that convention, while Python modules use snake_case. Reuse shared logging utilities under `scripts/lib/` to keep CI output consistent.
17+
18+
## Testing Guidelines
19+
Execute `makepkg --syncdeps --cleanbuild` before publishing, and ensure `namcap` passes with no critical findings. Add regression coverage whenever you fix a bug; automation scripts should ship with minimal bats/shunit2 tests where feasible. CI jobs must build within a clean chroot, run QA, and upload artifacts plus logs for review.
20+
21+
## Commit & Pull Request Guidelines
22+
Adopt Conventional Commits (`feat:`, `fix:`, `ci:`). Include upstream version bumps in commit subjects (e.g., `fix: bump kdenlive to 25.08.2`). Pull requests must update both `PKGBUILD` and `.SRCINFO`, attach CI logs, and link upstream releases or issues. Ensure GitHub Actions workflows succeed before requesting review.
23+
24+
## Security & Configuration Tips
25+
Store AUR SSH keys and tokens inside repository secrets (e.g., `AUR_SSH_KEY`, `AUR_GIT_URL`) and rotate them quarterly. Never print secrets in scripts—use environment files or GitHub Actions secrets. Document any new credentials in `docs/secrets.md`, including rotation steps, so maintainers can audit quickly.

docs/guidelines.zh.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 仓库规范(中文)
2+
3+
[English Version](guidelines.en.md)
4+
5+
## 项目结构与模块组织
6+
本仓库用于自动化维护 AUR 软件包:负责检测上游新版本、重新构建并推送到 AUR。GitHub Actions 工作流位于 `.github/workflows/``monitor-upstream.yml` 用于定时检测,`release.yml` 负责发布。通用脚本集中在 `scripts/`,编排逻辑由 `update-package.sh` 负责,后续的共享函数会放在 `scripts/lib/`。每个软件包在 `pkgs/<包名>/` 下维护自己的 `PKGBUILD``.SRCINFO` 以及对应的 `upstream.sh`
7+
8+
## 构建与测试命令
9+
如需本地操作,可执行 `source scripts/env.sh`(若存在)并使用 `./scripts/<脚本名>.sh`。常见的本地检查包括:
10+
- `scripts/update-package.sh kdenlive-appimage-pure`:检测上游版本并刷新 `PKGBUILD``.SRCINFO`
11+
- `makepkg --syncdeps --cleanbuild`:在本地执行可复现构建。
12+
- `namcap PKGBUILD``namcap *.pkg.tar.zst`:静态质量检查。
13+
- `extra-x86_64-build`:使用官方 clean chroot 验证,与 AUR 工具链保持一致。
14+
15+
## 代码风格与命名
16+
Shell 脚本统一使用 Bash,开头加上 `set -euo pipefail`,并采用两个空格缩进。若有 Python 辅助脚本,需遵循 `black``isort` 的格式,并为公共函数添加类型注解。目录与 Shell 文件推荐使用全小写加短横线;Python 模块则使用 snake_case。请复用 `scripts/lib/` 中的日志工具,保持 CI 输出风格一致。
17+
18+
## 测试规范
19+
发布前必须运行 `makepkg --syncdeps --cleanbuild`,并保证 `namcap` 无严重问题。修复缺陷时务必增加回归测试;自动化脚本可酌情加入 bats/shunit2 等基础测试。CI 需要在干净 chroot 中构建,完成 QA 后上传构建产物与日志,方便审阅。
20+
21+
## 提交与合并规范
22+
提交信息遵循 Conventional Commits(如 `feat:``fix:``ci:`),并在标题中注明上游版本号(示例:`fix: bump kdenlive to 25.08.2`)。PR 必须同时更新 `PKGBUILD``.SRCINFO`,附上 CI 日志,并关联上游发布或问题链接。确保 GitHub Actions 全部通过后再请求评审。
23+
24+
## 安全与配置提示
25+
AUR 的 SSH 密钥和令牌应存储在仓库的 Secrets(如 `AUR_SSH_KEY``AUR_GIT_URL`)中,并建议按季度轮换。脚本中禁止直接输出敏感信息,可通过环境文件或 Actions Secrets 注入。若新增凭据,请记录在 `docs/secrets.md`,包含轮换流程,方便维护人员审计。

docs/packaging.en.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Packaging Workflow (English)
2+
3+
[中文版本](packaging.zh.md)
4+
5+
## Repository Layout
6+
- `pkgs/<pkgname>/PKGBUILD`: canonical package recipe.
7+
- `pkgs/<pkgname>/.SRCINFO`: regenerated via `makepkg --printsrcinfo`.
8+
- `pkgs/<pkgname>/upstream.sh`: package-specific hooks for update automation.
9+
- `scripts/update-package.sh`: framework script invoking per-package hooks.
10+
11+
Auxiliary patches or launchers should live alongside the PKGBUILD. AppImage desktop integration (wrappers, icons, `.desktop` entries) is generated inside `package()` instead of being committed as static files.
12+
13+
## Auto-Update Flow
14+
1. Run `scripts/update-package.sh <pkgname>` to detect upstream releases.
15+
2. The package hook reports the download URL; the framework fetches the artifact and calculates the new SHA256.
16+
3. `pkg_update_files` writes `pkgver`, resets `pkgrel`, updates `source_x86_64`/`sha256sums_x86_64`, and calls `makepkg --printsrcinfo > .SRCINFO`.
17+
4. The script prints the version transition (`old -> new`). Use `--force` to refresh metadata even when versions match.
18+
19+
Current example:
20+
- `kdenlive-appimage-pure`: AppImage build sourced from KDE downloads with automatic version discovery.
21+
22+
## Manual Verification Checklist
23+
- `makepkg --cleanbuild --syncdeps`
24+
- `namcap PKGBUILD` and `namcap *.pkg.tar.zst`
25+
- Install test: `sudo pacman -U kdenlive-appimage-pure-*.pkg.tar.zst`, verify launch and icon.
26+
- Cleanup: `rm -rf src pkg *.pkg.tar.* *.AppImage`
27+
28+
## Release Gates
29+
- Commit both `PKGBUILD` and `.SRCINFO`.
30+
- Attach build/test logs in PRs or CI artifacts.
31+
- If upstream structure changes, update `upstream.sh` promptly and emit clear error messages so CI fails fast.

docs/packaging.zh.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 打包流程(中文)
2+
3+
[English Version](packaging.en.md)
4+
5+
## 仓库布局
6+
- `pkgs/<包名>/PKGBUILD`:标准打包脚本。
7+
- `pkgs/<包名>/.SRCINFO`:通过 `makepkg --printsrcinfo` 重新生成。
8+
- `pkgs/<包名>/upstream.sh`:定义包的更新钩子,实现自动化。
9+
- `scripts/update-package.sh`:通用框架脚本,调用各包钩子。
10+
11+
补丁或启动脚本请放在对应包目录下。AppImage 的桌面集成(包装脚本、图标、`.desktop` 文件)应在 `package()` 中生成,不要直接提交二进制资产。
12+
13+
## 自动更新流程
14+
1. 执行 `scripts/update-package.sh <包名>` 检测上游新版本。
15+
2. 包的钩子返回下载地址,框架负责下载并计算新的 SHA256。
16+
3. `pkg_update_files` 写入 `pkgver`、重置 `pkgrel`、更新 `source_x86_64``sha256sums_x86_64`,然后运行 `makepkg --printsrcinfo > .SRCINFO`
17+
4. 脚本输出版本变更(`old -> new`)。需要强制刷新时可使用 `--force`
18+
19+
目前的示例:
20+
- `kdenlive-appimage-pure`:从 KDE 官方下载 AppImage,自动解析最新稳定版。
21+
22+
## 手动验证清单
23+
- `makepkg --cleanbuild --syncdeps`
24+
- `namcap PKGBUILD``namcap *.pkg.tar.zst`
25+
- 安装测试:`sudo pacman -U kdenlive-appimage-pure-*.pkg.tar.zst`,确认应用与图标可用。
26+
- 清理:`rm -rf src pkg *.pkg.tar.* *.AppImage`
27+
28+
## 发布前检查
29+
- 提交时务必包含 `PKGBUILD``.SRCINFO`
30+
- PR 或 CI 需要附上构建/测试日志。
31+
- 若上游目录结构变化,应及时更新 `upstream.sh` 的解析逻辑,并输出明确错误信息,便于 CI 快速定位问题。

docs/readme.en.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- This file is generated from docs/readme.en.template.md. Run scripts/build-readme.sh to regenerate. -->
2+
3+
# aur-auto
4+
5+
[![AUR Maintainer](https://img.shields.io/badge/AUR-xifan-1793D1?logo=arch-linux&logoColor=white)](https://aur.archlinux.org/packages?SeB=m&K=xifan)
6+
7+
Automation toolkit for maintaining Arch User Repository packages with GitHub Actions.
8+
9+
## Overview
10+
- Detect upstream releases per package by calling dedicated hooks in `pkgs/<pkgname>/upstream.sh`.
11+
- Regenerate PKGBUILD metadata, build packages in clean chroots, and publish to AUR.
12+
- Provide bilingual documentation for contributors and maintainers.
13+
14+
## Maintainers
15+
- xifan `<xifan2333@gmail.com>`
16+
17+
## Documentation
18+
- Repository Guidelines: [English](docs/guidelines.en.md) · [中文](docs/guidelines.zh.md)
19+
- Packaging Workflow: [English](docs/packaging.en.md) · [中文](docs/packaging.zh.md)
20+
- README (中文版本): [docs/readme.zh.md](docs/readme.zh.md)
21+
22+
## Packages
23+
| Package | Description | Upstream | Version | Build Status |
24+
| --- | --- | --- | --- | --- |
25+
| `kdenlive-appimage-pure` | A non-linear video editor for Linux using the MLT video framework (AppImage build) | `Kdenlive` | 25.08.2 | [![Build Status](https://img.shields.io/github/actions/workflow/status/xifan/aur-auto/release.yml?branch=main&logo=github&label=build)](https://github.com/xifan/aur-auto/actions/workflows/release.yml) |
26+
27+
Regenerate this README after documentation or metadata changes with `scripts/build-readme.sh`.

docs/readme.en.template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- This file is generated from docs/readme.en.template.md. Run scripts/build-readme.sh to regenerate. -->
2+
3+
# aur-auto
4+
5+
[![AUR Maintainer](https://img.shields.io/badge/AUR-{{AUR_USER}}-1793D1?logo=arch-linux&logoColor=white)](https://aur.archlinux.org/packages?SeB=m&K={{AUR_USER}})
6+
7+
Automation toolkit for maintaining Arch User Repository packages with GitHub Actions.
8+
9+
## Overview
10+
- Detect upstream releases per package by calling dedicated hooks in `pkgs/<pkgname>/upstream.sh`.
11+
- Regenerate PKGBUILD metadata, build packages in clean chroots, and publish to AUR.
12+
- Provide bilingual documentation for contributors and maintainers.
13+
14+
## Maintainers
15+
- {{AUR_USER}} `<{{AUR_EMAIL}}>`
16+
17+
## Documentation
18+
- Repository Guidelines: [English](docs/guidelines.en.md) · [中文](docs/guidelines.zh.md)
19+
- Packaging Workflow: [English](docs/packaging.en.md) · [中文](docs/packaging.zh.md)
20+
- README (中文版本): [docs/readme.zh.md](docs/readme.zh.md)
21+
22+
## Packages
23+
{{PACKAGE_TABLE}}
24+
25+
Regenerate this README after documentation or metadata changes with `scripts/build-readme.sh`.

docs/readme.zh.template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!-- 该文件由 docs/readme.zh.template.md 渲染而来,执行 scripts/build-readme.sh 生成 README.zh.md。 -->
2+
3+
# aur-auto
4+
5+
[![AUR 维护者](https://img.shields.io/badge/AUR-{{AUR_USER}}-1793D1?logo=arch-linux&logoColor=white)](https://aur.archlinux.org/packages?SeB=m&K={{AUR_USER}})
6+
7+
使用 GitHub Actions 自动维护 Arch User Repository 软件包的工具集。
8+
9+
## 项目概览
10+
- 每个包通过 `pkgs/<pkgname>/upstream.sh` 钩子检测上游新版本。
11+
- 自动更新 PKGBUILD 元数据,在 clean chroot 中构建并推送至 AUR。
12+
- 为贡献者与维护者提供双语文档。
13+
14+
## 维护者
15+
- {{AUR_USER}} `<{{AUR_EMAIL}}>`
16+
17+
## 文档
18+
- 仓库规范:[English](docs/guidelines.en.md) · [中文](docs/guidelines.zh.md)
19+
- 打包流程:[English](docs/packaging.en.md) · [中文](docs/packaging.zh.md)
20+
- README (English Version): [docs/readme.en.md](docs/readme.en.md)
21+
22+
## 软件包
23+
{{PACKAGE_TABLE}}
24+
25+
文档或元数据更新后,请运行 `scripts/build-readme.sh` 重新生成 README。

0 commit comments

Comments
 (0)