#!/bin/mkpkg # description: Package manager for JavaScript # url: https://www.npmjs.com/ name=npm version=12.1.0 release=1 depends=(nodejs) source=(https://registry.npmjs.org/$name/-/$name-$version.tgz) sha256sums=( "f08e674e31eb99931df2297aa55c274bf9bebd90679dad57fdbe9683907a3325" ) build() { cd package # Windows launchers and helper scripts rm -f bin/npm.cmd bin/npx.cmd bin/npm.ps1 bin/npx.ps1 rm -f bin/node-gyp-bin/node-gyp.cmd find . -name '*.cmd' -delete find . -name '*.ps1' -delete install -d $PKG/usr/lib/node_modules/npm cp -a bin docs lib man node_modules index.js package.json LICENSE \ $PKG/usr/lib/node_modules/npm/ chmod 755 $PKG/usr/lib/node_modules/npm/bin/npm-cli.js chmod 755 $PKG/usr/lib/node_modules/npm/bin/npx-cli.js install -d $PKG/usr/bin ln -sf ../lib/node_modules/npm/bin/npm-cli.js $PKG/usr/bin/npm ln -sf ../lib/node_modules/npm/bin/npx-cli.js $PKG/usr/bin/npx # System man pages. mandir="$PKG/usr/share/man" for f in man/man1/*.1; do install -Dm644 "$f" "$mandir/man1/$(basename $f)" done for f in man/man5/*.5; do install -Dm644 "$f" "$mandir/man5/$(basename $f)" done for f in man/man7/*.7; do install -Dm644 "$f" "$mandir/man7/$(basename $f)" done find $PKG/usr/lib/node_modules -type f \( \ -iname 'README*' -o \ -iname 'CHANGELOG*' -o \ -iname 'AUTHORS*' -o \ -iname 'HISTORY*' -o \ -iname 'CONTRIBUTING*' \) -delete } signify() { untrusted comment: public key RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 } # vim: filetype=sh