Add www-apps/prosody-filer
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
1f36bc1583
commit
57c384b38c
8 changed files with 122 additions and 0 deletions
8
acct-group/prosody-filer/metadata.xml
Normal file
8
acct-group/prosody-filer/metadata.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>shinyoukai@laidback.moe</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
7
acct-group/prosody-filer/prosody-filer-0.ebuild
Normal file
7
acct-group/prosody-filer/prosody-filer-0.ebuild
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=-1
|
||||
|
||||
8
acct-user/prosody-filer/metadata.xml
Normal file
8
acct-user/prosody-filer/metadata.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>shinyoukai@laidback.moe</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
10
acct-user/prosody-filer/prosody-filer-0.ebuild
Normal file
10
acct-user/prosody-filer/prosody-filer-0.ebuild
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit acct-user
|
||||
|
||||
DESCRIPTION="System user for prosody-filer"
|
||||
ACCT_USER_ID=-1
|
||||
ACCT_USER_GROUPS=( prosody-filer )
|
||||
|
||||
acct-user_add_deps
|
||||
23
www-apps/prosody-filer/files/prosody-filer.initd-r0
Normal file
23
www-apps/prosody-filer/files/prosody-filer.initd-r0
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
command="/usr/sbin/prosody-filer"
|
||||
command_args="-config /etc/prosody-filer.toml"
|
||||
command_background="true"
|
||||
command_user="prosody-filer"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
want apache
|
||||
want caddy
|
||||
want nginx
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
ebegin "Checking for the existence of /etc/${RC_SVCNAME}.toml ..."
|
||||
if ! checkpath --file /etc/${RC_SVCNAME}.toml; then
|
||||
eerror "Configuration file not found."
|
||||
eerror "Bailing out."
|
||||
fi
|
||||
}
|
||||
15
www-apps/prosody-filer/files/prosody-filer.service
Normal file
15
www-apps/prosody-filer/files/prosody-filer.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=A simple file server for handling XMPP upload requests
|
||||
After=network-online.target
|
||||
After=ejabberd.service
|
||||
After=prosody.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/prosody-filer -config /etc/prosody-filer.toml
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
User=prosody-filer
|
||||
Group=prosody-filer
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
11
www-apps/prosody-filer/metadata.xml
Normal file
11
www-apps/prosody-filer/metadata.xml
Normal file
|
|
@ -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>shinyoukai@laidback.moe</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">ThomasLeister/prosody-filer</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
40
www-apps/prosody-filer/prosody-filer-20260327.ebuild
Normal file
40
www-apps/prosody-filer/prosody-filer-20260327.ebuild
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit git-r3 go-module systemd
|
||||
|
||||
DESCRIPTION="A simple file server for handling XMPP upload requests"
|
||||
HOMEPAGE="https://github.com/ThomasLeister/prosody-filer"
|
||||
EGIT_REPO_URI="https://github.com/ThomasLeister/prosody-filer"
|
||||
EGIT_COMMIT="bd3c2fe1fbd81758503ac3faeba68ba13308ca38"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="
|
||||
acct-group/prosody-filer
|
||||
acct-user/prosody-filer
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
git-r3_src_unpack
|
||||
go-module_live_vendor
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ego build -x -v -o ${PN} ${PN}.go
|
||||
}
|
||||
|
||||
src_install() {
|
||||
newinitd "${FILESDIR}/prosody-filer.initd-r0" "${PN}"
|
||||
systemd_dounit "${FILESDIR}/prosody-filer.service"
|
||||
dosbin "${PN}"
|
||||
insinto "/usr/share/doc/${PF}"
|
||||
doins config.example.toml
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "This will not work without a reverse proxy"
|
||||
elog "It's advised to emerge www-servers/apache or www-servers/nginx"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue