Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > faf0d11b6dd491a981c85d5f69b1c836 > files > 3

yarnpkg-1.22.19-11.mga9.src.rpm

%global npm_name yarn

%global enable_tests 1

# don't require bundled modules
%global __requires_exclude_from ^%{nodejs_sitelib}/yarn/.*$

#npm version used in with yarnpkg-tarball.sh needs to be consistent with the version used to build
%define npm_ver 9.5.1

Name:           yarnpkg
Version:        1.22.19
#%%define subrel  1
Release:        %mkrel 11
Summary:        Fast, reliable, and secure dependency management
URL:            https://github.com/yarnpkg/yarn
# we need tarball with node_modules, brought by running Source1 script
Source0:        %{name}-v%{version}-bundled.tar.gz
Source1:        yarnpkg-tarball.sh
License:        BSD
Group:          Development/Java

BuildArch:      noarch

BuildRequires:  nodejs
BuildRequires:  nodejs-packaging
BuildRequires:  npm(npm) = %{npm_ver}

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


%prep
%setup -q -n %{npm_name}-%{version}

%build
# use build script
npm run build

# remove build dependencies from node_modules
npm prune --omit=dev --legacy-peer-deps

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}

cp -pr package.json lib bin node_modules \
    %{buildroot}%{nodejs_sitelib}/%{npm_name}

mkdir -p %{buildroot}%{_bindir}
ln -sfr %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin/yarn.js %{buildroot}%{_bindir}/yarnpkg
ln -sfr %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin/yarn.js %{buildroot}%{_bindir}/yarn

# Remove executable bits from bundled dependency tests
find %{buildroot}%{nodejs_sitelib}/%{npm_name}/node_modules \
    -ipath '*/test/*' -type f -executable \
    -exec chmod -x '{}' +

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
if [[ $(%{buildroot}%{_bindir}/yarnpkg --version) == %{version} ]] ; then echo PASS; else echo FAIL && exit 1; fi
if [[ $(%{buildroot}%{_bindir}/yarn --version) == %{version} ]] ; then echo PASS; else echo FAIL && exit 1; fi
%endif


%files
%doc README.md
%license LICENSE
%{_bindir}/yarnpkg
%{_bindir}/yarn
%{nodejs_sitelib}/%{npm_name}


%changelog
* Sun Apr 23 2023 squidf <squidf> 1.22.19-11.mga9
+ Revision: 1954618
- Rebuild for npm 9.5.1

* Sat Feb 18 2023 squidf <squidf> 1.22.19-10.mga9
+ Revision: 1944008
- Rebuild for npm 9.3.1

* Tue Jan 10 2023 neoclust <neoclust> 1.22.19-9.mga9
+ Revision: 1932089
- Rebuild against new npm

* Tue Nov 22 2022 neoclust <neoclust> 1.22.19-8.mga9
+ Revision: 1910202
- Rebuild against new npm

* Fri Nov 18 2022 kekepower <kekepower> 1.22.19-7.mga9
+ Revision: 1908738
- Use npm 8.19.2

* Tue Sep 27 2022 squidf <squidf> 1.22.19-6.mga9
+ Revision: 1892825
- Rebuild for npm 8.19.1

* Sat Sep 24 2022 squidf <squidf> 1.22.19-5.mga9
+ Revision: 1892038
- Add legacy-peer-deps to fix dependency resolution
- Rebuild for npm 8.15.0

* Mon Jul 11 2022 squidf <squidf> 1.22.19-4.1.mga9
+ Revision: 1868508
+ rebuild (emptylog)

* Mon Jul 11 2022 squidf <squidf> 1.22.19-4.mga9
+ Revision: 1868481
- Use --legacy-peer-deps in yarnpkg-tarball.sh to workaround dependency conflicts
- Set a strategy for npm version consistency with source tarball generation
- Update tarball source with npm 8.3.1

* Mon Jul 11 2022 squidf <squidf> 1.22.19-3.mga9
+ Revision: 1868415
- New package for Yarn, inspired by Fedora spec


* Mon Jul 11 2022 squidf <chb0@lavache.com> 1.22.19-3
- Rebuild for Mageia BS

* Sat Jun 25 2022 squidf <chb0@lavache.com> 1.22.19-2
- Add group
- Update package description

* Thu May 26 2022 squidf <chb0@lavache.com> 1.22.19-1
- Upgrade to 1.22.19

* Mon Apr 11 2022 squidf <chb0@lavache.com> 1.22.18-1
- Upgrade to 1.22.18

* Wed Dec 8 2021 squidf <chb0@lavache.com> 1.22.17-1
- Upgrade to 1.22.17

* Sat Oct 9 2021 squidf <chb0@lavache.com> 1.22.15-2
- Rebuild to change package extension for MLO repo

* Fri Oct 1 2021 squidf <chb0@lavache.com> 1.22.15-1.squidf.mga8
- 1.22.15 version 

* Wed Sep 15 2021 squidf <chb0@lavache.com> 1.22.11-1.squidf.mga8
- 1.22.11 version based on Fedora yarnpkg-1.22.10-3.fc35 spec