Use standard lower-case deb

This commit is contained in:
Aoran Zeng
2025-06-16 16:45:32 +08:00
parent 02c3a815de
commit 975b2391cb
16 changed files with 61 additions and 61 deletions

View File

@@ -51,6 +51,6 @@ yay -S chsrc-git # Build from the latest main branch (stable)
## 打包情况
- [x] `DEB`
- [x] `deb`
<br>

View File

@@ -7,10 +7,10 @@
! Contributors : Aoran Zeng <ccmywish@qq.com>
! |
! 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
```

View File

@@ -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)
<br>
## 支持的架构
当前支持以下架构的 DEB 包构建:
当前支持以下架构的 deb 包构建:
- `amd64` (x86_64)
@@ -34,7 +34,7 @@ CI 维护者 [@sanchuanhehe](https://github.com/sanchuanhehe)
每次 CI 构建会生成:
1. **DEB 包文件**: `chsrc_<version>-1_<arch>.deb`
1. **deb 包文件**: `chsrc_<version>-1_<arch>.deb`
2. **仓库元数据**: `Packages``Packages.gz` 文件用于创建 APT 仓库
<br>
@@ -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 页面手动触发构建
<br>
@@ -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
<br>

View File

@@ -8,12 +8,12 @@
! Contributors : Nil Null <nil@null.org>
! |
! Created On : <2025-06-14>
! Last Modified : <2025-06-15>
! Last Modified : <2025-06-16>
! ---------------------------------------------------------- -->
# DEB package
# deb package
本文档说明了 `chsrc` 项目的 DEB 包的相关情况
本文档说明了 `chsrc` 项目的 deb 包的相关情况
<br>
@@ -24,24 +24,24 @@
<wbr>
- `debian/` - DEB 包构建配置目录
- `debian/` - deb 包构建配置目录
- `BUILD.md` - 如何手动构建
- `deb.makefile` - DEB 包构建 Makefile
- `deb-installation-test.sh` - DEB**已正确安装** 测试脚本
- `deb.makefile` - deb 包构建 Makefile
- `deb-installation-test.sh` - deb**已正确安装** 测试脚本
<br>
## 安装
如果你是普通用户,你应该从 [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 包并按照上述同样的方式安装。
<br>

View File

@@ -7,14 +7,14 @@
# Contributors : Aoran Zeng <ccmywish@qq.com>
# |
# 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!"

View File

@@ -7,9 +7,9 @@
# Contributors : Aoran Zeng <ccmywish@qq.com>
# |
# 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

View File

@@ -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 <ccmywish@qq.com> 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 <wyihe5520@gmail.com> Mon, 10 Jun 2025 00:00:00 +0000

View File

@@ -14,7 +14,7 @@ Copyright: 2023-2025 Aoran Zeng <ccmywish@qq.com>
2023-2025 Heng Guo <2085471348@qq.com>
License: MIT
Files: pkg/DEB/debian/*
Files: pkg/deb/debian/*
Copyright: 2025 sanchuanhehe <wyihe5520@gmail.com>
License: GPL-3+

View File

@@ -2,12 +2,12 @@
# --------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
# --------------------------------------------------------------
# DEB File : postinst
# deb File : postinst
# File Authors : sanchuanhehe <wyihe5520@gmail.com>
# Contributors : Nil Null <nil@null.org>
# |
# Created On : <2025-06-14>
# Last Modified : <2025-06-15>
# Last Modified : <2025-06-16>
#
# postinst script for chsrc
# --------------------------------------------------------------

View File

@@ -2,12 +2,12 @@
# --------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
# --------------------------------------------------------------
# DEB File : prerm
# deb File : prerm
# File Authors : sanchuanhehe <wyihe5520@gmail.com>
# Contributors : Nil Null <nil@null.org>
# |
# Created On : <2025-06-14>
# Last Modified : <2025-06-15>
# Last Modified : <2025-06-16>
#
# prerm script for chsrc
# --------------------------------------------------------------

View File

@@ -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)/../../
%: