51 lines
1.2 KiB
RPMSpec
51 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename array-index
|
|
%global enable_tests 1
|
|
Name: nodejs-array-index
|
|
Version: 1.0.0
|
|
Release: 2
|
|
Summary: Invoke getter/setter functions on array-like objects
|
|
License: MIT
|
|
URL: https://github.com/TooTallNate/array-index.git
|
|
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: grep npm(debug) npm(es6-symbol)
|
|
%endif
|
|
%description
|
|
Invoke getter/setter functions on array-like objects
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
%nodejs_fixdep debug '^4.3.4'
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr *.json index.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{__nodejs} -e 'require("./")'
|
|
%if 0%{?enable_tests}
|
|
%{__nodejs} test.js
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc README.md History.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Sat Jul 02 2022 chenchen <chen_aka_jan@163.com> - 1.0.0-2
|
|
- Updating debug version
|
|
|
|
* Mon Aug 17 2020 Shaoqiang Kang <kangshaoqiang1@huawei.com> - 1.0.0-1
|
|
- Package init
|