# 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 -rf 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 network-sandbox" COMMON_DEPEND=" >=net-libs/nodejs-16:=[npm] " 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\!" }