nodejs-yarn/nodejs-yarn.spec

69 lines
1.6 KiB
RPMSpec
Raw Permalink Normal View History

2021-09-09 15:25:36 +08:00
%{?nodejs_find_provides_and_requires}
%global packagename yarn
Name: nodejs-yarn
2022-10-09 15:55:51 +08:00
Version: 1.22.19
Release: 2
2021-09-09 15:25:36 +08:00
Summary: Fast, reliable, and secure dependency management for yarn packages.
License: BSD-2-Clause
URL: https://github.com/yarnpkg/yarn
2022-10-09 15:55:51 +08:00
Source0: https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz
2021-09-09 15:25:36 +08:00
BuildArch: noarch
BuildRequires: nodejs-packaging
%description
Fast, reliable, and secure dependency management for yarn packages.
%define debug_package %{nil}
%prep
%autosetup -n yarn-v%{version}
# setup the tests
%build
# nothing to do!
%install
if [ -f license ]; then
mv license LICENSE
fi
if [ -f License ]; then
mv License LICENSE
fi
if [ -d bin ]; then
mkdir -p %{buildroot}%{_prefix}/local/bin/
cp -ar bin/* %{buildroot}%{_prefix}/local/bin/
2021-09-09 15:25:36 +08:00
fi
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -ra * %{buildroot}%{nodejs_sitelib}/%{packagename}
2021-09-15 13:22:29 +08:00
for file in `ls ./bin`;do
ln -sfr %{buildroot}%{nodejs_sitelib}/%{packagename}/bin/yarn.js %{buildroot}%{_prefix}/local/bin/$file
2021-09-15 13:22:29 +08:00
done
2021-09-09 15:25:36 +08:00
pushd %{buildroot}
touch filelist.lst
find . -type f -printf "/%h/%f\n" >> filelist.lst
popd
cp %{buildroot}/filelist.lst .
%check
%nodejs_symlink_deps --check
%files -f filelist.lst
%{_prefix}/local/bin/*
2021-09-09 15:25:36 +08:00
%changelog
* Thu Mar 02 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.22.19-2
- Change yarn command path
2022-10-09 15:55:51 +08:00
* Sun Oct 09 2022 wangjunqi <wangjunqi@kylinos.cn> - 1.22.19-1
- update version to 1.22.19
2021-09-15 13:22:29 +08:00
* Wed Sep 15 2021 chemingdao <chemingdao@huawei.com> - 1.22.11-2
- support running command with yarn.js, yarn.cmd, yarnpkg.cmd
* Thu Sep 09 2021 Nodejs_Bot <Nodejs_Bot@openeuler.org> - 1.22.11-1
2021-09-09 15:25:36 +08:00
- Package Spec generated