forked from tastytea/overlay
www-apps/misskey: drop 13.13.2
Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
parent
14d9b22bdc
commit
bdc8515ff4
|
@ -1,5 +1,3 @@
|
|||
DIST misskey-13.13.2-deps.tar.zst 505939411 BLAKE2B bdc74b5166558eeaaed652ef0a325699aa299db3aca07677fae319d58662a6e5d435b62aac4513b63452901190f68eb8b5722b3387b9dc18272a266042c924ec SHA512 93a174cadbceac472568bdafdfdd164de7920514e989c0fe36dd80ff08858b520ae89ba19a18ca8d0edbd39ff3c578d422732e4e8a5fb845be306fd69d828209
|
||||
DIST misskey-13.13.2.tar.gz 21239721 BLAKE2B f0f21bff48b1b1132fd916290fc3f5950d0a4ebeb22d6aa99d8f83690164b50a99d4931aa7b1ee7e1ea34fcbbbbdac2e8ff7c2bfd869a7ffa19748a98ae72ff2 SHA512 80291642d1e85d4f200555b1ef3259d02627018100cc1b6e21ab8399338fd4f41ca7b9119a0d21cb46ef3d4057d61bb7c97317ff6e4ddf4305d58617288544be
|
||||
DIST misskey-13.14.2-deps.tar.zst 528098935 BLAKE2B d024dd842016a0acbc3c9132725c98f7aa2a4bd60b5ff9abf33599b4e0762c62eed6201a5c91d6867d074a68df186c9069e83a0ebc74f10996dca26816279c8f SHA512 066ae54aac872a84b47bd0bb618eebd4e4bb01c727e3b3663f763ef9b9bde38fb1960ff169c7968508fd5cc083f0da618b749daf4e799900ec042e790881a1f0
|
||||
DIST misskey-13.14.2.tar.gz 21328093 BLAKE2B bfad80da44718b4b284371ccc84011e0b3e134051feccee4028c37ab5884f5c69a2a0cb789d8f05c87a870aff8f1a806f419a5b94d8aa02dc125293f8b780b6f SHA512 de45ea1fac6a673afd72b042c604e32b393d04f3239c922710d2ac4e1760562f13ed75af7387cd43a01543c5a3bae85f739d89150b4119caa935ffdef115c222
|
||||
DIST misskey-2023.9.3-deps.tar.zst 514711250 BLAKE2B 5c74e9bd231441e7c1d128e83e15ddce37af3d7fa5105daa24fdb25dd5fdbeff94f5b02e1cc5b5c7bab22fd14749388c8a693a12ee698b709207fe4ab8cdf345 SHA512 5811a46c787409f132ce4984d7021312e7d8f0d6d497e41750855e2326f4f2be99eebcfd3134c5e0b365f006d8d882e8a59e34af872cb772595089e9b3af8573
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit optfeature savedconfig unpacker
|
||||
|
||||
# NOTE: check for updates on each bump
|
||||
MY_COMMIT_ASSETS="0179793ec891856d6f37a3be16ba4c22f67a81b5"
|
||||
MY_COMMIT_EMOJIS="cae981eb4c5189ea9ea3230e83b876a5068df7d1"
|
||||
|
||||
DESCRIPTION="An interplanetary microblogging platform"
|
||||
HOMEPAGE="https://misskey-hub.net/"
|
||||
SRC_URI="
|
||||
https://github.com/misskey-dev/misskey/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
|
||||
https://github.com/misskey-dev/assets/archive/${MY_COMMIT_ASSETS}.tar.gz -> ${PN}-assets-${MY_COMMIT_ASSETS}.tar.gz
|
||||
https://github.com/misskey-dev/emojis/archive/${MY_COMMIT_EMOJIS}.tar.gz -> ${PN}-emojis-${MY_COMMIT_EMOJIS}.tar.gz
|
||||
https://tastytea.de/files/gentoo/${P}-deps.tar.zst
|
||||
"
|
||||
|
||||
# NOTE: to generate the deps archive:
|
||||
# export CYPRESS_CACHE_FOLDER="$(realpath ./packages-cache)"
|
||||
# export npm_config_cache="$(realpath ./packages-cache)"
|
||||
# pnpm config set store-dir "$(realpath ./packages-cache)"
|
||||
# pnpm install --frozen-lockfile
|
||||
# ZSTD_CLEVEL=9 tar -caf ${P}-deps.tar.zst packages-cache
|
||||
# unset CYPRESS_CACHE_FOLDER npm_config_cache
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="nginx +savedconfig source"
|
||||
|
||||
REQUIRED_USE="savedconfig"
|
||||
|
||||
RESTRICT="strip network-sandbox"
|
||||
|
||||
COMMON_DEPEND="
|
||||
>=net-libs/nodejs-18.16:=[npm]
|
||||
"
|
||||
BDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
app-arch/zstd
|
||||
dev-lang/nasm
|
||||
virtual/pkgconfig
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
acct-user/misskey
|
||||
>=dev-db/postgresql-15
|
||||
>=dev-db/redis-7
|
||||
nginx? ( www-servers/nginx )
|
||||
"
|
||||
|
||||
QA_PREBUILT="
|
||||
/opt/misskey/misskey/packages/backend/node_modules/msgpackr-extract/prebuilds/*
|
||||
/opt/misskey/misskey/packages/client/node_modules/microtime/prebuilds/*
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
# check if pnpm from nodejs is installed
|
||||
if ! type pnpm > /dev/null 2>&1; then
|
||||
eerror "pnpm not found. It can be installed with 'corepack enable'"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpacker_src_unpack
|
||||
mv --no-target-directory assets-${MY_COMMIT_ASSETS} ${P}/${PN}-assets \
|
||||
|| die "Could not move assets"
|
||||
mv --no-target-directory emojis-${MY_COMMIT_EMOJIS} ${P}/fluent-emojis \
|
||||
|| die "Could not move emojis"
|
||||
mv packages-cache "${T}"/ || die "Could not move packages cache"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
export CYPRESS_CACHE_FOLDER="${T}"/packages-cache
|
||||
export npm_config_cache="${T}"/packages-cache
|
||||
export PNPMFLAGS="--verbose"
|
||||
pnpm config set cache "${T}"/packages-cache
|
||||
pnpm config set store-dir "${T}"/packages-cache
|
||||
|
||||
# use system node-gyp
|
||||
PATH+=":/usr/lib64/node_modules/npm/bin/node-gyp-bin"
|
||||
export npm_config_nodedir=/usr/include/node/
|
||||
|
||||
restore_config .config/default.yml
|
||||
if [[ ! -f .config/default.yml ]]; then
|
||||
eerror "Edit .config/example.yml and save it to the location mentioned above"
|
||||
die "No config file found"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
pnpm ${PNPMFLAGS} install --frozen-lockfile || die "dependency installation failed"
|
||||
NODE_ENV=production pnpm ${PNPMFLAGS} run build || die "build failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto opt/misskey/misskey
|
||||
insopts -o misskey -g misskey
|
||||
if use source; then
|
||||
doins -r .
|
||||
else
|
||||
doins -r package.json .node-version .config built node_modules packages \
|
||||
fluent-emojis pnpm-workspace.yaml pnpm-lock.yaml
|
||||
fi
|
||||
|
||||
# insopts doesn't affect directories
|
||||
chown --recursive misskey:misskey "${ED}"/opt/misskey/misskey
|
||||
chmod o= "${ED}"/opt/misskey/misskey
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
||||
if use nginx; then
|
||||
sed -i 's/use logger$/use logger nginx/' "${ED}"/etc/init.d/${PN} \
|
||||
|| die "Could not modify OpenRC init script"
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# Apparently Misskey creates files at runtime that can interfere
|
||||
# after an upgrade. Normally you would run 'yarn cleanall'.
|
||||
einfo "Cleaning up Misskey directory …"
|
||||
su --shell /bin/bash --login --command \
|
||||
"rm -rf misskey/{built,node_modules} && rm -rf misskey/packages/{backend,client,sw}/{built,node_modules}" \
|
||||
misskey || die "cleanup failed"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Only run migrations if database exists
|
||||
if su --command "psql misskey -c ''" postgres; then
|
||||
einfo "Running migration…"
|
||||
su --shell /bin/bash --login --command \
|
||||
"cd misskey && pnpm run migrate" misskey || die "migration failed"
|
||||
else
|
||||
elog "Run emerge --config ${CATEGORY}/${PN} to initialise the PostgreSQL database"
|
||||
fi
|
||||
|
||||
if use nginx; then
|
||||
einfo "An nginx example config can be found at <https://misskey-hub.net/en/docs/admin/nginx.html>"
|
||||
fi
|
||||
|
||||
optfeature "thumbnail generation support" media-video/ffmpeg
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "Initialising PostgreSQL database"
|
||||
echo -n "password for misskey user: "
|
||||
read -r MY_PASSWORD || die "Reading password failed"
|
||||
echo "create database misskey with encoding = 'UTF8'; create user misskey with encrypted password '${MY_PASSWORD}'; grant all privileges on database misskey to misskey; \q" \
|
||||
| su --command psql postgres || die "database creation failed"
|
||||
|
||||
su --shell /bin/bash --login --command \
|
||||
"cd misskey && pnpm run init" misskey || die "database initialisation failed"
|
||||
|
||||
ewarn "When you first start Misskey you will be asked to add an admin account via the web interface, and registrations are enabled."
|
||||
ewarn "Do not expose the web interface to the public until after you configured your instance\!"
|
||||
}
|
Loading…
Reference in New Issue
Block a user