blob: d6c0582582f4f7d80855f94f548227949f4defe1 (
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=7.5.4
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 export NPM_CONFIG_USERCONFIG=$SRC/.npm
16 export NPM_CONFIG_CACHE=$SRC/.npm/cache
17 export GATSBY_TELEMETRY_DISABLED="1"
18
19 # fix some build issues
20 node bin/npm-cli.js install cmark-gfm --no-global --no-timing --no-save
21 patch -Np1 -i $SRC/destdir.patch
22
23 make mandocs
24 NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js pack
25 NODE_PATH=/usr/lib/node_modules DESTDIR=$PKG node bin/npm-cli.js install -g -f npm-$version.tgz
26
27 mkdir -p $PKG/usr/share
28 mv $PKG/usr/lib/node_modules/npm/man $PKG/usr/share/
29
30 find $PKG \(\
31 -iname "README*" -o \
32 -iname "LICENCE" -o \
33 -iname "LICENSE" -o \
34 -iname "CHANGELOG" -o \
35 -iname "AUTHORS*" \)\
36 -exec rm '{}' \+
37 rm -r $PKG/usr/lib/node_modules/npm/docs $PKG/usr/lib/node_modules/npm/changelogs
38 }
|