66 lines
1.8 KiB
RPMSpec
66 lines
1.8 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
%global srcname istanbul
|
|
Name: nodejs-%{srcname}
|
|
Version: 0.4.5
|
|
Release: 2
|
|
Summary: A JS code coverage tool written in JS
|
|
License: BSD
|
|
URL: https://github.com/gotwarlost/istanbul
|
|
Source0: https://github.com/gotwarlost/istanbul/archive/v%{version}.tar.gz
|
|
Patch001: updating-the-version-of-the-dependency-abbrev.patch
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(escodegen) npm(fileset) npm(handlebars) npm(js-yaml) npm(nodeunit)
|
|
BuildRequires: npm(once) npm(resolve) npm(requirejs) npm(rimraf) npm(supports-color)
|
|
BuildRequires: npm(which)
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%autosetup -n istanbul-%{version} -p1
|
|
%nodejs_fixdep async
|
|
%nodejs_fixdep escodegen
|
|
%nodejs_fixdep esprima
|
|
%nodejs_fixdep fileset
|
|
%nodejs_fixdep glob
|
|
%nodejs_fixdep handlebars
|
|
%nodejs_fixdep js-yaml
|
|
%nodejs_fixdep mkdirp
|
|
%nodejs_fixdep nopt
|
|
%nodejs_fixdep resolve
|
|
%nodejs_fixdep supports-color
|
|
%nodejs_fixdep which
|
|
%nodejs_fixdep wordwrap
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
|
|
cp -pr package.json index.js lib/ %{buildroot}%{nodejs_sitelib}/%{srcname}
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
ln -s %{nodejs_sitelib}/%{srcname}/lib/cli.js %{buildroot}%{_bindir}/istanbul-js
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
test/run.js
|
|
%endif
|
|
|
|
%files
|
|
%doc README.md CHANGELOG.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{srcname}
|
|
%{_bindir}/istanbul-js
|
|
|
|
%changelog
|
|
* Fri Jul 01 2022 chenchen <chen_aka_jan@163.com> - 0.4.5-2
|
|
- updating the version of the dependency abbrev.
|
|
|
|
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 0.4.5-1
|
|
- Package init
|