diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-01-31 00:48:47 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-01-31 01:11:18 +0100 |
commit | febd2147531c13937ac53b2c4a3ccc11b756b4b7 (patch) | |
tree | 31ad6c3431e98db87e55a8197fdfa1e20a0d67e7 | |
parent | 529a068b0f83f48e17855448322ba1a19a0987c6 (diff) | |
download | aports-febd2147531c13937ac53b2c4a3ccc11b756b4b7.tar.bz2 aports-febd2147531c13937ac53b2c4a3ccc11b756b4b7.tar.xz |
testing/yarn: fix various issues and try to minimize pkg size
-rw-r--r-- | testing/yarn/APKBUILD | 55 | ||||
-rw-r--r-- | testing/yarn/yarn.patch | 5 |
2 files changed, 38 insertions, 22 deletions
diff --git a/testing/yarn/APKBUILD b/testing/yarn/APKBUILD index 6d1a4e200c..20d7a7fdc1 100644 --- a/testing/yarn/APKBUILD +++ b/testing/yarn/APKBUILD @@ -3,37 +3,54 @@ pkgname=yarn pkgver=0.19.1 pkgrel=0 -pkgdesc="Fast, reliable, and secure dependency management for Node.js." +pkgdesc="Fast, reliable, and secure dependency management for Node.js" url="https://yarnpkg.com/" arch="noarch" -license="BSD-2-Clause" +license="BSD-2" depends="nodejs" -source="https://github.com/yarnpkg/yarn/releases/download/v$pkgver/yarn-v$pkgver.tar.gz -yarn.patch" -builddir="$srcdir"/dist +source="https://github.com/yarnpkg/$pkgname/releases/download/v$pkgver/$pkgname-v$pkgver.tar.gz + yarn.patch" +builddir="$srcdir/dist" prepare() { default_prepare || return 1 - rm -rf "$srcdir"/dist/node_modules/node-uuid/benchmark/bench.gnu - find "$srcdir"/dist \( -name '*.md' -o -name '*.md~' -o -name '*.gitmodules' \) -delete + + cd "$builddir" + + # These tests runs only on Ubuntu, so delete them. + rm -r end_to_end_tests + + # Remove some unneeded files. + # Node does not load *.min.js files, so these are useless for us. + # We respect licenses, but really don't wanna waste disk space (~1 MiB) + # with dozens copies of the same files. + rm yarn.lock + find . \( -iname '*.md' \ + -o -iname '*.md~' \ + -o -iname '*.cmd' \ + -o -name '*.min.js' \ + -o -name '*.map' \ + -o -name 'bower.json' \ + -o -name 'Gruntfile.js' \ + -o -iname 'license*' -a ! -name '*.js' \ + -o -type f -a -name '.*' \) \ + -delete } package() { - mkdir -p "$pkgdir"/usr/share/yarn - mkdir -p "$pkgdir"/usr/bin + local destdir="usr/share/node_modules/$pkgname" - mv "$srcdir"/dist/bin "$pkgdir"/usr/share/yarn - mv "$srcdir"/dist/lib "$pkgdir"/usr/share/yarn - mv "$srcdir"/dist/lib-legacy "$pkgdir"/usr/share/yarn - mv "$srcdir"/dist/node_modules "$pkgdir"/usr/share/yarn - mv "$srcdir"/dist/package.json "$pkgdir"/usr/share/yarn + mkdir -p "$pkgdir"/$destdir + cp -R "$builddir"/* "$pkgdir"/$destdir/ || return 1 - ln -s ../share/yarn/bin/yarn "$pkgdir"/usr/bin/yarn - ln -s ../share/yarn/bin/yarn "$pkgdir"/usr/bin/yarnpkg + mkdir -p "$pkgdir"/usr/bin + ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarn + ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarnpkg } + md5sums="28b4eba034249540e03635dfaa89bedc yarn-v0.19.1.tar.gz -b1a145f97a95cbab725ecffb44f76223 yarn.patch" +e2b14cb6931684b26b5a0fbfe23ea26f yarn.patch" sha256sums="751e1c0becbb2c3275f61d79ad8c4fc336e7c44c72d5296b5342a6f468526d7d yarn-v0.19.1.tar.gz -e967579ca93651326bca2648cad8a60acb9b3095131de7c2ed653cd9c9a802fd yarn.patch" +6fa7a11298aaec365af9f3c739b5786bd6ef75ebe4f6133e6e284cd17ccb70e2 yarn.patch" sha512sums="fc6aef281d116719e700b6478d3f73683dcca7a8803bf8fdacef287809fec3a7f3b366fc2e8e30223cbc1bed64dac8ae37fb17f2a547e24cf6362cf2cab18e98 yarn-v0.19.1.tar.gz -5c46fc18734b8601e5b04e2c03aef7e4bb22990edca39f424b4908d9af4c85b99bed0c9bd75086cd0b481ef3e9fa0c55a80721d9bcc4a0fca5ef74c4350e1389 yarn.patch" +2ff04ec5eedc08c7a7543bb849eea6f42ca14b632b05a2d054441b1079acf9d7ffde50cc43bdd557fac55130a2d7e73bb5e4949e3602bafbe0683608beff9fab yarn.patch" diff --git a/testing/yarn/yarn.patch b/testing/yarn/yarn.patch index cce220693b..e64a45346d 100644 --- a/testing/yarn/yarn.patch +++ b/testing/yarn/yarn.patch @@ -1,6 +1,5 @@ -diff -urp dist/bin/yarn patched/bin/yarn ---- dist/bin/yarn 2017-01-16 23:37:07.000000000 +0000 -+++ patched/bin/yarn 2017-01-18 01:45:33.000000000 +0000 +--- a/bin/yarn ++++ b/bin/yarn @@ -1,5 +1,5 @@ #!/bin/sh -basedir=$(dirname "$(readlink "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")") |