50 lines
1.3 KiB
RPMSpec
50 lines
1.3 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 0
|
||
|
|
Name: nodejs-estraverse
|
||
|
|
Version: 4.2.0
|
||
|
|
Release: 1
|
||
|
|
Summary: ECMAScript JS AST traversal functions
|
||
|
|
License: BSD
|
||
|
|
URL: https://github.com/Constellation/estraverse
|
||
|
|
Source0: http://registry.npmjs.org/estraverse/-/estraverse-%{version}.tgz
|
||
|
|
Source1: tests-%{version}.tar.bz2
|
||
|
|
Source10: dl-tests.sh
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
BuildRequires: npm(coffee-script)
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(chai) npm(espree) npm(mocha)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
%setup -q -T -D -a 1 -n package
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/estraverse
|
||
|
|
cp -pr package.json estraverse.js \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/estraverse
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%{__nodejs} -e 'require("./")'
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
%{_bindir}/mocha --compilers coffee:coffee-script/register
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{!?_licensedir:%global license %doc}
|
||
|
|
%doc LICENSE.BSD
|
||
|
|
%{nodejs_sitelib}/estraverse
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 4.2.0-1
|
||
|
|
- package init
|