2020-08-20 20:35:02 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global packagename for-each
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-for-each
|
2023-11-09 20:17:58 +08:00
|
|
|
Version: 0.3.3
|
|
|
|
|
Release: 1
|
2020-08-20 20:35:02 +08:00
|
|
|
Summary: A better forEach
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/Raynos/for-each
|
2023-11-09 20:17:58 +08:00
|
|
|
Source0: https://github.com/Raynos/for-each/archive/v%{version}/%{packagename}-%{version}.tar.gz
|
2020-08-20 20:35:02 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging npm(is-function)
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(tape)
|
|
|
|
|
%endif
|
|
|
|
|
%description
|
|
|
|
|
A better forEach
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-11-09 20:17:58 +08:00
|
|
|
%autosetup -n %{packagename}-%{version} -p1
|
2020-08-20 20:35:02 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json index.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%{__nodejs} -e 'require("./")'
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
%{__nodejs} test/test.js
|
|
|
|
|
%else
|
|
|
|
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc *.md
|
2023-11-09 20:17:58 +08:00
|
|
|
%license LICENSE
|
2020-08-20 20:35:02 +08:00
|
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-11-09 20:17:58 +08:00
|
|
|
* Thu Nov 09 2023 yaoxin <yao_xin001@hoperun.com> - 0.3.3-1
|
|
|
|
|
- Upgrade to 0.3.3
|
|
|
|
|
|
2020-11-26 10:22:14 +08:00
|
|
|
* Thu Nov 26 2020 leiju <leiju4@huawei.com> - 0.3.2-2
|
|
|
|
|
- delete nodejs-for-each.spec.old redundancy file
|
|
|
|
|
|
2020-08-20 20:35:02 +08:00
|
|
|
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.3.2-1
|
|
|
|
|
- package init
|