forked from tastytea/overlay
www-apps/pleroma: Version bump 0.9.99
Package-Manager: Portage-2.3.51, Repoman-2.3.11 Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
This commit is contained in:
parent
709724814f
commit
b214bb3cee
|
@ -2,12 +2,14 @@
|
|||
Hash: SHA256
|
||||
|
||||
DIST pleroma-0.9.9.tar.bz2 29447938 BLAKE2B 94092b3583043a7737511959610ee81b4525a9b7f77a7743ec865adcb0f44c1287f10f07b6da8529113aa0f7f0533d9aae425aba295a560ca7523ddbf1c23aec SHA512 48df04a20d2891c9ace26bafac7e3ee07abd6b7d189e1b6bdd85143188745262995c56030c38d22c8125ee78a691bdf5b0e8eb8d8065fe9ff94a73e0638d4955
|
||||
DIST pleroma-0.9.99.tar.bz2 29584495 BLAKE2B 8286a4442a95c70c57eb91a9deb4504ee9a19575137f0008c02d5e5d952e56f0ac1bcd8821961cb351142242024f4e6d10ae3341967d096c4df657377e8cce59 SHA512 7e8ad23c57a9900d4dd0a83dc099e6d292699dd7300bf36188e893a91dac9532bdbe333556cd6016c0f3525e1aea3632c715ff11e6ec24cabcc8df51e1974049
|
||||
EBUILD pleroma-0.9.9-r2.ebuild 4260 BLAKE2B 506461b39c06a41485fb3ef88e8ccb18f09fb237d83f7d5ada2828e8ac4924b8b5e7c025e9aa1d890e9d0d910317bbd311074340613624edf7b7cb3c3fc04706 SHA512 9346555b5de2c3b1d1ecec037078c5c3acfee40183d829c25b514b8e64e5b7fe3b36d44f4dbe488984fa40675edd9151e9fb04761894b0a3dbb3d0fe0438905e
|
||||
EBUILD pleroma-0.9.99.ebuild 4448 BLAKE2B 9cb8c0f6870a41e11d3eb24070b1eeb1304c54928d6edd8f21b29fdbc0211394a85f5f4bae906b5959735f1c71bf22b1d0fe69b0cabc7d0ab8f0f47f0821998e SHA512 58112921f5ad16005fbd99f892b6b255848f3f0211a18801dc8289abcbb3d954657edbba43658239d0c48ddc1ce2183803a4d0c059c0cc1d3a24bd0181adf376
|
||||
MISC metadata.xml 993 BLAKE2B adc5c72fe12b6fdb4eb20c1d79dde227b088b437ffd21d16cc5775fa5bb7fa6363890dd5017fbe7f5a00a794a38fb298ce17e6402f6d3d5441985effd0d7e1db SHA512 6ff23fa60c0f22ef7a433e3d1b4919d074508898504b7168c925da8840f542afcdc891a9f4df69dc8eb6c44b7d9c41e6b94fdecd404ca738169124bcdab0af0d
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXHD8QQAKCRDPw5SX8bJu
|
||||
B6AGAP9vCCJCb3spp85s0GEknxXMb8RybzhAq1ulr+X69EzWKAD/WAX2ardIlP+c
|
||||
ZPVWhYW62tdCeXJFBe8IDsYH2N3nceY=
|
||||
=LrIc
|
||||
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCXIJgqAAKCRDPw5SX8bJu
|
||||
ByIqAP983TEuUqRcxKr7NadukAopiS1IjBR//mfH9H+ob1rSwQD/XSa8PM/TbdoK
|
||||
AzGVUl53PMA4yTDKc0TdqMixVSLr2EI=
|
||||
=Xg+e
|
||||
-----END PGP SIGNATURE-----
|
||||
|
|
153
www-apps/pleroma/pleroma-0.9.99.ebuild
Normal file
153
www-apps/pleroma/pleroma-0.9.99.ebuild
Normal file
|
@ -0,0 +1,153 @@
|
|||
# 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/v${PV}/${MY_P}.tar.bz2
|
||||
-> ${P}.tar.bz2"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="apache +nginx syslog"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-lang/elixir-1.6.6
|
||||
>=dev-db/postgresql-9.6.11[uuid]
|
||||
apache? ( www-servers/apache )
|
||||
nginx? ( www-servers/nginx )
|
||||
"
|
||||
DEPEND=""
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_preinst() {
|
||||
einfo "This ebuild comes with a lot of bundles libraries."
|
||||
|
||||
# Backup user-modified files
|
||||
if [ -f "${EROOT}/opt/pleroma/priv/static/instance/panel.html" ]; then
|
||||
einfo "Backing up panel.html, terms-of-service.html and thumbnail.jpeg ..."
|
||||
mv "${EROOT}/opt/pleroma/priv/static/instance/panel.html"{,~} || die
|
||||
mv "${EROOT}/opt/pleroma/priv/static/static/terms-of-service.html"{,~} || die
|
||||
mv "${EROOT}/opt/pleroma/priv/static/instance/thumbnail.jpeg"{,~} || die
|
||||
fi
|
||||
|
||||
ewarn "This ebuild may overwrite files you have edited. Waiting 10 seconds ..."
|
||||
elog "You can add files to CONFIG_PROTECT_MASK to prevent overwriting,"
|
||||
elog "See make.conf(5) for more information."
|
||||
sleep 10 || die
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup pleroma
|
||||
enewuser pleroma -1 -1 /opt/pleroma pleroma
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i 's|directory=~pleroma/pleroma|directory=~pleroma|' \
|
||||
"${S}/installation/init.d/pleroma" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local pleromadir="${EPREFIX}/opt/pleroma"
|
||||
|
||||
insopts -o pleroma -g pleroma -m 664
|
||||
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/*
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
# Restore user-modified files
|
||||
if [ -f "${EROOT}/opt/pleroma/priv/static/instance/panel.html~" ]; then
|
||||
einfo "Restoring panel.html, terms-of-service.html and thumbnail.jpeg ..."
|
||||
mv "${EROOT}/opt/pleroma/priv/static/instance/panel.html"{~,} || die
|
||||
mv "${EROOT}/opt/pleroma/priv/static/static/terms-of-service.html"{~,} || die
|
||||
mv "${EROOT}/opt/pleroma/priv/static/instance/thumbnail.jpeg"{~,} || die
|
||||
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."
|
||||
su -s /bin/sh -c "mix deps.get" pleroma || die
|
||||
|
||||
einfo "Generating the configuration..."
|
||||
einfo "Answer with yes if it asks you to install rebar3."
|
||||
su -s /bin/sh -c "mix pleroma.instance gen" pleroma || die
|
||||
mv config/{generated_config.exs,prod.secret.exs} || die
|
||||
|
||||
if use syslog; then
|
||||
echo -e "config :logger,\n backends: [{ExSyslogger, :ex_syslogger}]\n\n" \
|
||||
"config :logger, :ex_syslogger,\n level: :warn'" >> ${configfile}
|
||||
fi
|
||||
|
||||
einfo "Creating the database..."
|
||||
su -s /bin/sh -c "psql -f config/setup_db.psql" postgres || die
|
||||
|
||||
einfo "Running the database migration..."
|
||||
su -s /bin/sh -c "MIX_ENV=prod mix ecto.migrate" pleroma || 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..."
|
||||
su -s /bin/sh -c "mix deps.get" pleroma || die
|
||||
|
||||
einfo "Running the database migration..."
|
||||
su -s /bin/sh -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user