2021-01-15 12:22:39 +01:00
|
|
|
# Description: nodejs package manager
|
|
|
|
# URL: https://nodejs.org/
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
|
|
# Depends on: nodejs
|
|
|
|
|
|
|
|
name=npm
|
2023-06-07 18:17:41 +02:00
|
|
|
version=9.7.1
|
2021-01-15 12:22:39 +01:00
|
|
|
release=1
|
2021-01-26 01:17:36 +01:00
|
|
|
source=(https://github.com/npm/cli/archive/v$version/$name-$version.tar.gz
|
|
|
|
destdir.patch)
|
2021-01-15 12:22:39 +01:00
|
|
|
|
|
|
|
build() {
|
2021-01-26 01:17:36 +01:00
|
|
|
cd cli-$version
|
|
|
|
|
2022-04-03 12:22:51 +02:00
|
|
|
prt-get isinst ccache && \
|
|
|
|
PATH="$(echo ${PATH} | \
|
|
|
|
awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
|
2022-03-04 16:19:53 +01:00
|
|
|
|
2022-04-03 12:22:51 +02:00
|
|
|
export npm_config_cache="$SRC/.npm/cache"
|
|
|
|
export npm_config_userconfig="$SRC/.npm/cache"
|
2021-01-26 01:17:36 +01:00
|
|
|
export GATSBY_TELEMETRY_DISABLED="1"
|
|
|
|
|
|
|
|
patch -Np1 -i $SRC/destdir.patch
|
|
|
|
|
2022-11-12 21:41:41 +01:00
|
|
|
NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js install
|
2021-01-26 01:17:36 +01:00
|
|
|
NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js pack
|
2022-04-03 12:22:51 +02:00
|
|
|
NODE_PATH=/usr/lib/node_modules DESTDIR=$PKG node bin/npm-cli.js \
|
|
|
|
install -g -f npm-$version.tgz
|
2021-01-26 01:17:36 +01:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share
|
|
|
|
mv $PKG/usr/lib/node_modules/npm/man $PKG/usr/share/
|
|
|
|
|
|
|
|
find $PKG \(\
|
|
|
|
-iname "README*" -o \
|
|
|
|
-iname "LICENCE" -o \
|
|
|
|
-iname "LICENSE" -o \
|
|
|
|
-iname "CHANGELOG" -o \
|
|
|
|
-iname "AUTHORS*" \)\
|
|
|
|
-exec rm '{}' \+
|
2022-04-03 12:22:51 +02:00
|
|
|
rm -r $PKG/usr/lib/node_modules/npm/docs
|
|
|
|
#$PKG/usr/lib/node_modules/npm/changelogs
|
2021-01-15 12:22:39 +01:00
|
|
|
}
|