summaryrefslogtreecommitdiff
path: root/devel/yarn/MAKEPKG
diff options
context:
space:
mode:
Diffstat (limited to 'devel/yarn/MAKEPKG')
-rw-r--r--devel/yarn/MAKEPKG45
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/yarn/MAKEPKG b/devel/yarn/MAKEPKG
new file mode 100644
index 0000000..37e90ff
--- /dev/null
+++ b/devel/yarn/MAKEPKG
@@ -0,0 +1,45 @@
+#!/bin/mkpkg
+# description: Fast, reliable, and secure dependency management for JavaScript
+# url: https://classic.yarnpkg.com/
+
+# Note: this is yarn 1.x (classic), the line that reads the yarn.lock v1 format
+# used by ports such as gotify. It ships as a single webpacked lib/cli.js with
+# no dependencies of its own, so it needs neither a compiler nor npm to
+# install.
+
+name=yarn
+version=1.22.22
+release=1
+depends=(nodejs)
+source=(https://registry.npmjs.org/$name/-/$name-$version.tgz)
+sha256sums=(
+ "c17d3797fb9a9115bf375e31bfd30058cac6bc9c3b8807a3d8cb2094794b51ca"
+)
+
+build() {
+ # Registry tarballs always unpack into a directory called "package"
+ cd package
+
+ # Windows launchers, and the npm lifecycle hook that warns when yarn is
+ # installed through npm - neither applies here
+ rm -f bin/yarn.cmd bin/yarnpkg.cmd
+ rm -f preinstall.js
+
+ install -d $PKG/usr/lib/node_modules/yarn
+ cp -a bin lib package.json LICENSE $PKG/usr/lib/node_modules/yarn/
+
+ chmod 755 $PKG/usr/lib/node_modules/yarn/bin/yarn.js
+ chmod 755 $PKG/usr/lib/node_modules/yarn/bin/yarn
+ chmod 755 $PKG/usr/lib/node_modules/yarn/bin/yarnpkg
+
+ install -d $PKG/usr/bin
+ ln -sf ../lib/node_modules/yarn/bin/yarn.js $PKG/usr/bin/yarn
+ ln -sf ../lib/node_modules/yarn/bin/yarn.js $PKG/usr/bin/yarnpkg
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh