logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 64a18c61e2089e623b20f34715293d8bd4748952
parent 06c6b07a5e7ed029b0ec447ba4052be45e614eb7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 12 Jun 2023 09:36:49 +0200

www-apps/pleroma: add 9999

Diffstat:

Mwww-apps/pleroma/pleroma-2.5.2.ebuild16++++++++++++++--
Awww-apps/pleroma/pleroma-9999.ebuild73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+), 2 deletions(-)

diff --git a/www-apps/pleroma/pleroma-2.5.2.ebuild b/www-apps/pleroma/pleroma-2.5.2.ebuild @@ -7,8 +7,13 @@ inherit mix DESCRIPTION="ActivityPub social networking software compatible with other Fediverse software" HOMEPAGE="https://pleroma.social/" -SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v${PV}/${PN}-v${PV}.tar.gz" -S="${WORKDIR}/${PN}-v${PV}" +if [[ "${PV}" == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma" +else + SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v${PV}/${PN}-v${PV}.tar.gz" + S="${WORKDIR}/${PN}-v${PV}" +fi LICENSE="AGPL-3 CC-BY-SA-4.0 CC-BY-4.0" SLOT="otp" KEYWORDS="~amd64" @@ -40,6 +45,8 @@ RDEPEND=" src_unpack() { default + [[ "${PV}" == *9999 ]] && git-r3_src_unpack + cd "${S}" || die emix deps.get --only prod } @@ -47,6 +54,11 @@ src_unpack() { src_prepare() { default + # Point to the correct source repo, needed for AGPL compliance + if [[ "${PV}" == *9999 ]] && [[ -n "${EGIT_OVERRIDE_REPO}" ]]; then + sed -i "s!source_url: .*!source_url: \"${EGIT_OVERRIDE_REPO}\",!" mix.exs || die + fi + echo "import Mix.Config" > config/prod.secret.exs || die } diff --git a/www-apps/pleroma/pleroma-9999.ebuild b/www-apps/pleroma/pleroma-9999.ebuild @@ -0,0 +1,73 @@ +# Copyright 2022-2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit mix + +DESCRIPTION="ActivityPub social networking software compatible with other Fediverse software" +HOMEPAGE="https://pleroma.social/" +if [[ "${PV}" == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma" +else + SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v${PV}/${PN}-v${PV}.tar.gz" + S="${WORKDIR}/${PN}-v${PV}" +fi +LICENSE="AGPL-3 CC-BY-SA-4.0 CC-BY-4.0" +SLOT="otp" +KEYWORDS="~amd64" +IUSE="imagemagick ffmpeg exiftool" + +# Requires network access (https) as long as elixir dependencies aren't packaged +# said dependencies have their checksum verified via `mix.lock` +RESTRICT="network-sandbox" + +BDEPEND=" + dev-lang/erlang:= + dev-lang/elixir:= + dev-util/cmake + dev-util/rebar + dev-elixir/hex +" +DEPEND=" + sys-libs/ncurses:= + sys-apps/file +" +RDEPEND=" + ${DEPEND} + acct-user/pleroma + imagemagick? ( media-gfx/imagemagick ) + ffmpeg? ( media-video/ffmpeg ) + exiftool? ( media-libs/exiftool ) +" + +src_unpack() { + default + + [[ "${PV}" == *9999 ]] && git-r3_src_unpack + + cd "${S}" || die + emix deps.get --only prod +} + +src_prepare() { + default + + # Point to the correct source repo, needed for AGPL compliance + if [[ "${PV}" == *9999 ]] && [[ -n "${EGIT_OVERRIDE_REPO}" ]]; then + sed -i "s!source_url: .*!source_url: \"${EGIT_OVERRIDE_REPO}\",!" mix.exs || die + fi + + echo "import Mix.Config" > config/prod.secret.exs || die +} + +src_compile() { + mkdir -p pleroma || die + emix release --path pleroma +} + +src_install() { + insinto /opt/ + doins -r pleroma +}