%{?nodejs_find_provides_and_requires} %global enable_tests 1 %global fix_symlink_deps 1 %global packagename tr46 Name: nodejs-tr46 Version: 0.0.3 Release: 1%{?dist} Summary: An implementation of the Unicode TR46 spec License: MIT URL: https://github.com/Sebmaster/tr46.js#readme Source0: http://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging Provides: npm(%{packagename}) %description An implementation of the Unicode TR46 spec %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