File yarn.spec of Package yarn

#
# spec file for package yarn
#
# Copyright (c) 2017 Miquel Sabaté Solà <msabate@suse.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.


# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           yarn
Version:        1.3.2
Release:        1.2
License:        BSD-2-Clause
Summary:        Fast, reliable, and secure dependency management
Url:            https://yarnpkg.com/en/
Group:          Development/Languages/NodeJS
Source0:        %{name}-%{version}.tar.xz
Source1:        node_modules.tar.gz
BuildRequires: -post-build-checks -rpmlint-Factory -rpmlint-mini  -rpmlint
BuildRequires:  npm8 coreutils

# Installing nodejs is only a recommendation because the user might already have
# nvm in place.
Recommends:     nodejs8

PreReq:         %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Yarn is a package manager for your code. It allows you to use and share code
with other developers from around the world. Yarn does this quickly, securely,
and reliably so you don’t ever have to worry.

Yarn allows you to use other developers’ solutions to different problems, making
it easier for you to develop your software. If you have problems, you can report
issues or contribute back, and when the problem is fixed, you can use Yarn to
keep it all up to date.

Code is shared through something called a package (sometimes referred to as a
module). A package contains all the code being shared as well as a package.json
file which describes the package.

%prep
%setup -q -n %{name}-%{version}
%setup -q -T -D -a 1

%build
# This will produce the `lib` directory as expected by yarn.
npm run build

%install
# Install the node_modules for which yarn depends on.
mkdir -p %{buildroot}%{_libdir}/node_modules/%{name}
cp -r src bin package.json node_modules lib %{buildroot}%{_libdir}/node_modules/%{name}

# Produce the yarn and yarnpkg binaries as links to the yarn.js file.
mkdir -p %{buildroot}%{_bindir}
ln -sf %{_libdir}/node_modules/%{name}/bin/yarn.js %{buildroot}%{_bindir}/yarn
ln -sf %{_libdir}/node_modules/%{name}/bin/yarn.js %{buildroot}%{_bindir}/yarnpkg

%files
%defattr(-,root,root,-)
%doc LICENSE README.md
%{_bindir}/yarn
%{_bindir}/yarnpkg
%dir %{_libdir}/node_modules/
%{_libdir}/node_modules/%{name}/

%changelog
* Mon Dec  4 2017 opensuse-packaging@opensuse.org
- Update to version 1.3.2:
  * fix(cli): Display warning when adding a package already in project (#4810)
  * 1.3.0
  * fix(config): Use boolifyWithDefault() for bools from environment (#4823)
  * chore(config): Use config.production instead of isProduction() (#4824)
  * ci(travis): Increase RAMDISK size for macOS builds (#4831)
  * Update config.yml (#4834)
  * 1.3.1
  * ci(circle): Remove unnecessary `--` from test-ci invocations (#4832)
  * ci(circle): Fix deploy job so it only runs on version tags (#4839)
  * v1.3.2
* Fri Jul 21 2017 opensuse-packaging@opensuse.org
- Update to version 0.27.5:
  * Fix: inherit env variables from process when calling Git (#3743)
  * Revert "Fixes resolution concurrency problem (#3673)"
  * 0.27.2
  * Yarn workspaces: running commands from subfolders that don't match workspaces glob should now change CWD to root (#3739)
  * 0.27.3
  * Fix: fix e2e yarn output tests after #3536 (#3771)
  * Fixes npm auth
  * 0.27.4
  * Fixes yarn install with private packages
  * 0.27.5
* Fri Jul 21 2017 opensuse-packaging@opensuse.org
- Update to version 0.22.0:
  * Fix: inherit env variables from process when calling Git (#3743)
  * Revert "Fixes resolution concurrency problem (#3673)"
  * 0.27.2
  * Yarn workspaces: running commands from subfolders that don't match workspaces glob should now change CWD to root (#3739)
  * 0.27.3
  * Fix: fix e2e yarn output tests after #3536 (#3771)
  * Fixes npm auth
  * 0.27.4
  * Fixes yarn install with private packages
  * 0.27.5
* Wed Apr 12 2017 opensuse-packaging@opensuse.org
- Update to version 0.22.0:
  * Remove linter warnings (#2797)
  * Correctly resolve peerDependencies for concurrent installs (#2801)
  * Adds versioning to the cache path (#2768)
  * Mention yarnpkg/rfcs in CONTRIBUTING, README and PULL_REQUEST_TEMPLATE. (#2820)
  * set default network concurrency to 8 (#2829)
  * Upgrade camelcase + flow and specify supported engines (#2812)
  * Add Jenkins jobs to repo
  * Rename jenkins-jobs.groovy to jenkins_jobs.groovy due to Groovy filename limitations
  * handle process.stdin exceptions
  * v0.22.0
* Mon Mar 13 2017 msabate@suse.com
- Don't require nodejs, simply recommend it
  This is done this way because nvm users don't need this.
* Tue Mar  7 2017 msabate@suse.com
- Initial commit
openSUSE Build Service is sponsored by