%{?nodejs_find_provides_and_requires} %global packagename is-node %global enable_tests 1 Name: nodejs-is-node Version: 1.0.2 Release: 1%{?dist} Summary: Detect if current process is a node application or not License: MIT URL: https://github.com/MatthewNPM/is-node.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # License file requested at https://github.com/MatthewNPM/is-node/pull/4 Source1: LICENSE BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Requires: nodejs BuildRequires: nodejs-packaging %if 0%{?enable_tests} # nothing %endif %description Detect if current process is a node application or not. %prep %autosetup -n package cp -p %{SOURCE1} . %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/echo -e "\e[103m -=#=- This package has no tests -=#=- \e[0m" %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc *.md examples/ %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Wed May 2 2018 Jared K. Smith - 1.0.2-1 - Initial packaging