blob: 68112f8578b4f3904d142f04f92662925aa0f89b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Contributor: Ed Robinson <ed@reevoo.com>
# Maintainer: Ed Robinson <ed@reevoo.com>
pkgname=yarn
pkgver=0.21.3
pkgrel=0
pkgdesc="Fast, reliable, and secure dependency management for Node.js"
url="https://yarnpkg.com/"
arch="noarch"
license="BSD-2"
depends="nodejs"
source="https://yarnpkg.com/downloads/$pkgver/$pkgname-v$pkgver.tar.gz
add-apk-install-method.patch
remove-support-for-legacy-nodejs.patch"
builddir="$srcdir/dist"
prepare() {
default_prepare || return 1
cd "$builddir"
# These tests runs only on Ubuntu, so delete them.
rm -r end_to_end_tests
# Remove support for legacy nodejs.
rm -r lib-legacy
# 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() {
local destdir="usr/share/node_modules/$pkgname"
mkdir -p "$pkgdir"/$destdir
cp -R "$builddir"/* "$pkgdir"/$destdir/ || return 1
mkdir -p "$pkgdir"/usr/bin
ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarn
ln -s /$destdir/bin/yarn "$pkgdir"/usr/bin/yarnpkg
}
md5sums="779e0c868fbc2c8235d20755890202fc yarn-v0.21.3.tar.gz
4b137b30af07e34dcb42cbc578bd9350 add-apk-install-method.patch
3f3440fa9a2f50df2ee083f5269e31e5 remove-support-for-legacy-nodejs.patch"
sha256sums="0946a4d1abc106c131b700cc31e5c3aa5f2205eb3bb9d17411f8115354a97d5d yarn-v0.21.3.tar.gz
f94643fa30fd7f02e23f0bd0d73de644940d0bf6df21299fc5fc5f0941377bbd add-apk-install-method.patch
084958810b3f7a81bf6c6a9d7edae563722f8006134d28e82494892a795680d9 remove-support-for-legacy-nodejs.patch"
sha512sums="dad7181c78dd1aaf2b07ff32055a8442b55ff9b68a73cf611f4142d612e95f43dcd376e6f2306a4cccc5249680bb82365a7e9ee3160e5c5083f50ee0791a448d yarn-v0.21.3.tar.gz
4cc2c400f492a5ec7824e0ffd3c11857fdf1488ff21ffd61ad9b6d3135468f32e35cc9b34c496bc0fb07a939bfd635922ca0f574a46c42d117adc1ebf0e6ced4 add-apk-install-method.patch
d62bb07f1361039018ed0a3a3fbff5958c51430e21c356b265768eb494fc74c3c6977e4fdd4629d4914f9afd17864b4a13c8fcda9c92ba9c630badd2f9cea7ad remove-support-for-legacy-nodejs.patch"
|