diff options
| author | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
|---|---|---|
| committer | rawnix ports <ports@rawnix.org> | 2026-09-26 18:19:05 +0000 |
| commit | c82e88dd00d1b0b7fcfb4e5628d99611388cef6f (patch) | |
| tree | 56d864b5a5c6c145edd96178ae219a8f90e191a6 /devel/npm/MAKEPKG | |
| download | ports-c82e88dd00d1b0b7fcfb4e5628d99611388cef6f.tar.gz | |
sync 2026-09-26 18:19 UTC
1672 files changed, 151396 insertions(+)
Diffstat (limited to 'devel/npm/MAKEPKG')
| -rw-r--r-- | devel/npm/MAKEPKG | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/devel/npm/MAKEPKG b/devel/npm/MAKEPKG new file mode 100644 index 0000000..88580d8 --- /dev/null +++ b/devel/npm/MAKEPKG @@ -0,0 +1,59 @@ +#!/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 |
