# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} # Because nodejs-handlebars is broken in rawhide right now. # https://bugzilla.redhat.com/show_bug.cgi?id=1220494 %global enable_tests 0 %global barename string Name: nodejs-string Version: 3.1.1 Release: 1%{?dist} Summary: Enhancements to the vanilla JavasScript string Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/string Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} BuildRequires: npm(uglify-js) BuildRequires: npm(istanbul) BuildRequires: npm(mocha) %endif %description string contains methods that aren't included in the vanilla JavaScript string such as escaping html, decoding html entities, stripping tags, etc %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/string cp -pr package.json lib \ %{buildroot}%{nodejs_sitelib}/string %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha test %endif %files %doc CHANGELOG.md README.md %{nodejs_sitelib}/string/ %changelog * Mon May 11 2015 Ralph Bean - 3.1.1-1 - Initial packaging for Fedora.