From 9bf4cb1ce56a1b3658621b109c37d7a567df22b4 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 30 Sep 2019 19:27:39 +0200 Subject: [PATCH] www-apps/pleroma: Version bump 1.0.90. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07 --- www-apps/pleroma/Manifest | 9 +- www-apps/pleroma/pleroma-1.0.90.ebuild | 123 +++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 www-apps/pleroma/pleroma-1.0.90.ebuild diff --git a/www-apps/pleroma/Manifest b/www-apps/pleroma/Manifest index cf7b780..137d7a3 100644 --- a/www-apps/pleroma/Manifest +++ b/www-apps/pleroma/Manifest @@ -3,11 +3,12 @@ Hash: SHA256 AUX syslog.exs 193 BLAKE2B 63ec05041a10b7f3a5c7fbd8bf454819eafbd98efd635a2888d7db7333e212a872ea212889bb9ee81c1810bf9f55d6d7d7133e0a6619d23c9e3bdcac04d70c73 SHA512 fd47e00575a64cd519a1229ca429059eb9ca5c0a1e8454b56995606e25f9fcfad0107d92207eab41aad36ccf30b506a5475781225274fc55841fd55ec74928f1 EBUILD pleroma-1.0.7.ebuild 3372 BLAKE2B 87f1cad4fc3fffab3ebbca3b31305d2416a7ee063bc8a9d7a35ed95f3810426d6156f3a94eef54c91244592b5f89337a91705350339ba324467baebe68e5c07c SHA512 b1edd42895dab885d09be253de19ee6f0207b2b02afbd9f69ff5057566b7063494c1a7590ece725764df2b30781a206643999aacf76883f06ee5e75db8733131 +EBUILD pleroma-1.0.90.ebuild 3372 BLAKE2B 87f1cad4fc3fffab3ebbca3b31305d2416a7ee063bc8a9d7a35ed95f3810426d6156f3a94eef54c91244592b5f89337a91705350339ba324467baebe68e5c07c SHA512 b1edd42895dab885d09be253de19ee6f0207b2b02afbd9f69ff5057566b7063494c1a7590ece725764df2b30781a206643999aacf76883f06ee5e75db8733131 MISC metadata.xml 993 BLAKE2B adc5c72fe12b6fdb4eb20c1d79dde227b088b437ffd21d16cc5775fa5bb7fa6363890dd5017fbe7f5a00a794a38fb298ce17e6402f6d3d5441985effd0d7e1db SHA512 6ff23fa60c0f22ef7a433e3d1b4919d074508898504b7168c925da8840f542afcdc891a9f4df69dc8eb6c44b7d9c41e6b94fdecd404ca738169124bcdab0af0d -----BEGIN PGP SIGNATURE----- -iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXY08rgAKCRDPw5SX8bJu -B8FyAPwMd+havhJ2Fh4Hfr7SHb07pPefn8ZFsPK8zEF/vDnbRQD+JJd3vC9faPD1 -rUx463IAF3ArPdpI8/8Q0OVrmN4YGI4= -=nz9F +iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXZI7CgAKCRDPw5SX8bJu +B334AP0bFP0wLFVRzES1MsXsK3VQiVpKrvQ9c/tSiOG3veaLXQD/XjUMOoaRgxw9 +PXI6D64UbrT61GNoODTqTfs7OWj5nnA= +=jw/H -----END PGP SIGNATURE----- diff --git a/www-apps/pleroma/pleroma-1.0.90.ebuild b/www-apps/pleroma/pleroma-1.0.90.ebuild new file mode 100644 index 0000000..d156b0f --- /dev/null +++ b/www-apps/pleroma/pleroma-1.0.90.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit git-r3 user systemd + +DESCRIPTION="Microblogging server software that can federate with other servers." +HOMEPAGE="https://pleroma.social/ https://git.pleroma.social/pleroma/pleroma/" +EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma.git" +EGIT_COMMIT="v${PV}" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="apache +nginx syslog" + +RDEPEND=" + >=dev-lang/elixir-1.8.1 + >=dev-db/postgresql-9.6.13[uuid] + apache? ( www-servers/apache ) + nginx? ( www-servers/nginx[nginx_modules_http_slice] ) +" +DEPEND="" + +pkg_preinst() { + ewarn "This ebuild will overwrite modified files in /opt/pleroma/priv/static/" +} + +pkg_setup() { + enewgroup pleroma + enewuser pleroma -1 -1 /opt/pleroma pleroma +} + +src_install() { + insinto "/opt/pleroma" + insopts -o pleroma -g pleroma -m 0664 + doins -r * .* + # insopts doesn't affect directories. + chown -R pleroma:pleroma "${ED}/opt/pleroma" + chmod -R ug=rwX "${ED}/opt/pleroma" + + if use nginx; then + dodoc installation/pleroma.nginx + fi + if use apache; then + dodoc installation/pleroma-apache.conf + fi + + dodoc -r docs/* + + doinitd installation/init.d/pleroma + systemd_dounit installation/pleroma.service +} + +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 # Fresh install. + einfo "Installing the dependencies..." + einfo "Answer with yes if it asks you to install Hex." + su -ls /bin/bash -c "mix deps.get" pleroma || die + + einfo "Generating the configuration..." + einfo "Answer with yes if it asks you to install rebar3." + su -ls /bin/bash -c "mix pleroma.instance gen" pleroma || die + mv -v config/{generated_config.exs,prod.secret.exs} || die + + if use syslog; then + einfo "Activating syslog in ${configfile} ..." + cat "${FILESDIR}/syslog.exs" >> ${configfile} + fi + + einfo "Creating the database..." + su -ls /bin/bash -c "psql -f config/setup_db.psql" postgres || die + + einfo "Running the database migration..." + su -ls /bin/bash -c "MIX_ENV=prod mix ecto.migrate" pleroma || die + + einfo "Your configuration file is in ${configfile}." + else # Update. + einfo "Pleroma will be stopped for the duration of the update." + einfo "Hit enter to proceed." + read + + declare -i started=0 + if "${EROOT}"/etc/init.d/pleroma --nocolor status | grep -q 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..." + su -ls /bin/bash -c "mix deps.get" pleroma || die + + einfo "Running the database migration..." + su -ls /bin/bash -c "MIX_ENV=prod mix ecto.migrate" pleroma || die + + if [[ ${started} -eq 1 ]]; then + einfo "Starting pleroma..." + "${EROOT}"/etc/init.d/pleroma start || die + fi + fi + + if ! grep -q MIX_ENV ~pleroma/.profile 2>/dev/null; then + elog "Setting MIX_ENV=prod in ~pleroma/.profile ..." + echo "export MIX_ENV=prod" >> ~pleroma/.profile || die + fi +}