refactor: 升级依赖版本并优化构建系统

- 升级核心依赖 (axum 0.8, tower-http 0.6, alsa 0.11 等)
- 简化交叉编译配置,切换至 Debian 11 提高兼容性
- 新增 Debian 包打包支持 (debuerreotype 模板)
- 移除独立的 mjpeg 解码器,简化视频模块
- 静态链接 libx264/libx265/libopus 到二进制
This commit is contained in:
mofeng-git
2026-01-10 10:59:00 +08:00
parent 3fa91772f0
commit e670f1ffd1
46 changed files with 893 additions and 1156 deletions

View File

@@ -0,0 +1,5 @@
one-kvm ({version}) stable; urgency=low
* Initial release
-- SilentWind <admin@mofeng.run> {date}

22
build/debian/control.tpl Normal file
View File

@@ -0,0 +1,22 @@
Source: one-kvm
Section: admin
Priority: optional
Maintainer: SilentWind <admin@mofeng.run>
Package: one-kvm
Architecture: {arch}
Depends: ${{auto}}, ca-certificates{distsuffix}
Description: A open and lightweight IP-KVM solution written in Rust
Enables BIOS-level remote management of servers and workstations.
.
One-KVM provides video capture, HID emulation (keyboard/mouse),
mass storage device forwarding, and ATX power control for
remote server management over IP.
.
Features:
* Hardware-accelerated video encoding (VAAPI, QSV, RKMPP)
* WebRTC and MJPEG streaming with low latency
* USB HID emulation via OTG gadget
* Mass storage device for ISO/IMG mounting
* ATX power control via GPIO or USB relay
Homepage: https://github.com/mofeng-git/One-KVM

29
build/debian/copyright Normal file
View File

@@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: one-kvm
Source: https://github.com/mofeng-git/one-KVM
Files: *
Copyright: 2025 One-KVM contributors
License: GPL-2.0
Files: libs/ventoy-img-rs/resources/*
Copyright: Ventoy contributors
License: GPL-2.0
License: GPL-2.0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
On Debian systems, the full text of the GNU General Public License
version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.

39
build/debian/postinst.tpl Normal file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Post-installation script for one-kvm
set -e
case "$1" in
configure|abort-upgrade|abort-remove|abort-deconfigure)
# Create data directory
mkdir -p /var/lib/one-kvm/ventoy
mkdir -p /var/log/one-kvm
# Set permissions
chmod 755 /var/lib/one-kvm
chmod 755 /var/lib/one-kvm/ventoy
chmod 755 /var/log/one-kvm
# Enable and start service (if systemd is available)
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl enable one-kvm
# Don't start here, let user configure first
fi
;;
triggered)
# Handle triggers (e.g., systemd restart)
if [ -d /run/systemd/system ]; then
systemctl restart one-kvm || true
fi
;;
abort-rollback|failed-upgrade)
exit 0
;;
*)
echo "postinst called with unknown argument: $1" >&2
exit 1
;;
esac
exit 0

28
build/debian/prerm.tpl Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# Pre-removal script for one-kvm
set -e
case "$1" in
remove|purge)
# Stop service if running
if [ -d /run/systemd/system ]; then
systemctl stop one-kvm || true
systemctl disable one-kvm || true
fi
;;
upgrade|deconfigure)
# Keep data on upgrade
:
;;
failed-upgrade)
# Handle upgrade failure
:
;;
*)
echo "prerm called with unknown argument: $1" >&2
exit 1
;;
esac
exit 0