blob: fd7e004178294b340e6da3e7702f4703edc47288 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# Maintainer: xuezhajv <liaozecheng123@163.com> qq群:293748695
# Contributor: github.com/FPSZ <
pkgname=sealantern
pkgver=1.1.0
pkgrel=1
pkgdesc="A lightweight Minecraft server management tool based on Tauri 2 + Rust + Vue 3 一个轻量化的 Minecraft 服务器管理工具 ,基于 Tauri 2 + Rust + Vue 3"
arch=('x86_64')
url="https://github.com/SeaLantern-Studio/SeaLantern"
license=('GPL-3.0-or-later')
depends=(
# GTK 相关基础依赖
'cairo'
'gdk-pixbuf2'
'glib2'
'gtk3'
'pango'
'atk'
'libgl'
# WebKit 相关依赖
'webkit2gtk' # 包含 javascriptcoregtk [citation:1]
'libsoup'
# 系统图标主题
'hicolor-icon-theme'
'adwaita-icon-theme'
# 桌面文件相关
'desktop-file-utils'
'shared-mime-info'
# 安全相关
'libxss' # X11 Screen Saver extension library [citation:2]
'nss'
'nspr'
# 系统托盘支持
'libayatana-appindicator'
'libappindicator-gtk3'
# 网络相关
'curl'
'wget'
'openssl'
'ca-certificates'
'gnutls'
# 图形相关
'libx11'
'libxcb'
'libxcomposite'
'libxcursor'
'libxdamage'
'libxext'
'libxfixes'
'libxi'
'libxrandr'
'libxrender'
'libxtst'
'libxss' # 对应 libxscrnsaver [citation:2]
# 字体支持
'fontconfig'
'freetype2'
# 音频支持
'alsa-lib'
'libpulse' # pulseaudio 的客户端库 [citation:3]
# 数据库支持
'sqlite3'
# 压缩支持
'zlib'
'bzip2'
'xz'
# 其他常用库
'expat'
'libffi'
'pcre'
'pcre2'
'libgcrypt'
'libgpg-error'
'libdatrie'
'libthai'
'libice'
'libsm'
'util-linux' # 包含 libuuid [citation:6]
'util-linux-libs' # 包含 libuuid 的库文件 [citation:6]
)
# 编译时需要的依赖
makedepends=(
'dpkg'
'binutils'
'file'
'findutils'
'grep'
'sed'
'gawk'
)
# 可选依赖(推荐但不是必须的)
optdepends=(
'ffmpeg: 视频/音频编解码支持'
'gst-plugins-base: GStreamer 基础插件'
'gst-plugins-good: GStreamer 优质插件'
'gst-plugins-bad: GStreamer 额外插件'
'gst-plugins-ugly: GStreamer 非自由插件'
'noto-fonts: 更好的字体显示'
'noto-fonts-cjk: 中日韩字体支持'
'noto-fonts-emoji: 表情符号支持'
)
options=('!strip' '!emptydirs')
install=sealantern.install
source=("https://github.com/SeaLantern-Studio/SeaLantern/releases/download/v1.1.0/Sea.Lantern_${pkgver}_amd64.deb")
sha256sums=('SKIP')
package() {
cd "${srcdir}"
echo "正在提取 Sea.Lantern_${pkgver}_amd64.deb ..."
# 使用 bsdtar 提取 deb 包(deb 实际上是 ar 压缩包)
# 首先提取整个 deb 包到临时目录
bsdtar -xf "Sea.Lantern_${pkgver}_amd64.deb" -C "${srcdir}"
# deb 包包含三个文件:debian-binary, control.tar.xz, data.tar.xz
# 我们需要提取 data.tar.xz 中的内容
if [[ -f "${srcdir}/data.tar.xz" ]]; then
bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}"
elif [[ -f "${srcdir}/data.tar.gz" ]]; then
bsdtar -xf "${srcdir}/data.tar.gz" -C "${pkgdir}"
elif [[ -f "${srcdir}/data.tar.zst" ]]; then
bsdtar -xf "${srcdir}/data.tar.zst" -C "${pkgdir}"
else
echo "错误:找不到 data.tar 文件"
ls -la "${srcdir}"
exit 1
fi
# 清理临时文件(可选)
rm -f "${srcdir}/debian-binary" "${srcdir}/control.tar."* "${srcdir}/data.tar."* 2>/dev/null || true
# 确保二进制文件在正确的位置
if [[ -f "${pkgdir}/usr/local/bin/sealantern" ]]; then
install -dm755 "${pkgdir}/usr/bin"
mv "${pkgdir}/usr/local/bin/sealantern" "${pkgdir}/usr/bin/"
rmdir "${pkgdir}/usr/local/bin" 2>/dev/null || true
rmdir "${pkgdir}/usr/local" 2>/dev/null || true
fi
# 检查是否有 desktop 文件,如果没有则使用我们提供的
if [[ ! -f "${pkgdir}/usr/share/applications/sealantern.desktop" ]]; then
if [[ -f "${srcdir}/sealantern.desktop" ]]; then
install -Dm644 "${srcdir}/sealantern.desktop" \
"${pkgdir}/usr/share/applications/sealantern.desktop"
fi
fi
# 检查是否有图标,如果没有则尝试从 AppImage 提取
if [[ ! -d "${pkgdir}/usr/share/icons/hicolor" ]] || \
[[ -z "$(find "${pkgdir}/usr/share/icons/hicolor" -name "*.png" 2>/dev/null)" ]]; then
echo "警告:未找到图标文件,可能需要手动添加"
fi
# 确保图标缓存更新钩子能工作
if [[ -d "${pkgdir}/usr/share/icons" ]]; then
find "${pkgdir}/usr/share/icons" -name "icon-theme.cache" -delete
fi
echo ""
echo "========================================="
echo "安装完成!"
echo "========================================="
echo "已安装的文件:"
find "${pkgdir}" -type f -name "sealantern*" -o -name "*.desktop" | head -20
echo ""
echo "依赖统计: ${#depends[@]} 个运行时依赖"
echo "========================================="
}
|