Add www-apps/writefreely
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
a1cb5e1e2a
commit
fa56d7e669
8 changed files with 129 additions and 0 deletions
8
acct-group/writefreely/metadata.xml
Normal file
8
acct-group/writefreely/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>
|
||||||
6
acct-group/writefreely/writefreely-0.ebuild
Normal file
6
acct-group/writefreely/writefreely-0.ebuild
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit acct-group
|
||||||
|
|
||||||
|
ACCT_GROUP_ID=-1
|
||||||
8
acct-user/writefreely/metadata.xml
Normal file
8
acct-user/writefreely/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/writefreely/writefreely-0.ebuild
Normal file
10
acct-user/writefreely/writefreely-0.ebuild
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit acct-user
|
||||||
|
|
||||||
|
DESCRIPTION="Unprivileged user for WriteFreely"
|
||||||
|
ACCT_USER_ID=-1
|
||||||
|
ACCT_USER_GROUPS=( writefreely )
|
||||||
|
|
||||||
|
acct-user_add_deps
|
||||||
3
www-apps/writefreely/Manifest
Normal file
3
www-apps/writefreely/Manifest
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
DIST writefreely-0.16.0-deps.tar.gz 13382 BLAKE2B 54e56b60a76b8cda32d63a1a00d0a51134aad6512209b4c9a94794255b74595e1e3ba993161847ae1de815736f5045ffdf5f6d384aa7b9f659e5a250c3b3cccb SHA512 2f05a3cd55ed1d8991c5d153bb9c9ad4253d8d9588209a2bc9392de60fd35e48b6ef8d2fcdf6252cc922f9983da4a64477ed10a40c29e7190cc6b39ce163310f
|
||||||
|
DIST writefreely-0.16.0-static.tar.gz 13271 BLAKE2B a6e8993c12282e908d3cc3ad9443a636ea94cc36ce96ff2b02f2418c4e75cb7074f2526c3cb841cf3133023c7e8b5d93684b12f7c2026a3a8ca049e9b5af12b7 SHA512 9ecc27b7b9824bddcdec38255f8e0a986684fc1534b64d0cd10bdb21dbba76c5801b57d47e3d4d15307133fd16e4fd18ec8113ddc8da99d54e7b49829254f272
|
||||||
|
DIST writefreely-0.16.0.tar.gz 3530075 BLAKE2B ecc3ab7e2db981794b9c2f91033f319be99cc544706bf4585b10930277abef30346fe494660880e4e54cf0c36c5f1bc878d9d3c6d34de5696541f9bf590c0d73 SHA512 20e1b2e882d4a2789cdfd9fd09e9379d023ce3bd8cbc482fb3e6daa3c8f4c35e5b80b01e129ca8b65caae68867679ea0c93238d6b5129155e6d7a8fa661d7358
|
||||||
33
www-apps/writefreely/files/writefreely.initd-r0
Normal file
33
www-apps/writefreely/files/writefreely.initd-r0
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
supervisor="supervise-daemon"
|
||||||
|
|
||||||
|
command="/usr/bin/writefreely"
|
||||||
|
command_args="-c /etc/writefreely/config.ini"
|
||||||
|
command_user="writefreely:writefreely"
|
||||||
|
command_background="true"
|
||||||
|
extra_commands="genconf initdb"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
want caddy httpd nginx
|
||||||
|
}
|
||||||
|
|
||||||
|
genconf() {
|
||||||
|
ebegin "Generating configuration file..."
|
||||||
|
${command} ${command_args} config gen
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
initdb() {
|
||||||
|
ebegin "Initializing database..."
|
||||||
|
${command} ${command_args} --init-db
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
if ! checkpath --file /etc/${RC_SVCNAME}/config.ini; then
|
||||||
|
eerror "You need a configuration file to proceed"
|
||||||
|
fi
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
11
www-apps/writefreely/metadata.xml
Normal file
11
www-apps/writefreely/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>
|
||||||
|
<use>
|
||||||
|
<flag name="sqlite">Enable support for SQLite</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
||||||
50
www-apps/writefreely/writefreely-0.16.0.ebuild
Normal file
50
www-apps/writefreely/writefreely-0.16.0.ebuild
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit go-module optfeature
|
||||||
|
|
||||||
|
DESCRIPTION="An open-source platform for building a writing space on the web"
|
||||||
|
HOMEPAGE="https://writefreely.org"
|
||||||
|
SRC_URI="
|
||||||
|
https://github.com/writefreely/writefreely/archive/refs/tags/v0.16.0.tar.gz -> ${P}.tar.gz
|
||||||
|
https://mirror.chaotic.ninja/software/writefreely/${P}-deps.tar.gz
|
||||||
|
https://mirror.chaotic.ninja/software/writefreely/${P}-static.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="MIT"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
acct-group/writefreely
|
||||||
|
acct-user/writefreely
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
RESTRICT="mirror"
|
||||||
|
IUSE="+sqlite"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
if use sqlite; then
|
||||||
|
local BUILD_TAGS="netgo sqlite"
|
||||||
|
else
|
||||||
|
local BUILD_TAGS="netgo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export CGO_ENABLED="0"
|
||||||
|
|
||||||
|
ego build -tags "${BUILD_TAGS}" -ldflags "-s -w -X 'github.com/writefreely/writefreely.softwareVer=${PVR}'" -v -x ./cmd/...
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dobin writefreely
|
||||||
|
insinto "/usr/share/writefreely"
|
||||||
|
doins -r static
|
||||||
|
doins -r templates
|
||||||
|
newinitd "${FILESDIR}/writefreely.initd-r0"
|
||||||
|
keepdir "/etc/${PN}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
optfeature_header "Alternative SQL server support"
|
||||||
|
optfeature "MySQL" virtual/mysql
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue