# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global barename tryor Name: nodejs-tryor Version: 0.1.2 Release: 1%{?dist} Summary: Return fn() or default value (in case of exception) Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/tryor 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 %description Evalulate a function and return the value, or, in the case of an exception, return a default value. %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}/tryor cp -pr package.json tryor.js \ %{buildroot}%{nodejs_sitelib}/tryor %nodejs_symlink_deps %files %doc LICENSE README.md %{nodejs_sitelib}/tryor/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.1.2-1 - Initial packaging for Fedora.