Files
guru/www-apps/pleroma-fe/pleroma-fe-2.5.0.ebuild
Haelwenn (lanodan) Monnier ad49e6cb1d www-apps/pleroma-fe: new package, add 2.5.0, 9999
Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2023-09-19 08:20:52 +02:00

56 lines
1.3 KiB
Bash

# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Main frontend for www-apps/pleroma, inspired by qvitter"
HOMEPAGE="https://pleroma.social/ https://git.pleroma.social/pleroma/pleroma-fe"
if [[ "${PV}" == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma-fe"
else
SRC_URI="https://git.pleroma.social/pleroma/pleroma-fe/-/archive/${PV}/${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="AGPL-3 MIT ISC Apache-2.0"
SLOT="0"
IUSE=""
# Requires network access (https) as long as NPM dependencies aren't packaged
# said dependencies have their checksum verified via `yarn.lock`
RESTRICT="network-sandbox"
BDEPEND="
net-libs/nodejs
sys-apps/yarn
"
src_unpack() {
default
[[ "${PV}" == *9999 ]] && git-r3_src_unpack
cd "${S}" || die
yarn install --no-bin-links --frozen-lockfile --non-interactive || die
}
# FIXME src_prepare: Point to the correct source repo, needed for AGPL compliance
src_prepare() {
default
# https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1854
sed -i \
-e '/git rev-parse/,/^$/d' \
-e 's|let commitHash = .*|let commitHash = "'${PV}'";\n|' \
build/webpack.prod.conf.js || die
}
src_compile() {
yarn run build || die
}
src_install() {
insinto "/opt/pleroma-fe"
doins -r dist
}