# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename simple-fmt Name: nodejs-simple-fmt Version: 0.1.0 Release: 1%{?dist} Summary: Maximally minimal string formatting library Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/simple-fmt 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(tap) %endif %description A maximally minimal string formatting library. Use it to make your code more readable compared to plain old string concatenation using +. The code is shorter than the MIT license text so it doesn't hog you down and you can use it everywhere. Works in node and browsers. %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}/simple-fmt cp -pr package.json simple-fmt.js \ %{buildroot}%{nodejs_sitelib}/simple-fmt %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check tap test/*.js %endif %files %doc LICENSE README.md %{nodejs_sitelib}/simple-fmt/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.1.0-1 - Initial packaging for Fedora.