openwrite
LOW
maintainer lzsnyy
0 votes
scanned 2026-08-29 07:38:41.750184
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: lzsnyy <710080675@qq.com>
2
# Contributor: LiPu-jpg (original author) <https://github.com/LiPu-jpg>
3
4
pkgname=openwrite
5
pkgver=5.8.0
6
_commit=20500493c10a211fdf2560e69558da1c39eab3b4
7
pkgrel=2
8
pkgdesc="OpenWrite 长篇小说创作引擎 — AI 辅助小说创作,对话式引导、四级大纲、风格合成与 Studio 工作台"
9
arch=('any')
10
url="https://github.com/LiPu-jpg/Openwrite"
11
license=('Apache-2.0')
12
depends=('python>=3.10')
13
makedepends=()
14
optdepends=('git: launcher 源码自动更新')
15
install="${pkgname}.install"
16
17
# 上游未打 tag,固定到 main 分支最新提交
18
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${_commit}.tar.gz")
19
sha256sums=('aef5b57bd8f3795fef422dd14bdac906a58a5909c5cc8e9ac168514502bafbc3')
20
21
prepare() {
22
cd "Openwrite-${_commit}"
23
}
24
25
package() {
26
cd "Openwrite-${_commit}"
27
28
# 源码整体安装到 /opt/openwrite,由 openwrite-launcher 首次运行时
29
# 自行在 ~/.openwrite-runtime 创建隔离 Python 环境并安装依赖
30
install -d "${pkgdir}/opt"
31
cp -a --no-preserve=ownership . "${pkgdir}/opt/${pkgname}"
32
rm -rf "${pkgdir}/opt/${pkgname}/"{.git,.github,live_tests,assets/screenshots}
33
34
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
35
install -Dm644 assets/logo-light.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
36
37
install -d "${pkgdir}/usr/bin"
38
cat > "${pkgdir}/usr/bin/openwrite" <<EOF
39
#!/bin/sh
40
export PYTHONPATH="/opt/${pkgname}"
41
exec python3 -c 'import sys; from tools.cli import main; sys.exit(main())' "\$@"
42
EOF
43
cat > "${pkgdir}/usr/bin/openwrite-launcher" <<EOF
44
#!/bin/sh
45
export PYTHONPATH="/opt/${pkgname}"
46
exec python3 -c 'import sys; from tools.desktop_launcher import main; sys.exit(main())' "\$@"
47
EOF
48
chmod 755 "${pkgdir}/usr/bin/openwrite" "${pkgdir}/usr/bin/openwrite-launcher"
49
50
# systemd 用户服务:openwrite-studio 包装脚本负责引导 ~/.openwrite-runtime
51
# 运行环境后在前台启动 Studio,由 systemd 管理生命周期
52
install -Dm755 "${startdir}/openwrite-studio" "${pkgdir}/usr/bin/openwrite-studio"
53
install -Dm644 "${startdir}/openwrite.service" \
54
"${pkgdir}/usr/lib/systemd/user/openwrite.service"
55
}
56
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-29 07:38:41 | Low | 1 |