# 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: 4.0.3 Release: 2%{dist} Summary: Mustache extension for Node.js License: MIT URL: http://handlebarsjs.com/ Source0: https://registry.npmjs.org/handlebars/-/%{npm_name}-%{version}.tgz Requires: npm(uglify-js) Requires: npm(optimist) BuildRequires: npm(uglify-js) BuildRequires: npm(optimist) BuildRequires: nodejs-devel BuildRequires: nodejs-packaging BuildArch: noarch %if 0%{?rhel} && 0%{?rhel} < 7 ExclusiveArch: %{ix86} x86_64 %{arm} noarch %else ExclusiveArch: %{nodejs_arches} noarch %endif %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 %nodejs_fixdep optimist %nodejs_fixdep source-map %nodejs_fixdep async %build # nothing to build %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{nodejs_sitelib}/handlebars chmod a+x bin/handlebars cp -rp bin dist 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 grunt %endif %files %{!?_licensedir:%global license %%doc} %license LICENSE %doc README.markdown release-notes.md %{nodejs_sitelib}/handlebars/ %{_bindir}/handlebars %changelog * Fri Oct 23 2015 Jared Smith - 4.0.3-2 - Fix build dependency versions * Sat Oct 17 2015 Piotr Popieluch - 4.0.3-1 - Update to 4.0.3 * Mon Aug 24 2015 Piotr Popieluch - 3.0.3-3 - Set correct el6 architecture - Update url to use https * Wed Jun 17 2015 Fedora Release Engineering - 3.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun May 24 2015 Piotr Popieluch - 3.0.3-1 - Update to 3.0.3 - Fixdep optimist and source-map - Removed deprecated Group: tag - Removed symlinkdep from build section * Sat Apr 04 2015 Eduardo Mayorga Téllez - 3.0.1-1 - Update to 3.0.1 * Wed Dec 10 2014 Eduardo Mayorga Téllez - 2.0.0-4 - Fixing lib directory install (#1172471) * Mon Dec 08 2014 Eduardo Mayorga Téllez - 2.0.0-3 - Adding dist directory (#1171403) * 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