%{?nodejs_find_provides_and_requires} %global enable_tests 1 %global fix_symlink_deps 1 %global packagename xml-name-validator Name: nodejs-xml-name-validator Version: 2.0.1 Release: 1%{?dist} Summary: Validates whether a string matches the production for an XML name or qualified name License: WTFPL URL: https://github.com/jsdom/xml-name-validator.git Source0: http://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging Provides: npm(%{packagename}) %description Validates whether a string matches the production for an XML name or qualified name %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