52 lines
1.5 KiB
RPMSpec
52 lines
1.5 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 1
|
||
|
|
Name: nodejs-grunt-contrib-nodeunit
|
||
|
|
Version: 0.4.1
|
||
|
|
Release: 1
|
||
|
|
Summary: Run Nodeunit unit tests with grunt
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/gruntjs/grunt-contrib-nodeunit
|
||
|
|
Source0: https://github.com/gruntjs/grunt-contrib-nodeunit/archive/v%{version}/grunt-contrib-nodeunit-%{version}.tar.gz
|
||
|
|
Patch0: nodejs-grunt-contrib-nodeunit-junit.patch
|
||
|
|
Patch1: nodejs-grunt-contrib-nodeunit_fix-operator-test.patch
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(grunt-cli) npm(grunt-contrib-clean) npm(grunt-contrib-internal)
|
||
|
|
BuildRequires: npm(nodeunit) npm(tap)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n grunt-contrib-nodeunit-%{version}
|
||
|
|
%patch0 -p1
|
||
|
|
%patch1 -p1
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/grunt-contrib-nodeunit
|
||
|
|
cp -pr package.json tasks/ \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/grunt-contrib-nodeunit
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
%{_bindir}/grunt nodeunit
|
||
|
|
%else
|
||
|
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc README.md docs/
|
||
|
|
%license LICENSE-MIT
|
||
|
|
%{nodejs_sitelib}/grunt-contrib-nodeunit
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.4.1-1
|
||
|
|
- package init
|