nodejs-grunt-contrib-nodeunit/nodejs-grunt-contrib-nodeunit.spec
2021-06-16 14:55:06 +08:00

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: 2
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}.tar.gz
Patch0: nodejs-grunt-contrib-nodeunit-junit.patch
Patch1: nodejs-grunt-contrib-nodeunit_fix-operator-test.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} 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
%autosetup -n grunt-contrib-nodeunit-%{version} -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 --force
%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
* Web 09 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 0.4.1-2
- %prep no longer patched with git
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.4.1-1
- package init