blob: f6f7324d88215fab0427c9effae1f78ff0087bdb (
plain)
1 # Description: nodejs package manager
2 # URL: https://nodejs.org/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: nodejs
5
6 name=npm
7 version=8.14.0
8 release=1
9 source=(https://github.com/npm/cli/archive/v$version/$name-$version.tar.gz
10 destdir.patch)
11
12 build() {
13 cd cli-$version
14
15 prt-get isinst ccache && \
16 PATH="$(echo ${PATH} | \
17 awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
18
19 export npm_config_cache="$SRC/.npm/cache"
20 export npm_config_userconfig="$SRC/.npm/cache"
21 export GATSBY_TELEMETRY_DISABLED="1"
22
23 # fix some build issues
24 # starting with 8.6.0, `make mandocs` would remove the node_modules dir
25 awk -i inplace \
26 '/node bin\/npm-cli.js run resetdeps/ gsub(/resetdeps/, "dumpconf")' \
27 Makefile
28 node bin/npm-cli.js install marked-man --no-global --no-timing --no-save
29 patch -Np1 -i $SRC/destdir.patch
30
31 make mandocs
32 NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js pack
33 NODE_PATH=/usr/lib/node_modules DESTDIR=$PKG node bin/npm-cli.js \
34 install -g -f npm-$version.tgz
35
36 mkdir -p $PKG/usr/share
37 mv $PKG/usr/lib/node_modules/npm/man $PKG/usr/share/
38
39 find $PKG \(\
40 -iname "README*" -o \
41 -iname "LICENCE" -o \
42 -iname "LICENSE" -o \
43 -iname "CHANGELOG" -o \
44 -iname "AUTHORS*" \)\
45 -exec rm '{}' \+
46 rm -r $PKG/usr/lib/node_modules/npm/docs
47 #$PKG/usr/lib/node_modules/npm/changelogs
48 }
|