diff --git a/.github/workflows/pkg-DEB.yml b/.github/workflows/pkg-deb.yml similarity index 97% rename from .github/workflows/pkg-DEB.yml rename to .github/workflows/pkg-deb.yml index 33f1504..d3d077c 100644 --- a/.github/workflows/pkg-DEB.yml +++ b/.github/workflows/pkg-deb.yml @@ -1,12 +1,12 @@ # --------------------------------------------------------------- -# Workflow File : pkg-DEB.yml +# Workflow File : pkg-deb.yml # File Authors : sanchuanhehe # Contributors : Aoran Zeng # | # Created On : <2025-06-10> # Last Modified : <2025-06-16> # -# Build and publish DEB packages +# Build and publish deb packages # --------------------------------------------------------------- name: 构建发布deb包 @@ -66,7 +66,7 @@ jobs: run: | version="${{ steps.get_version.outputs.version }}" - cd ./pkg/DEB + cd ./pkg/deb (cat << EOF; cat ./debian/changelog) > new_changelog chsrc ($version-1) unstable; urgency=medium @@ -118,7 +118,7 @@ jobs: sudo dpkg -i dist/chsrc_${version}-1_amd64.deb || true sudo apt-get install -f -y || true - bash pkg/DEB/deb-installation-test.sh + bash pkg/deb/deb-installation-test.sh - name: 上传deb包到artifacts uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 2a94104..0ed1e09 100644 --- a/.gitignore +++ b/.gitignore @@ -36,20 +36,20 @@ chsrc.toc ############################## -# DEB package +# deb package ############################## -# DEB package 未归档的目录 -pkg/DEB/debian/chsrc/ +# deb package 未归档的目录 +pkg/deb/debian/chsrc/ # 下面这个目录包含创建出 $HOME 的虚拟环境 -pkg/DEB/debian/.debhelper/ +pkg/deb/debian/.debhelper/ -pkg/DEB/debian/debhelper-build-stamp -pkg/DEB/debian/files -pkg/DEB/debian/chsrc.debhelper.log -pkg/DEB/debian/chsrc.substvars +pkg/deb/debian/debhelper-build-stamp +pkg/deb/debian/files +pkg/deb/debian/chsrc.debhelper.log +pkg/deb/debian/chsrc.substvars -# 以下为 DEB package 构建的直接产物 +# 以下为 deb package 构建的直接产物 chsrc_*.deb chsrc-dbgsym_*.ddeb chsrc_*.build diff --git a/Makefile b/Makefile index 5589611..5eb5dea 100644 --- a/Makefile +++ b/Makefile @@ -120,10 +120,10 @@ clean: -@rm chsrc 2>/dev/null -@rm README.md.bak* 2>/dev/null -# -include pkg/DEB/deb.makefile # 不这么做,因为 pkg/DEB/deb.makefile 需要在 pkg/DEB 目录下执行 +# -include pkg/deb/deb.makefile # 不这么做,因为 pkg/deb/deb.makefile 需要在 pkg/deb 目录下执行 # 保持动词在前的任务名风格 build-deb: - @$(MAKE) -C pkg/DEB -f deb.makefile deb-build + @$(MAKE) -C pkg/deb -f deb.makefile deb-build install: $(Target-Name) install -D -m 755 $(Target-Name) $(DESTDIR)/usr/bin/$(Target-Name) diff --git a/README.md b/README.md index f305021..8c21b7b 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ curl -L https://gitee.com/RubyMetric/chsrc/releases/download/pre/chsrc-x86-windo
Linux -- 支持 `DEB`,可通过 `apt`/`dpkg` 安装,感谢 [@sanchuanhehe] +- 可通过 `apt`/`dpkg` 安装,感谢 [@sanchuanhehe] ```bash $ sudo apt install ./chsrc__.deb diff --git a/pkg/README.md b/pkg/README.md index 7931c14..b99ee79 100644 --- a/pkg/README.md +++ b/pkg/README.md @@ -51,6 +51,6 @@ yay -S chsrc-git # Build from the latest main branch (stable) ## 打包情况 -- [x] `DEB` +- [x] `deb`
diff --git a/pkg/DEB/BUILD.md b/pkg/deb/BUILD.md similarity index 93% rename from pkg/DEB/BUILD.md rename to pkg/deb/BUILD.md index 4cf63fd..5c9331e 100644 --- a/pkg/DEB/BUILD.md +++ b/pkg/deb/BUILD.md @@ -7,10 +7,10 @@ ! Contributors : Aoran Zeng ! | ! Created On : <2025-06-14> - ! Last Modified : <2025-06-15> + ! Last Modified : <2025-06-16> ! ---------------------------------------------------------- --> -# 构建 DEB package +# 构建 deb package ## 准备 @@ -29,8 +29,8 @@ sudo apt-get install build-essential debhelper devscripts fakeroot git clone https://github.com/RubyMetric/chsrc.git cd chsrc -# 进入 DEB 目录 -cd pkg/DEB +# 进入 deb 目录 +cd pkg/deb # 执行构建命令 ./deb.makefile deb-make @@ -83,10 +83,10 @@ bash ./deb-installation-test.sh # 查看文档安装情况 man chsrc -# 查看 DEB 包的 copyright +# 查看 deb 包的 copyright cat /usr/share/doc/chsrc/copyright -# 查看 DEB 包 changelog +# 查看 deb 包 changelog zless /usr/share/doc/chsrc/changelog.Debian.gz ``` diff --git a/pkg/DEB/CI.md b/pkg/deb/CI.md similarity index 72% rename from pkg/DEB/CI.md rename to pkg/deb/CI.md index 24b65b6..105113d 100644 --- a/pkg/DEB/CI.md +++ b/pkg/deb/CI.md @@ -10,21 +10,21 @@ ! Last Modified : <2025-06-16> ! ---------------------------------------------------------- --> -# DEB package CI/CD +# deb package CI/CD -本文档说明了 chsrc 项目的 DEB 包自动构建和发布流程。 +本文档说明了 chsrc 项目的 deb 包自动构建和发布流程。 ## CI 文件 CI 维护者 [@sanchuanhehe](https://github.com/sanchuanhehe) -- [.github/workflows/pkg-DEB.yml](../../.github/workflows/pkg-DEB.yml) +- [.github/workflows/pkg-deb.yml](../../.github/workflows/pkg-deb.yml)
## 支持的架构 -当前支持以下架构的 DEB 包构建: +当前支持以下架构的 deb 包构建: - `amd64` (x86_64) @@ -34,7 +34,7 @@ CI 维护者 [@sanchuanhehe](https://github.com/sanchuanhehe) 每次 CI 构建会生成: -1. **DEB 包文件**: `chsrc_-1_.deb` +1. **deb 包文件**: `chsrc_-1_.deb` 2. **仓库元数据**: `Packages` 和 `Packages.gz` 文件用于创建 APT 仓库
@@ -42,10 +42,10 @@ CI 维护者 [@sanchuanhehe](https://github.com/sanchuanhehe) ## 自动触发 -DEB 包构建 CI 会在以下情况下自动触发: +deb 包构建 CI 会在以下情况下自动触发: -1. **Push 事件**:当 push 到 `gh-build` 分支时自动构建,并上传 DEB 包 到 `pre` 这个特定的 release 中 -2. **Release 事件**: 当创建新的 release 时自动构建,并上传 DEB 包到最新的这个 release 中 +1. **Push 事件**:当 push 到 `gh-build` 分支时自动构建,并上传 deb 包 到 `pre` 这个特定的 release 中 +2. **Release 事件**: 当创建新的 release 时自动构建,并上传 deb 包到最新的这个 release 中 2. **手动触发**: 可以在 GitHub Actions 页面手动触发构建
@@ -56,6 +56,6 @@ DEB 包构建 CI 会在以下情况下自动触发: 2. 更新版本号和 changelog 3. 创建并推送 git tag: `git tag v1.2.3 && git push origin v1.2.3` 4. 在 GitHub 上创建 release -5. CI 将自动构建并上传 DEB 包 +5. CI 将自动构建并上传 deb 包
diff --git a/pkg/DEB/README.md b/pkg/deb/README.md similarity index 76% rename from pkg/DEB/README.md rename to pkg/deb/README.md index 31f2cd9..72b2b22 100644 --- a/pkg/DEB/README.md +++ b/pkg/deb/README.md @@ -8,12 +8,12 @@ ! Contributors : Nil Null ! | ! Created On : <2025-06-14> - ! Last Modified : <2025-06-15> + ! Last Modified : <2025-06-16> ! ---------------------------------------------------------- --> -# DEB package +# deb package -本文档说明了 `chsrc` 项目的 DEB 包的相关情况 +本文档说明了 `chsrc` 项目的 deb 包的相关情况
@@ -24,24 +24,24 @@ -- `debian/` - DEB 包构建配置目录 +- `debian/` - deb 包构建配置目录 - `BUILD.md` - 如何手动构建 -- `deb.makefile` - DEB 包构建 Makefile -- `deb-installation-test.sh` - DEB 包 **已正确安装** 测试脚本 +- `deb.makefile` - deb 包构建 Makefile +- `deb-installation-test.sh` - deb 包 **已正确安装** 测试脚本
## 安装 -如果你是普通用户,你应该从 [GitHub Releases](https://github.com/RubyMetric/chsrc/releases) 下载合适的 DEB package,然后运行以下命令安装: +如果你是普通用户,你应该从 [GitHub Releases](https://github.com/RubyMetric/chsrc/releases) 下载合适的 deb 包,然后运行以下命令安装: ```bash sudo dpkg -i chsrc_*.deb sudo apt-get install -f # Fix any dependency issues ``` -如果你是高级用户,你可以自己阅读本目录下的 [./BUILD.md](./BUILD.md) 来自己构建 DEB 包并按照上述同样的方式安装。 +如果你是高级用户,你可以自己阅读本目录下的 [./BUILD.md](./BUILD.md) 来自己构建 deb 包并按照上述同样的方式安装。
diff --git a/pkg/DEB/deb-installation-test.sh b/pkg/deb/deb-installation-test.sh similarity index 87% rename from pkg/DEB/deb-installation-test.sh rename to pkg/deb/deb-installation-test.sh index ebd00c9..f6394ed 100644 --- a/pkg/DEB/deb-installation-test.sh +++ b/pkg/deb/deb-installation-test.sh @@ -7,14 +7,14 @@ # Contributors : Aoran Zeng # | # Created On : <2025-06-14> -# Last Modified : <2025-06-15> +# Last Modified : <2025-06-16> # -# Test script for DEB package installation +# Test script for deb package installation # -------------------------------------------------------------- set -e -echo "Testing installation of DEB package 'chsrc' ..." +echo "Testing installation of deb package 'chsrc' ..." # Test 1: Check if chsrc binary exists and is executable if [ ! -f "/usr/bin/chsrc" ]; then @@ -52,4 +52,4 @@ else exit 1 fi -echo "All installation tests of DEB package 'chsrc' passed!" +echo "All installation tests of deb package 'chsrc' passed!" diff --git a/pkg/DEB/deb.makefile b/pkg/deb/deb.makefile similarity index 76% rename from pkg/DEB/deb.makefile rename to pkg/deb/deb.makefile index 0c1e254..6e30da5 100755 --- a/pkg/DEB/deb.makefile +++ b/pkg/deb/deb.makefile @@ -7,9 +7,9 @@ # Contributors : Aoran Zeng # | # Created On : <2025-06-14> -# Last Modified : <2025-06-15> +# Last Modified : <2025-06-16> # -# DEB package targets +# deb package targets # # @issue https://github.com/RubyMetric/chsrc/pull/206 # 这些本是 debhelper 兼容性版本 (debian/compat) 为 9 时所需要定义的 targets @@ -20,18 +20,18 @@ all: deb-build deb-prepare: - @echo "Starting: Prepare for building DEB package" - @echo "Finished: Prepare for building DEB package" + @echo "Starting: Prepare for building deb package" + @echo "Finished: Prepare for building deb package" deb-build: deb-prepare - @echo "Starting: Build DEB package" + @echo "Starting: Build deb package" @debuild -us -uc -b - @echo "Finished: Build DEB package" + @echo "Finished: Build deb package" deb-clean: - @echo "Starting: Clean DEB build artifacts" + @echo "Starting: Clean deb build artifacts" -@rm -rf debian/chsrc/ -@rm -f ../chsrc_*.deb ../chsrc-dbgsym_*.ddeb ../chsrc_*.changes ../chsrc_*.buildinfo ../chsrc_*.build - @echo "Finished: Clean DEB build artifacts" + @echo "Finished: Clean deb build artifacts" .PHONY: deb-prepare deb-build deb-clean diff --git a/pkg/DEB/debian/changelog b/pkg/deb/debian/changelog similarity index 64% rename from pkg/DEB/debian/changelog rename to pkg/deb/debian/changelog index fbca3f0..427d356 100644 --- a/pkg/DEB/debian/changelog +++ b/pkg/deb/debian/changelog @@ -1,11 +1,11 @@ -chsrc (0.2.1-1) unstable; urgency=medium +chsrc (0.2.0-1) unstable; urgency=medium - * v0.2.1 已发布 + * v0.2.0 已发布 -- Aoran Zeng Sun, 15 Jun 2025 13:32:50 +0800 chsrc (0.0.1-1) unstable; urgency=medium - * Initial DEB package get packaged! + * Initial deb package get packaged! -- sanchuanhehe Mon, 10 Jun 2025 00:00:00 +0000 diff --git a/pkg/DEB/debian/control b/pkg/deb/debian/control similarity index 100% rename from pkg/DEB/debian/control rename to pkg/deb/debian/control diff --git a/pkg/DEB/debian/copyright b/pkg/deb/debian/copyright similarity index 99% rename from pkg/DEB/debian/copyright rename to pkg/deb/debian/copyright index 6b2ffa0..17c83ed 100644 --- a/pkg/DEB/debian/copyright +++ b/pkg/deb/debian/copyright @@ -14,7 +14,7 @@ Copyright: 2023-2025 Aoran Zeng 2023-2025 Heng Guo <2085471348@qq.com> License: MIT -Files: pkg/DEB/debian/* +Files: pkg/deb/debian/* Copyright: 2025 sanchuanhehe License: GPL-3+ diff --git a/pkg/DEB/debian/postinst b/pkg/deb/debian/postinst similarity index 94% rename from pkg/DEB/debian/postinst rename to pkg/deb/debian/postinst index e846cb4..ba58053 100755 --- a/pkg/DEB/debian/postinst +++ b/pkg/deb/debian/postinst @@ -2,12 +2,12 @@ # -------------------------------------------------------------- # SPDX-License-Identifier: GPL-3.0-or-later # -------------------------------------------------------------- -# DEB File : postinst +# deb File : postinst # File Authors : sanchuanhehe # Contributors : Nil Null # | # Created On : <2025-06-14> -# Last Modified : <2025-06-15> +# Last Modified : <2025-06-16> # # postinst script for chsrc # -------------------------------------------------------------- diff --git a/pkg/DEB/debian/prerm b/pkg/deb/debian/prerm similarity index 92% rename from pkg/DEB/debian/prerm rename to pkg/deb/debian/prerm index 291ad8b..c5e3250 100755 --- a/pkg/DEB/debian/prerm +++ b/pkg/deb/debian/prerm @@ -2,12 +2,12 @@ # -------------------------------------------------------------- # SPDX-License-Identifier: GPL-3.0-or-later # -------------------------------------------------------------- -# DEB File : prerm +# deb File : prerm # File Authors : sanchuanhehe # Contributors : Nil Null # | # Created On : <2025-06-14> -# Last Modified : <2025-06-15> +# Last Modified : <2025-06-16> # # prerm script for chsrc # -------------------------------------------------------------- diff --git a/pkg/DEB/debian/rules b/pkg/deb/debian/rules similarity index 98% rename from pkg/DEB/debian/rules rename to pkg/deb/debian/rules index 26f6d38..9e8b705 100755 --- a/pkg/DEB/debian/rules +++ b/pkg/deb/debian/rules @@ -35,7 +35,7 @@ # 3. dh binary (debian/rules override_dh_auto_install) # -------------------------------------------------------------- -# 由于 debuild 要寻找 debian/ 目录,因此当前工作目录一定在 pkg/DEB 下 +# 由于 debuild 要寻找 debian/ 目录,因此当前工作目录一定在 pkg/deb 下 Chsrc-Root-Dir = $(CURDIR)/../../ %: