www-apps/misskey: add 12.112.3
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: tastytea <tastytea@tastytea.de>
This commit is contained in:
tastytea 2022-07-10 16:10:22 +02:00
parent fd10473b38
commit 9352bbed7b
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 151 additions and 0 deletions

View File

@ -4,5 +4,7 @@ DIST misskey-12.111.0-deps.tar.xz 479852412 BLAKE2B 43fc478a98c1ef6d218bb1e94171
DIST misskey-12.111.0.tar.gz 4843837 BLAKE2B 1c6581b47d31cc31a4b391cb6520bdbb630f5b5a55edbc54f525ba20194d13586f1fce5b0133612d64654e6210c8129259bc38091d88cde52adf4a8a1072df71 SHA512 339c29ece7dccbc58a105e9f77e5aa3c1531887a29c17c3f0ef359a28b527c99bda7663d149ab9829db8ba4713a01c4b65c09045432f3648f56ceeae9a2d1353
DIST misskey-12.111.1-deps.tar.xz 479854680 BLAKE2B 715e18d9e42334d17293ddb8edb767a0c903433c0f3ae96d18849b903dc7ccc899162d422f04bba967d0dfc97a86cec63e8abd5c5b1c4d9f990fb91b2b5386c8 SHA512 379336d856b73c779db1e4876e69f4fecb6b830919f8873d418d02fa7e1c3f5d26d18c1d42881037c2135846e5d3cf325abe7dbbe89cc44774d42bd4e5a1d495
DIST misskey-12.111.1.tar.gz 4843917 BLAKE2B 57b3c315e7a91d732e30878b575fd8b167939f83cdd8291a6eab2bf3788278463ca1fc1fab1715cc1314796f772fe8cdf35217d2d975060d3f178739bde06018 SHA512 08a0c1f423456bcaa19be81eb0ca356702e2cc24615b4d101b9e4cafd80cbd90b27d90dddc40cbf20d94c483ea8f84c3356acc23191d200907305713040169a9
DIST misskey-12.112.3-deps.tar.xz 556337152 BLAKE2B f3138fdd370b65e4d263a7b7d33e52f99fcf3325d2ada57d793f90e005baeb0ae678ea2c04ed9655155dba97dc88821ec47a8a62b3861333bec41b11877f0e98 SHA512 dbdb56a37cd38b0f49ed32cee3b60ecbb1b5b51c62391406260642d5e14d817b6cd2ada7f209fc4ba00cc88c2bb959c575494fafee883a3de0db1d0c1a2b0b05
DIST misskey-12.112.3.tar.gz 19866516 BLAKE2B 5b5e921a61f281488ce0bcdeea49c0a50be89fcf108f4083c65039a0b474968c1ad26cb68ac1bc017c59400ba2033c6a85f4ed216e33ed9698a941bd40269774 SHA512 bbfe0d791ec7b16bbe3dd1a393c0cf60d9e58e0d039a53dcc1b71c610b3b362e22aae1c29f0ab91e3a77c05a8e25e167df41da58a4b1170acb056b9b0dacc0bb
DIST misskey-assets-0179793ec891856d6f37a3be16ba4c22f67a81b5.tar.gz 40471635 BLAKE2B 5305b5b316aa9d27f860e0e2c86f55eeb4140fd76c9cc7a753f78f93c509a10237033ec2109d2e806605f302d3fc9e9b916d2967053a4bce9b2cdea14df5885b SHA512 b4de7d8ab43f27e14372bb7246be4b032b142f22913ceaaa01e7631a1f702ba77ccf25482038cf2341f7a0ae92d54a1200bb654cac1d409b1ddcc113513b3f16
DIST misskey-assets-12.110.1.tar.gz 40471635 BLAKE2B 5305b5b316aa9d27f860e0e2c86f55eeb4140fd76c9cc7a753f78f93c509a10237033ec2109d2e806605f302d3fc9e9b916d2967053a4bce9b2cdea14df5885b SHA512 b4de7d8ab43f27e14372bb7246be4b032b142f22913ceaaa01e7631a1f702ba77ccf25482038cf2341f7a0ae92d54a1200bb654cac1d409b1ddcc113513b3f16

View File

@ -0,0 +1,149 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit optfeature savedconfig
# NOTE: update for each bump
MY_COMMIT_ASSETS="0179793ec891856d6f37a3be16ba4c22f67a81b5"
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://tastytea.de/files/gentoo/${P}-deps.tar.xz
"
# NOTE: to generate the deps archive:
# export YARN_CACHE_FOLDER="$(realpath ./packages-cache)"
# export CYPRESS_CACHE_FOLDER="$(realpath ./packages-cache)"
# export npm_config_cache="$(realpath ./packages-cache)"
# yarn clean-all && rm -r packages-cache
# yarn install
# tar -caf ${P}-deps.tar.xz packages-cache
# unset YARN_CACHE_FOLDER CYPRESS_CACHE_FOLDER npm_config_cache
LICENSE="GPL-3"
SLOT="0"
# KEYWORDS="~amd64"
IUSE="nginx +savedconfig source"
REQUIRED_USE="savedconfig"
RESTRICT="strip"
COMMON_DEPEND="
|| (
net-libs/nodejs:0/16
net-libs/nodejs:0/18
)
sys-apps/yarn
"
BDEPEND="
${COMMON_DEPEND}
dev-lang/nasm
virtual/pkgconfig
"
RDEPEND="
${COMMON_DEPEND}
acct-user/misskey
dev-db/postgresql
dev-db/redis
nginx? ( www-servers/nginx )
"
src_unpack() {
default
mv --no-target-directory assets-${MY_COMMIT_ASSETS} ${P}/${PN}-assets \
|| die "Could not move assets"
mv packages-cache ${T}/ || die "Could not move packages cache"
}
src_prepare() {
export YARNFLAGS="--offline --verbose --frozen-lockfile"
export YARN_CACHE_FOLDER="${T}"/packages-cache
export CYPRESS_CACHE_FOLDER="${T}"/packages-cache
export npm_config_cache="${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() {
yarn ${YARNFLAGS} install || die "dependency installation failed"
NODE_ENV=production yarn ${YARNFLAGS} 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 packages
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,packages,node_modules}" \
misskey || die "cleanup failed"
}
pkg_postinst() {
# Only run migrations if database exists
if su --login --command "psql misskey -c ''" postgres; then
einfo "Running 'yarn migrate'"
su --shell /bin/bash --login --command \
"cd misskey && yarn ${YARNFLAGS} --verbose 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 MY_PASSWORD || die "Reading password failed"
echo "create database misskey; create user misskey with encrypted password '${MY_PASSWORD}'; grant all privileges on database misskey to misskey; \q" \
| su --login --command psql postgres || die "database creation failed"
su --shell /bin/bash --login --command \
"cd misskey && yarn ${YARNFLAGS} 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\!"
}