Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing/yarn: new aport #714

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion community/nodejs-current/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pkgname=nodejs-current
# The current stable version, i.e. non-LTS.
pkgver=7.2.1
pkgrel=0
pkgrel=1
pkgdesc="JavaScript runtime built on V8 engine - current stable version"
url="http://nodejs.org/"
arch="all"
Expand All @@ -13,6 +13,7 @@ depends_dev="libuv"
makedepends="$depends_dev python2 openssl-dev zlib-dev libuv-dev linux-headers
paxmark binutils-gold http-parser-dev ca-certificates"
subpackages="$pkgname-dev $pkgname-doc"
provides="nodejs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to increment pkgrel for this change.

replaces="nodejs nodejs-lts" # nodejs-lts for backward compatibility
source="https://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz
use-system-ca-certs.patch
Expand Down
56 changes: 56 additions & 0 deletions testing/yarn/APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,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://github.com/yarnpkg/$pkgname/releases/download/v$pkgver/$pkgname-v$pkgver.tar.gz

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update this to use https://yarnpkg.com/downloads/$pkgver/yarn-v$pkgver.tar.gz? In the Yarn project, we're trying to avoid hard-coding GitHub URLs for downloads.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, changed in bfe221d.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 😃

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"
9 changes: 9 additions & 0 deletions testing/yarn/yarn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/bin/yarn
+++ b/bin/yarn
@@ -1,5 +1,5 @@
#!/bin/sh
-basedir=$(dirname "$(readlink "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")")
+basedir=$(dirname "$(readlink -f "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")")

use_winpty=0