%{?nodejs_find_provides_and_requires} %global enable_tests 1 %global fix_symlink_deps 1 %global packagename wide-align Name: nodejs-wide-align Version: 1.1.3 Release: 1%{?dist} Summary: A wide-character aware text alignment function for use on the console or with fixed width fonts. License: ISC URL: https://github.com/iarna/wide-align Source0: http://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(string-width) Provides: npm(%{packagename}) %description A wide-character aware text alignment function for use on the console or with fixed width fonts. %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