forked from tastytea/overlay
www-apps/misskey: use pnpm wrapper
This commit is contained in:
parent
a30767e169
commit
887db10ad3
|
@ -56,13 +56,12 @@ QA_PREBUILT="
|
||||||
/opt/misskey/misskey/packages/client/node_modules/microtime/prebuilds/*
|
/opt/misskey/misskey/packages/client/node_modules/microtime/prebuilds/*
|
||||||
"
|
"
|
||||||
|
|
||||||
enable_pnpm_temp() {
|
pnpm() {
|
||||||
# enable pnpm (part of nodejs) temporarily if it isn't available
|
# use the pnpm from nodejs if it isn't available otherwise
|
||||||
if ! type pnpm > /dev/null 2>&1; then
|
if type pnpm > /dev/null 2>&1; then
|
||||||
mkdir "${T}"/bin || die
|
pnpm "${@}"
|
||||||
ln -s /usr/$(get_libdir)/node_modules/corepack/dist/pnpm.js \
|
else
|
||||||
"${T}"/bin/pnpm || die "Could not symlink pnpm.js"
|
/usr/$(get_libdir)/node_modules/corepack/dist/pnpm.js "${@}"
|
||||||
PATH="${T}/bin:${PATH}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +78,8 @@ src_prepare() {
|
||||||
export CYPRESS_CACHE_FOLDER="${T}"/packages-cache
|
export CYPRESS_CACHE_FOLDER="${T}"/packages-cache
|
||||||
export npm_config_cache="${T}"/packages-cache
|
export npm_config_cache="${T}"/packages-cache
|
||||||
export PNPMFLAGS="--verbose"
|
export PNPMFLAGS="--verbose"
|
||||||
|
pnpm config set cache "${T}"/packages-cache
|
||||||
|
pnpm config set store-dir "${T}"/packages-cache
|
||||||
|
|
||||||
# use system node-gyp
|
# use system node-gyp
|
||||||
PATH+=":/usr/lib64/node_modules/npm/bin/node-gyp-bin"
|
PATH+=":/usr/lib64/node_modules/npm/bin/node-gyp-bin"
|
||||||
|
@ -90,10 +91,6 @@ src_prepare() {
|
||||||
die "No config file found"
|
die "No config file found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
enable_pnpm_temp
|
|
||||||
pnpm config set cache "${T}"/packages-cache
|
|
||||||
pnpm config set store-dir "${T}"/packages-cache
|
|
||||||
|
|
||||||
default
|
default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +131,6 @@ pkg_preinst() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
enable_pnpm_temp
|
|
||||||
# Only run migrations if database exists
|
# Only run migrations if database exists
|
||||||
if su --login --command "psql misskey -c ''" postgres; then
|
if su --login --command "psql misskey -c ''" postgres; then
|
||||||
einfo "Running migration…"
|
einfo "Running migration…"
|
||||||
|
@ -153,7 +149,6 @@ pkg_postinst() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_config() {
|
pkg_config() {
|
||||||
enable_pnpm_temp
|
|
||||||
einfo "Initialising PostgreSQL database"
|
einfo "Initialising PostgreSQL database"
|
||||||
echo -n "password for misskey user: "
|
echo -n "password for misskey user: "
|
||||||
read -r MY_PASSWORD || die "Reading password failed"
|
read -r MY_PASSWORD || die "Reading password failed"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user