diff --git a/srcpkgs/yarn-bin/patches/yarn.patch b/srcpkgs/yarn-bin/patches/yarn.patch new file mode 100644 index 00000000000..9f406bcf0c1 --- /dev/null +++ b/srcpkgs/yarn-bin/patches/yarn.patch @@ -0,0 +1,10 @@ +--- bin/yarn.js.orig 2017-07-04 18:50:29.701379167 -0500 ++++ bin/yarn.js 2017-07-04 17:27:32.749746288 -0500 +@@ -3,5 +3,5 @@ + /* eslint-disable flowtype/require-valid-file-annotation */ + 'use strict'; + +-require('../lib/v8-compile-cache'); +-module.exports = require('../lib/yarn-cli'); ++require('/usr/lib/yarn/v8-compile-cache'); ++module.exports = require('/usr/lib/yarn/yarn-cli'); diff --git a/srcpkgs/yarn-bin/template b/srcpkgs/yarn-bin/template new file mode 100644 index 00000000000..741a043f3d2 --- /dev/null +++ b/srcpkgs/yarn-bin/template @@ -0,0 +1,28 @@ +# Template file for 'yarn-bin' +pkgname=yarn-bin +version=0.27.5 +revision=1 +depends="nodejs" +short_desc="Fast, reliable, and secure dependency management - precompiled binaries" +maintainer="Nicklaus McClendon " +license="2-cause-BSD" +homepage="https://yarnpkg.com/" +distfiles="https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz" +conflicts="yarn>=0" +checksum=f0f3510246ee74eb660ea06930dcded7b684eac2593aa979a7add84b72517968 + +do_extract() { + tar xfz ${XBPS_SRCDISTDIR}/${pkgname}-${version}/yarn-v${version}.tar.gz --strip-components=1 -C ${wrksrc} +} + +do_install() { + vmkdir /usr/lib/yarn + vmkdir /usr/bin + vcopy lib/v8-compile-cache.js /usr/lib/yarn + vcopy lib/yarn-cli.js /usr/lib/yarn + vbin bin/yarn.js yarn +} + +post_install() { + vlicense LICENSE +}