2026-05-18 13:11:34 -03:00
|
|
|
# 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
|
2026-05-18 18:14:51 -03:00
|
|
|
https://distfiles.chaotic.ninja/pub/writefreely/${P}-deps.tar.gz
|
|
|
|
|
https://distfiles.chaotic.ninja/pub/writefreely/${P}-static.tar.gz
|
2026-05-18 13:11:34 -03:00
|
|
|
"
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|