42 lines
891 B
Bash
42 lines
891 B
Bash
# Copyright 2026 Shin'ya Minazuki
|
|
EAPI=8
|
|
|
|
inherit git-r3 go-module systemd
|
|
|
|
DESCRIPTION="Self-hosted non-social social media (client)"
|
|
HOMEPAGE="https://yarn.social"
|
|
EGIT_REPO_URI="https://git.mills.io/yarnsocial/yarn.git"
|
|
EGIT_COMMIT="270a535202ee96f31457c69c6aec96581d97e5e9"
|
|
|
|
LICENSE="AGPL-3"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
|
|
|
BDEPEND="
|
|
>=dev-lang/go-1.25.0
|
|
"
|
|
|
|
DOCS=( AUTHORS README.md )
|
|
|
|
src_unpack() {
|
|
git-r3_src_unpack
|
|
go-module_live_vendor
|
|
}
|
|
|
|
src_compile() {
|
|
export VERSION="${PVR}"
|
|
export COMMIT="${EGIT_COMMIT}"
|
|
export BUILD="$(date +%Y-%m-%d)"
|
|
export CGO_ENABLED="0"
|
|
|
|
ego build \
|
|
-tags "netgo static_build" \
|
|
-installsuffix netgo \
|
|
-ldflags="-w -X git.mills.io/yarnsocial/yarn.Version=${VERSION} -X git.mills.io/yarnsocial/yarn.Commit=${COMMIT} -X git.mills.io/yarnsocial/yarn.Build=${BUILD}" \
|
|
./cmd/yarnc/...
|
|
}
|
|
|
|
src_install() {
|
|
dobin yarnc
|
|
einstalldocs
|
|
}
|