68 lines
1.9 KiB
RPMSpec
68 lines
1.9 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
%global srcname istanbul
|
|
Name: nodejs-%{srcname}
|
|
Version: 0.4.5
|
|
Release: 1
|
|
Summary: A JS code coverage tool written in JS
|
|
License: BSD
|
|
URL: https://github.com/gotwarlost/istanbul
|
|
Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz
|
|
#git clone https://github.com/gotwarlost/istanbul
|
|
#cd istanbul
|
|
#git archive --prefix='test/' --format=tar ${gittag}:test/ \
|
|
# | bzip2 > "$pwd"/tests-${tag}.tar.bz2
|
|
Source1: tests-%{version}.tar.bz2
|
|
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
|
|
%setup -q -n package
|
|
%setup -q -T -D -a 1 -n package
|
|
%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
|
|
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 0.4.5-1
|
|
- Package init
|