www-apps/sillytavern: new package, add 1.19.0
因为上游测试套件需要 npm devDependencies 与 Playwright 浏览器环境,打包形态无法运行,所以设置 `RESTRICT=test`。 Signed-off-by: Yongxiang Liang <tanekliang@gmail.com> Signed-off-by: Zakk <zakk@gentoozh.org>
This commit is contained in:
1 parent
384e7aa623
commit
d6d036dfa3
8 files changed
+128
No files matched your search
@@ -3018,6 +3018,16 @@ from_pattern = "(.*)-(.*)-(.*)"
|
||||
to_pattern = "\\1"
|
||||
github_account = ["oatiz", "gouwazi"]
|
||||
|
||||
["www-apps/sillytavern"]
|
||||
source = "github"
|
||||
github = "SillyTavern/SillyTavern"
|
||||
use_max_tag = true
|
||||
include_regex = "^\\d+\\.\\d+\\.\\d+$"
|
||||
github_account = "liangyongxiang"
|
||||
bundle = [
|
||||
{ id = "node_modules", repo = "gentoo-zh-drafts/SillyTavern", workflow = "node_modules.yml", tag = "v{PV}", inputs = { version = "{PV}" } },
|
||||
]
|
||||
|
||||
["x11-themes/bibata-cursor"]
|
||||
source = "github"
|
||||
github = "ful1e5/Bibata_Cursor"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
DIST sillytavern-1.19.0-node_modules.tar.xz 48595176 BLAKE2B 0948b4cb8ea1bb0cb6777ba204005f36ad58dec92a3e03eaa3e33ba9063ea2636fa7562b947556bcc8284025471456cefa5bce8209464c3549035023996949ac SHA512 fd5ef1de38e064db7f4106758a4fc3b71ffa05f0dd2a5d5773397353fc014d1d7d5352362d39e791baed8d9ce706d1370b7de3f9c6cb7b79ba32370b4e375bb5
|
||||
DIST sillytavern-1.19.0.tar.gz 38080517 BLAKE2B 660a9261df8dcb9ae7823b9ed666b36c9e6219a46c1004d9efe94a0036efd97d34c178f7929f8d6f05b8e53d71716c22752b35371aa3b232ef3b8a6bb40600d1 SHA512 ebae72d5c90212e58941f27b61293117d46bfca1ac6eb68c108b7c18d9dbd92da3e17a0f8b746cf879140386fef16f8a056993fb0b332b51360f6c3c8706fd50
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
data_dir="${XDG_DATA_HOME:-${HOME}/.local/share}/sillytavern"
|
||||
config_dir="${XDG_CONFIG_HOME:-${HOME}/.config}/sillytavern"
|
||||
mkdir -p "${data_dir}" "${config_dir}"
|
||||
exec node /usr/share/sillytavern/server.js \
|
||||
--dataRoot "${data_dir}" \
|
||||
--configPath "${config_dir}/config.yaml" "$@"
|
||||
@@ -0,0 +1,3 @@
|
||||
# /etc/conf.d/sillytavern: options for sillytavern.<user>
|
||||
# e.g. SILLYTAVERN_OPTS="--port 8010"
|
||||
SILLYTAVERN_OPTS=""
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
USER="${RC_SVCNAME#*.}"
|
||||
export HOME="$(getent passwd "${USER}" | cut -d: -f6)"
|
||||
name="SillyTavern for ${USER}"
|
||||
description="LLM frontend for power users"
|
||||
command="/usr/bin/sillytavern"
|
||||
command_user="${USER}"
|
||||
command_args="${SILLYTAVERN_OPTS}"
|
||||
error_log="${HOME}/.config/sillytavern/error.log"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
after net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
if [ "${USER}" = "${RC_SVCNAME}" ]; then
|
||||
eerror "Run this script through a per-user symlink:"
|
||||
eerror " ln -s ${RC_SVCNAME} /etc/init.d/${RC_SVCNAME}.<user>"
|
||||
return 1
|
||||
|
||||
elif [ "${USER}" = "root" ]; then
|
||||
eerror "Running as root is not supported; symlink for a regular user instead:"
|
||||
eerror " ln -s ${RC_SVCNAME%%.*} /etc/init.d/${RC_SVCNAME%%.*}.<user>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
checkpath -d -o "${USER}" "${HOME}/.config/sillytavern" "${HOME}/.local/share/sillytavern"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=SillyTavern LLM frontend for power users
|
||||
Documentation=https://docs.sillytavern.app/
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/sillytavern
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>tanekliang@gmail.com</email>
|
||||
<name>Yongxiang Liang</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">SillyTavern/SillyTavern</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,51 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit systemd
|
||||
|
||||
DESCRIPTION="LLM frontend for power users: text generation, image generation and TTS"
|
||||
HOMEPAGE="https://docs.sillytavern.app/"
|
||||
SRC_URI="
|
||||
https://github.com/SillyTavern/SillyTavern/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/gentoo-zh-drafts/SillyTavern/releases/download/v${PV}/${PN}-${PV}-node_modules.tar.xz
|
||||
"
|
||||
S="${WORKDIR}/SillyTavern-${PV}"
|
||||
|
||||
LICENSE="AGPL-3 0BSD Apache-2.0 BlueOak-1.0.0 BSD BSD-2 CC-BY-4.0 ISC LGPL-3 MIT WTFPL-2 ZLIB"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="
|
||||
dev-vcs/git
|
||||
>=net-libs/nodejs-20
|
||||
"
|
||||
|
||||
src_install() {
|
||||
local dir=/usr/share/${PN}
|
||||
local f
|
||||
|
||||
insinto "${dir}"
|
||||
doins server.js package.json plugins.js webpack.config.js
|
||||
doins -r src public default plugins
|
||||
doins -r "${WORKDIR}"/node_modules
|
||||
|
||||
# The server mkdirs these relative to its own directory when missing,
|
||||
# which fails under the read-only /usr/share.
|
||||
keepdir "${dir}/backups" "${dir}/public/scripts/extensions/third-party"
|
||||
|
||||
# doins drops the source modes; npm ships these executable and
|
||||
# node_modules/.bin symlinks point at them.
|
||||
while IFS= read -r f; do
|
||||
fperms +x "${dir}/${f#"${WORKDIR}"/}"
|
||||
done < <(find "${WORKDIR}"/node_modules -type f -perm /111)
|
||||
|
||||
DOCS=( LICENSE )
|
||||
einstalldocs
|
||||
newbin "${FILESDIR}"/sillytavern-launcher ${PN}
|
||||
systemd_douserunit "${FILESDIR}"/sillytavern.service
|
||||
newconfd "${FILESDIR}"/sillytavern-user.confd ${PN}
|
||||
newinitd "${FILESDIR}"/sillytavern-user.initd ${PN}
|
||||
}
|
||||
Reference in new issue
Block a user