www-apps/pleroma: New package.
the build was successful Details

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
This commit is contained in:
tastytea 2019-02-23 03:22:49 +01:00
parent bdb113d49a
commit 06c57a279d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 162 additions and 0 deletions

13
www-apps/pleroma/Manifest Normal file
View File

@ -0,0 +1,13 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
DIST pleroma-0.9.9.tar.bz2 29447938 BLAKE2B 94092b3583043a7737511959610ee81b4525a9b7f77a7743ec865adcb0f44c1287f10f07b6da8529113aa0f7f0533d9aae425aba295a560ca7523ddbf1c23aec SHA512 48df04a20d2891c9ace26bafac7e3ee07abd6b7d189e1b6bdd85143188745262995c56030c38d22c8125ee78a691bdf5b0e8eb8d8065fe9ff94a73e0638d4955
EBUILD pleroma-0.9.9.ebuild 3183 BLAKE2B b13b57afc823b67a1b6897d8334d2dab6f3e3f926d94554c32407030b4c4dfa34170b2482123c159353c97db6a6f8537bd95531bc45f2c9c7dc1c6d3e490792c SHA512 4b05aa0d266bd3b0f341b58ee8a00fda775994f000c51c3b3862380cedf362b25a73b5d7a5a6b57c3e938857407f4271dd322614a69bb680e5761f8f9397d5a6
MISC metadata.xml 993 BLAKE2B adc5c72fe12b6fdb4eb20c1d79dde227b088b437ffd21d16cc5775fa5bb7fa6363890dd5017fbe7f5a00a794a38fb298ce17e6402f6d3d5441985effd0d7e1db SHA512 6ff23fa60c0f22ef7a433e3d1b4919d074508898504b7168c925da8840f542afcdc891a9f4df69dc8eb6c44b7d9c41e6b94fdecd404ca738169124bcdab0af0d
-----BEGIN PGP SIGNATURE-----
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXHCueQAKCRDPw5SX8bJu
B5eHAP46hsiW6IDU+r7StNoezBj7jubqPYDY979vf6JwPz4sRAD+OBSi+vq5wK64
IYadMjh1hdRb9ZrzQh16FkUVovwmui8=
=xtdF
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<longdescription>
Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support the same federation standards (OStatus and ActivityPub). Pleroma will federate with all servers that implement either OStatus or ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. For clients it supports both the GNU Social API with Qvitter extensions and the Mastodon client API.
</longdescription>
<maintainer type="person">
<email>gentoo@tastytea.de</email>
<name>tastytea</name>
</maintainer>
<upstream>
<bugs-to>https://git.pleroma.social/pleroma/pleroma/issues</bugs-to>
</upstream>
<use>
<flag name="apache">Installs a configuration file for apache.</flag>
<flag name="nginx">Installs a configuration file for nginx.</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,131 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit user systemd
MY_P="${PN}-v${PV}"
DESCRIPTION="Microblogging server software that can federate with other servers."
HOMEPAGE="https://pleroma.social/ https://git.pleroma.social/pleroma/pleroma/"
SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v0.9.9/${MY_P}.tar.bz2
-> ${P}.tar.bz2"
LICENSE="AGPL-3"
SLOT="0"
#KEYWORDS="~amd64 ~x86 ~arm"
KEYWORDS=""
IUSE="apache +nginx syslog systemd"
RDEPEND="
>=dev-lang/elixir-1.6.6
dev-vcs/git
>=dev-db/postgresql-9.6.11[uuid]
app-admin/sudo
apache? ( www-servers/apache )
nginx? ( www-servers/nginx )
"
DEPEND=""
S="${WORKDIR}/${MY_P}"
pkg_preinst() {
elog "This ebuild comes with a lot of bundles libraries."
}
pkg_setup() {
enewgroup pleroma
enewuser pleroma -1 - /opt/pleroma pleroma
}
src_prepare() {
default
if use syslog; then
# Log to syslog
sed -i 's/command_background=1/command_background=1\nerror_logger="logger"\noutput_logger="logger"/' \
"${S}/installation/init.d/pleroma" || die
fi
}
src_install() {
local pleromadir="${EPREFIX}/opt/pleroma"
insopts -o pleroma -g pleroma -m 644
insinto "${pleromadir}"
doins -r * .*
if use nginx; then
dodoc installation/pleroma.nginx
fi
if use apache; then
dodoc installation/pleroma-apache.conf
fi
dodoc docs/*
if use systemd; then
systemd_dounit installation/pleroma.service
else
doinitd installation/init.d/pleroma
fi
}
pkg_postinst() {
elog "You need to run emerge --config www-apps/pleroma after each upgrade."
if use nginx; then
einfo "An example config for nginx has been installed in the doc directory."
fi
if use apache; then
einfo "An example config for apache has been installed in the doc directory."
fi
}
pkg_config() {
local configfile="${EROOT}/opt/pleroma/config/prod.secret.exs"
cd "${EROOT}/opt/pleroma" || die
if [ ! -f ${configfile} ]; then
einfo "Installing the dependencies..."
einfo "Answer with yes if it asks you to install Hex."
sudo -u pleroma mix deps.get || die
einfo "Generating the configuration..."
einfo "Answer with yes if it asks you to install rebar3."
sudo -u pleroma mix pleroma.instance gen || die
mv -v config/{generated_config.exs,prod.secret.exs} || die
einfo "Creating the database..."
sudo -u postgres psql -f config/setup_db.psql || die
einfo "Running the database migration..."
sudo -u pleroma MIX_ENV=prod mix ecto.migrate || die
einfo "Your configuration file is in ${configfile}."
else
einfo "Pleroma will be stopped for the duration of the update."
einfo "Hit enter to proceed."
read
local started=0
if "${EROOT}"/etc/init.d/pleroma --nocolor status | grep started; then
started=1
fi
if [ ${started} -eq 1 ]; then
einfo "Stopping pleroma..."
"${EROOT}"/etc/init.d/pleroma stop || die
fi
einfo "Updating the dependencies..."
sudo -u pleroma mix deps.get || die
einfo "Running the database migration..."
sudo -u pleroma MIX_ENV=prod mix ecto.migrate || die
if [ ${started} -eq 1 ]; then
einfo "Starting pleroma..."
"${EROOT}"/etc/init.d/pleroma start || die
fi
fi
}