blob: 9ff800782193dfe01b86c845eba92727615fa023 (
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
|
# Contributor: Ed Robinson <ed@reevoo.com>
# Maintainer: Ed Robinson <ed@reevoo.com>
pkgname=yarn
pkgver=0.19.1
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
yarn.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 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="28b4eba034249540e03635dfaa89bedc yarn-v0.19.1.tar.gz
e2b14cb6931684b26b5a0fbfe23ea26f yarn.patch"
sha256sums="751e1c0becbb2c3275f61d79ad8c4fc336e7c44c72d5296b5342a6f468526d7d yarn-v0.19.1.tar.gz
6fa7a11298aaec365af9f3c739b5786bd6ef75ebe4f6133e6e284cd17ccb70e2 yarn.patch"
sha512sums="fc6aef281d116719e700b6478d3f73683dcca7a8803bf8fdacef287809fec3a7f3b366fc2e8e30223cbc1bed64dac8ae37fb17f2a547e24cf6362cf2cab18e98 yarn-v0.19.1.tar.gz
2ff04ec5eedc08c7a7543bb849eea6f42ca14b632b05a2d054441b1079acf9d7ffde50cc43bdd557fac55130a2d7e73bb5e4949e3602bafbe0683608beff9fab yarn.patch"
|