%{?nodejs_find_provides_and_requires} %global enable_tests 1 %global fix_symlink_deps 1 %global packagename url-parse Name: nodejs-url-parse Version: 1.4.3 Release: 1%{?dist} Summary: Small footprint URL parser that works seamlessly across Node.js and browser environments License: MIT URL: https://github.com/unshiftio/url-parse.git Source0: http://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(querystringify) BuildRequires: npm(requires-port) Provides: npm(%{packagename}) %description Small footprint URL parser that works seamlessly across Node.js and browser environments %prep %setup -n "package" rm -Rf node_modules %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr * %{buildroot}%{nodejs_sitelib}/%{packagename} %if 0%{?fix_symlink_deps} %{nodejs_symlink_deps} %endif %if 0%{?enable_tests} %check %{nodejs_symlink_deps} --check %{__nodejs} -e 'require("./")' %else %{_bindir}/echo "-=#=- Tests disabled -=#=-" %endif %files %doc %license %{nodejs_sitelib}/%{packagename} %changelog