# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global npm_name handlebars Name: nodejs-%{npm_name} Version: 2.0.0 Release: 2%{dist} Summary: Mustache extension for Node.js Group: Development/Libraries License: MIT URL: http://handlebarsjs.com/ Source0: http://registry.npmjs.org/handlebars/-/%{npm_name}-%{version}.tgz BuildRequires: npm(uglify-js) BuildRequires: npm(optimist) Requires: npm(uglify-js) Requires: npm(optimist) BuildRequires: nodejs-devel BuildRequires: nodejs-packaging BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description Handlebars.js is an extension to the Mustache templating language created by Chris Wanstrath. Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be. %prep %setup -q -n package # Remove bundled optimist rm -rf node_modules %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{nodejs_sitelib}/handlebars chmod a+x bin/handlebars cp -rp bin package.json lib/* runtime.js %{buildroot}/%{nodejs_sitelib}/handlebars # Install /usr/bin/handlebars ln -s %{nodejs_sitelib}/handlebars/bin/handlebars \ %{buildroot}%{_bindir} %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check %endif %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.markdown release-notes.md %{nodejs_sitelib}/handlebars/ %{_bindir}/handlebars %changelog * Tue Nov 25 2014 Eduardo Mayorga Téllez - 2.0.0-2 - Fixing symlink to CLI * Thu Nov 20 2014 Eduardo Mayorga Téllez - 2.0.0-1 - Update to final release 2.0.0 - Adding missing Requires * Fri Jul 25 2014 Eduardo Mayorga Téllez - 2.0.0-0.1.alpha.4 - Initial packaging