diff --git a/www-apps/yarnd/yarnd-0.15.1.ebuild b/www-apps/yarnd/yarnd-0.15.1.ebuild new file mode 100644 index 0000000..95d92d2 --- /dev/null +++ b/www-apps/yarnd/yarnd-0.15.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 2026 Shin'ya Minazuki +EAPI=8 + +inherit git-r3 go-module systemd + +DESCRIPTION="Self-hosted non-social social media (daemon)" +HOMEPAGE="https://yarn.social" +EGIT_REPO_URI="https://git.mills.io/yarnsocial/yarn.git" +EGIT_COMMIT="c0db0757b8e7067baa90a037bf5aeb106a4dea10" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +# There's also other two build dependencies, +# but they are not required for building, and no user +# I know gives a crap. +BDEPEND=" + >=dev-lang/go-1.25.0 + dev-util/minify +" +RDEPEND=" + acct-group/yarnd + acct-user/yarnd +" + +DOCS=( AUTHORS README.md ) + +src_unpack() { + git-r3_src_unpack + go-module_live_vendor +} + +src_configure() { + einfo "Bundling CSS files..." + minify -b -o ./internal/theme/static/css/yarn.min.css ./internal/theme/static/css/[0-9]*-*.css + minify -b -o ./internal/theme/static/css/noscript.min.css ./internal/theme/static/css/noscript.css + einfo "Bundiling JS files..." + minify -b -o ./internal/theme/static/js/yarn.min.js ./internal/theme/static/js/[0-9]*-*.js +} + +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/yarnd/... +} + +src_install() { + dosbin yarnd + newinitd "${FILESDIR}/yarnd.initd-r1" "${PN}" + newconfd "${FILESDIR}/yarnd.confd-r1" "${PN}" + systemd_dounit "${FILESDIR}/yarnd.service" + einstalldocs +}