%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-load-grunt-tasks Version: 3.5.0 Release: 1 Summary: Load multiple grunt tasks using globbing patterns License: MIT URL: https://github.com/sindresorhus/load-grunt-tasks Source0: http://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-%{version}.tgz Source1: https://raw.githubusercontent.com/sindresorhus/load-grunt-tasks/v%{version}/gruntfile.js Source2: https://raw.githubusercontent.com/sindresorhus/load-grunt-tasks/v%{version}/license BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging npm(multimatch) npm(resolve-pkg) npm(pkg-up) %if 0%{?enable_tests} BuildRequires: npm(arrify) npm(grunt-cli) npm(grunt-contrib-clean) npm(grunt-simple-mocha) BuildRequires: npm(grunt-svgmin) %endif %description %{summary}. %prep %setup -q -n package cp -p %{SOURCE1} . cp -p %{SOURCE2} . %nodejs_fixdep findup-sync %nodejs_fixdep resolve-pkg %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/load-grunt-tasks cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/load-grunt-tasks %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/grunt %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc readme.md %license license %{nodejs_sitelib}/load-grunt-tasks %changelog * Mon Aug 17 2020 wutao - 3.5.0-1 - Package init