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
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