mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-01 04:03:00 +00:00
chore(debian): add packaging metadata; ignore debian/files
This commit is contained in:
parent
fdcb713a7d
commit
5bfadbd64d
9 changed files with 104 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -399,3 +399,6 @@ FodyWeavers.xsd
|
|||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# Debian packaging build outputs
|
||||
debian/files
|
||||
|
|
|
|||
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
v2rayn (7.15.3-0ppa1) noble; urgency=medium
|
||||
|
||||
* Initial PPA packaging (binary repackaging, no network at build time).
|
||||
|
||||
-- FlowerRealm <flower_realm@outlook.com> Fri, 18 Oct 2024 20:30:00 +0000
|
||||
2
debian/clean
vendored
Normal file
2
debian/clean
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
build/
|
||||
|
||||
15
debian/control
vendored
Normal file
15
debian/control
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Source: v2rayn
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: FlowerRealm <flower_realm@outlook.com>
|
||||
Standards-Version: 4.7.0
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
|
||||
Package: v2rayn
|
||||
Architecture: amd64 arm64
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}, desktop-file-utils, xdg-utils
|
||||
Description: v2rayN (Avalonia) — Linux 桌面客户端
|
||||
v2rayN 是一个支持多核心的跨平台 GUI 客户端(Avalonia),
|
||||
支持 Xray-core、sing-box 等核心。该包以预编译二进制重打包
|
||||
的方式发布,便于在 Launchpad PPA 无网络环境构建。
|
||||
14
debian/copyright
vendored
Normal file
14
debian/copyright
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: v2rayN
|
||||
Source: https://github.com/FlowerRealm/v2rayN
|
||||
|
||||
Files: *
|
||||
Copyright: 2017-2025 FlowerRealm
|
||||
License: GPL-3.0
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 3.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License version 3 can be found in
|
||||
/usr/share/common-licenses/GPL-3.
|
||||
|
||||
50
debian/rules
vendored
Executable file
50
debian/rules
vendored
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
# 推断目标 RID(按构建机架构)
|
||||
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
ifeq ($(DEB_HOST_ARCH),amd64)
|
||||
RID := linux-x64
|
||||
else ifeq ($(DEB_HOST_ARCH),arm64)
|
||||
RID := linux-arm64
|
||||
else
|
||||
$(error Unsupported architecture $(DEB_HOST_ARCH))
|
||||
endif
|
||||
|
||||
# 预编译产物期望位置(随源包一起上传)
|
||||
PREBUILT_DIR := packaging/prebuilt/$(RID)
|
||||
OUT_DIR := build/out
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
@echo "[info] 使用预编译产物重打包: $(PREBUILT_DIR)"
|
||||
test -d "$(PREBUILT_DIR)" || { \
|
||||
echo "[error] 未找到预编译目录 $(PREBUILT_DIR)"; \
|
||||
echo "请在打包前将 dotnet publish 的输出放入该目录 (参考 README)"; \
|
||||
exit 1; \
|
||||
}
|
||||
rm -rf "$(OUT_DIR)" && mkdir -p "$(OUT_DIR)"
|
||||
cp -a "$(PREBUILT_DIR)/"* "$(OUT_DIR)/"
|
||||
|
||||
override_dh_auto_install:
|
||||
# 安装主体到 /usr/lib/v2rayn
|
||||
mkdir -p debian/v2rayn/usr/lib/v2rayn
|
||||
cp -a "$(OUT_DIR)/"* debian/v2rayn/usr/lib/v2rayn/
|
||||
|
||||
# 包装启动器到 /usr/bin
|
||||
install -Dm0755 debian/scripts/v2rayn debian/v2rayn/usr/bin/v2rayn
|
||||
|
||||
# 安装 desktop 条目与图标
|
||||
install -Dm0644 debian/v2rayn.desktop debian/v2rayn/usr/share/applications/v2rayN.desktop
|
||||
# 优先使用构建输出中的图标
|
||||
if [ -f "$(OUT_DIR)/v2rayN.png" ]; then \
|
||||
install -Dm0644 "$(OUT_DIR)/v2rayN.png" debian/v2rayn/usr/share/icons/hicolor/256x256/apps/v2rayN.png; \
|
||||
fi
|
||||
|
||||
override_dh_auto_clean:
|
||||
rm -rf "$(OUT_DIR)"
|
||||
|
||||
4
debian/scripts/v2rayn
vendored
Normal file
4
debian/scripts/v2rayn
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
exec /usr/lib/v2rayn/v2rayN "$@"
|
||||
|
||||
2
debian/source/format
vendored
Normal file
2
debian/source/format
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
3.0 (native)
|
||||
|
||||
9
debian/v2rayn.desktop
vendored
Normal file
9
debian/v2rayn.desktop
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=v2rayN
|
||||
Comment=A GUI client for Xray-core/sing-box (Avalonia)
|
||||
Exec=v2rayn
|
||||
Icon=v2rayN
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;Application;
|
||||
|
||||
Loading…
Reference in a new issue