# Copyright 2020-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit go-module DESCRIPTION="Alice - Through the Looking Glass" HOMEPAGE="https://github.com/alice-lg/alice-lg" SRC_URI=" https://github.com/alice-lg/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz https://conan.grifon.fr/ftp/gentoo/${P}-deps.tar.xz https://conan.grifon.fr/ftp/gentoo/${P}-node_modules.tar.xz " LICENSE="BSD" LICENSE+=" Apache-2.0 MIT" SLOT="0" KEYWORDS="~amd64" RESTRICT="test" BDEPEND=" sys-apps/yarn " DEPEND=" acct-group/alice-lg acct-user/alice-lg " RDEPEND="${DEPEND}" src_prepare() { eapply_user echo "yarn-offline-mirror \"${WORKDIR}/${P}-node_modules\"" >> ui/.yarnrc } src_compile() { # frontend pushd ui || die # We do not use the makefile for the frontend since we need to pass custom flags to yarn yarn install --offline --frozen-lockfile --no-progress || die yarn build || die popd # backend make -C cmd/alice-lg/ linux || die } src_install() { newinitd "${FILESDIR}/${PN}-initd" ${PN} newconfd "${FILESDIR}/${PN}-confd" ${PN} newbin "cmd/${PN}/${PN}-linux-${ARCH}" ${PN} insinto /etc newins "${S}/etc/${PN}/alice.example.conf" "${PN}.conf" }