summaryrefslogtreecommitdiff
path: root/npm/Pkgfile
blob: 8a92088e1e0fa8b387a1b8251eea7ba00b31d7e5 (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=9.3.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   patch -Np1 -i $SRC/destdir.patch
   24 
   25   NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js install
   26   NODE_PATH=/usr/lib/node_modules node bin/npm-cli.js pack
   27   NODE_PATH=/usr/lib/node_modules DESTDIR=$PKG node bin/npm-cli.js \
   28     install -g -f npm-$version.tgz
   29 
   30   mkdir -p $PKG/usr/share
   31   mv $PKG/usr/lib/node_modules/npm/man $PKG/usr/share/
   32 
   33   find $PKG \(\
   34     -iname "README*" -o \
   35     -iname "LICENCE" -o \
   36     -iname "LICENSE" -o \
   37     -iname "CHANGELOG" -o \
   38     -iname "AUTHORS*" \)\
   39     -exec rm '{}' \+
   40   rm -r $PKG/usr/lib/node_modules/npm/docs
   41   #$PKG/usr/lib/node_modules/npm/changelogs
   42 }

Generated by cgit